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