summaryrefslogtreecommitdiffstats
path: root/lib/new-character-dialog.inc.php
blob: 5cf25c07480f24a530124d91c7daecb426c3d305 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
?>
    <span id="add-new-character-btn" class="floating-action-btn" data-toggle="modal" data-target="#newCharacterModal">
        +
    </span>
    <!-- Modal -->
    <div class="modal fade" id="newCharacterModal" role="dialog">
        <div class="modal-dialog">
            <!-- Modal content-->
            <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>
                </div>
                <div class="modal-body">
                    <form action="" method="post" enctype="multipart/form-data" id="create-char-form">
                        <input type="hidden" name="story-name" id="story-name" value="<?=$currentStory;?>">
                        <div class="form-group">
                            <label for="name">Name des Charakters:</label>
                            <input type="text" class="form-control" id="char-name" name="char-name">
                        </div>
                        <div class="form-group">
                            <label for="story-description">Beschreibung des Charakters:</label>
                            <textarea class="form-control" rows="5" id="char-description" name="char-description"></textarea>
                        </div>
                        <div class="form-group">
                            <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>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script>
        $('#create-char-form').submit(function(event) {
            createNewCharacter();
            event.preventDefault();
        });
    </script>