xref: /webtrees/resources/views/modals/create-media-from-file.phtml (revision 9b152ff9230017d2c03aa1bf603a98b18250446d)
1<?php
2
3use Fisharebest\Webtrees\GedcomTag;
4
5?>
6<?php use Fisharebest\Webtrees\I18N; ?>
7
8<div class="modal" id="modal-create-media-from-file">
9    <form method="post" action="<?= e(route('create-media-from-file')) ?>" id="modal-create-media-from-file-form">
10        <?= csrf_field() ?>
11        <input type="hidden" name="action" value="create-media-object-from-file">
12        <input type="hidden" name="tree" id="tree" value="">
13        <div class="modal-dialog modal-lg" role="document">
14            <div class="modal-content">
15                <div class="modal-header">
16                    <h3 class="modal-title"><?= I18N::translate('Create a media object') ?></h3>
17                    <button type="button" class="close" data-dismiss="modal" aria-label="<?= I18N::translate('close') ?>">
18                        <span aria-hidden="true">&times;</span>
19                    </button>
20                </div>
21                <div class="modal-body">
22                    <div class="form-group row">
23                        <label class="col-form-label col-sm-2" for="file">
24                            <?= I18N::translate('Media file') ?>
25                        </label>
26                        <div class="col-sm-10">
27                            <input type="text" class="form-control" id="file" name="file" value="" readonly>
28                        </div>
29                    </div>
30                    <div class="form-group row">
31                        <label class="col-form-label col-sm-2" for="title">
32                            <?= I18N::translate('Title') ?>
33                        </label>
34                        <div class="col-sm-10">
35                            <input type="text" class="form-control" name="title" id="title">
36                        </div>
37                    </div>
38                    <div class="form-group row">
39                        <label class="col-form-label col-sm-2" for="type">
40                            <?= I18N::translate('Media type') ?>
41                        </label>
42                        <div class="col-sm-10">
43                            <?= view('components/select', ['name' => 'type', 'selected' => '', 'options' => ['' => ''] + GedcomTag::getFileFormTypes()]) ?>
44                        </div>
45                    </div>
46                    <div class="form-group row">
47                        <label class="col-form-label col-sm-2" for="note">
48                            <?= I18N::translate('Note') ?>
49                        </label>
50                        <div class="col-sm-10">
51                            <textarea class="form-control" id="note" name="note" rows="5" dir="auto"></textarea>
52                        </div>
53                    </div>
54                </div>
55                <div class="modal-footer">
56                    <button type="submit" class="btn btn-primary">
57                        <?= view('icons/save') ?>
58                        <?= I18N::translate('save') ?>
59                    </button>
60                    <button type="button" class="btn btn-text" data-dismiss="modal">
61                        <?= view('icons/cancel') ?>
62                        <?= I18N::translate('cancel') ?>
63                    </button>
64                </div>
65            </div>
66        </div>
67    </form>
68</div>
69