diff options
Diffstat (limited to 'lib/new-story-dialog.inc.php')
-rw-r--r-- | lib/new-story-dialog.inc.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/new-story-dialog.inc.php b/lib/new-story-dialog.inc.php index 73c6abf..c833933 100644 --- a/lib/new-story-dialog.inc.php +++ b/lib/new-story-dialog.inc.php @@ -10,7 +10,7 @@ <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> - <h4 class="modal-title">Neue Kindergeschichte anlegen</h4> + <h4 id="modal-title" class="modal-title">Neue Kindergeschichte anlegen</h4> </div> <div class="modal-body"> <form action="" method="post" enctype="multipart/form-data" id="create-story-form"> @@ -30,7 +30,8 @@ <label for="story-header">Header Bild der Kindergeschichte:</label> <input type="file" name="story-header" id="story-header"> </div> - <button type="submit" class="btn btn-info btn-sm">Anlegen</button> + <input type="hidden" value="create" name="story-action" id="story-action"> + <button type="submit" id="create-story-btn" class="btn btn-info btn-sm">Anlegen</button> </form> </div> </div> @@ -41,4 +42,13 @@ createNewStory(); event.preventDefault(); }); + $('#newCharacterModal').on('hide.bs.modal', function(evt) { + formReset(); + }); + function formReset() { + $('#create-story-form')[0].reset(); + $('#story-action').val('create'); + $('#modal-title').text('Neue Kindergeschichte anlegen'); + $('#create-story-btn').text('Anlegen'); + } </script> |