xref: /webtrees/resources/views/admin/trees-create.phtml (revision dda05045b4c2f9063e99083d2dbff48269db4ac2)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\Http\RequestHandlers\CreateTreeAction;
5use Fisharebest\Webtrees\I18N;
6
7/**
8 * @var string $title
9 * @var string $tree_name
10 * @var string $tree_title
11 */
12
13?>
14
15<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?>
16
17<h1><?= $title ?></h1>
18
19
20<form method="post" action="<?= e(route(CreateTreeAction::class)) ?>" class="form-horizontal">
21    <div class="row mb-3">
22        <label for="title" class="col-sm-2 col-form-label">
23            <?= I18N::translate('Family tree title') ?>
24        </label>
25        <div class="col-sm-10">
26            <input class="form-control" id="title" maxlength="255" name="title" required="required" type="text" value="<?= e($tree_title) ?>">
27        </div>
28    </div>
29    <div class="row mb-3">
30        <label for="name" class="col-sm-2 col-form-label">
31            <?= I18N::translate('URL') ?>
32        </label>
33        <div class="col-sm-10">
34            <div class="input-group" dir="ltr">
35                <span class="input-group-text" dir="ltr">
36                    <?= e(explode('{tree}', rawurldecode(route('example')))[0]) ?>
37                </span>
38
39                <input class="form-control" id="name" maxlength="31" name="name" pattern="[^&lt;&gt;&quot;*?{}():/\\$%|]*" required="required" type="text" value="<?= e($tree_name) ?>" dir="ltr">
40
41                <span class="input-group-text" dir="ltr">
42                    <?= e(explode('{tree}', rawurldecode(route('example')))[1]) ?>
43                </span>
44            </div>
45            <div class="form-text">
46                <?= I18N::translate('Avoid spaces and punctuation. A family name might be a good choice.') ?>
47            </div>
48        </div>
49    </div>
50    <div class="row mb-3">
51        <div class="offset-sm-2 col-sm-10">
52            <button type="submit" class="btn btn-primary">
53                <?= view('icons/save') ?>
54                <?= /* I18N: A button label. */
55                I18N::translate('create') ?>
56            </button>
57            <div class="form-text">
58                <?= I18N::translate('After creating the family tree, you will be able to import data from a GEDCOM file.') ?>
59            </div>
60        </div>
61    </div>
62
63    <?= csrf_field() ?>
64</form>
65
66
67<?= view('modals/ajax') ?>
68