summaryrefslogtreecommitdiffstats
path: root/admin.html
blob: ba5d37f4b470501717e032b4ffde0ec2114c70e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html lang="de">
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="https://www.sl-its.de/css/bootstrap.spacelab.min.css">
        <script src="https://www.sl-its.de/js/jquery-1.11.2.min.js"></script>
        <script src="js/bootstrap.min.js"></script>
        <script>
            function uploadSeriesLogo() {
                var data = new FormData($('#create-story-form')[0]);
                //var file = $('#story-logo').prop('files')[0];
                //data.append('file', file);
                jQuery.ajax({
                    url: 'createStory.php',
                    data: data,
                    cache: false,
                    contentType: false,
                    processData: false,
                    method: 'POST'
                }).done(function(data, textStatus){
                     console.log("Success: Files sent!");
                     console.log(data);
                     console.log(textStatus);
                  }).fail(function(jqXHR, textStatus){
                     console.log("An error occurred, the files couldn't be sent!");
                     console.log(jqXHR);
                     console.log(textStatus);
                });
            }
        </script>
        <style type="text/css">
            .figure-desc {
                text-align: justify;
            }
            .figure-pic {
                height: 300px;
                width: 300px;
            }
            .spacer {
                height: 55px;
            }
        </style>
        <title>Kindergeschichten - Admin</title>
    </head>
    <body>
        <nav class="navbar navbar-default navbar-fixed-top navbar-right">
            <div class="navbar-header">
                <a class="navbar-brand" href="#">Kindergeschichten - Admin</a>
                <button type="button" class="navbar-toggle navbar-toggle-si" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            </div>
            <div class="container-fluid">
                <div class="collapse navbar-collapse" id="myNavbar">
                    <ul class="nav navbar-nav">
                    </ul>
                </div>
            </div>
        </nav>
        <div class="spacer"></div>
        
        <div class="container">
            <!-- Trigger the modal with a button -->
            <button type="button" class="btn btn-info btn-sm" data-toggle="modal" data-target="#newSeriesModal">Neue Kindergeschichte</button>

            <!-- Modal -->
            <div class="modal fade" id="newSeriesModal" role="dialog">
                <div class="modal-dialog">
            
                    <!-- Modal content-->
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal">&times;</button>
                            <h4 class="modal-title">Neue Kindergeschichte anlegen</h4>
                        </div>
                        <div class="modal-body">
                            <form action="" method="post" enctype="multipart/form-data" id="create-story-form">
                                <div class="form-group">
                                    <label for="name">Name der Kindergeschichte:</label>
                                    <input type="text" class="form-control" id="story-name">
                                </div>
                                <div class="form-group">
                                    <input type="file" name="story-logo" id="story-logo">
                                </div>
                                <button type="submit" class="btn btn-info btn-sm">Anlegen</button>
                            </form>
                        </div>
                    </div>
                
                </div>
            </div>
            
        </div>
    </body>
</html>