diff options
author | steckbrief <steckbrief@chefmail.de> | 2017-12-28 13:46:55 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2017-12-28 13:46:55 +0100 |
commit | 391875ea8389d043360961cf2c5a69f2b6d7a91a (patch) | |
tree | 7bd8c535cd8c6912f34c193ece35a2efcd73530c /lib/new-story-dialog.inc.php | |
parent | 31ba0cea75b128a664e777a0a2f4180a19501ec3 (diff) |
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> |