diff options
Diffstat (limited to '')
-rw-r--r-- | lib/new-character-dialog.inc.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/new-character-dialog.inc.php b/lib/new-character-dialog.inc.php index 5cf25c0..0e77ad1 100644 --- a/lib/new-character-dialog.inc.php +++ b/lib/new-character-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">Neuen Charakter anlegen</h4> + <h4 id="modal-title" class="modal-title">Neuen Charakter anlegen</h4> </div> <div class="modal-body"> <form action="" method="post" enctype="multipart/form-data" id="create-char-form"> @@ -27,7 +27,8 @@ <label for="story-logo">Foto des Charakters:</label> <input type="file" name="char-passphoto" id="char-passphoto"> </div> - <button type="submit" class="btn btn-info btn-sm">Anlegen</button> + <input type="hidden" value="create" id="char-action" name="char-action"> + <button type="submit" id="create-char-btn" class="btn btn-info btn-sm">Anlegen</button> </form> </div> </div> @@ -38,4 +39,13 @@ createNewCharacter(); event.preventDefault(); }); + $('#newCharacterModal').on('hide.bs.modal', function(evt) { + formReset(); + }); + function formReset() { + $('#create-char-form')[0].reset(); + $('#char-action').val('create'); + $('#modal-title').text('Neuen Charakter anlegen'); + $('#create-char-btn').text('Anlegen'); + } </script> |