diff options
Diffstat (limited to 'admin.html')
-rw-r--r-- | admin.html | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -7,7 +7,8 @@ <script src="js/bootstrap.min.js"></script> <script> function createNewStory() { - var data = new FormData($('#create-story-form')[0]); + var form = $('#create-story-form')[0]; + var data = new FormData(form); //var file = $('#story-logo').prop('files')[0]; //data.append('file', file); jQuery.ajax({ @@ -21,7 +22,8 @@ console.log("Success: Files sent!"); console.log(data); console.log(textStatus); - }).fail(function(jqXHR, textStatus){ + $('#newSeriesModal').modal('hide'); + forform }).fail(function(jqXHR, textStatus){ console.log("An error occurred, the files couldn't be sent!"); console.log(jqXHR); console.log(textStatus); @@ -83,6 +85,10 @@ <input type="text" class="form-control" id="story-name" name="story-name"> </div> <div class="form-group"> + <label for="story-description">Beschreibung der Kindergeschichte:</label> + <textarea class="form-control" rows="5" id="story-description" name="story-description"></textarea> + </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> |