summaryrefslogtreecommitdiffstats
path: root/lib/new-character-dialog.inc.php
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2017-12-28 13:46:55 +0100
committersteckbrief <steckbrief@chefmail.de>2017-12-28 13:46:55 +0100
commit391875ea8389d043360961cf2c5a69f2b6d7a91a (patch)
tree7bd8c535cd8c6912f34c193ece35a2efcd73530c /lib/new-character-dialog.inc.php
parent31ba0cea75b128a664e777a0a2f4180a19501ec3 (diff)
update and delete addedHEADv0.1master
Diffstat (limited to 'lib/new-character-dialog.inc.php')
-rw-r--r--lib/new-character-dialog.inc.php14
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">&times;</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>