xref: /webtrees/resources/views/admin/trees-create.phtml (revision d4ec5ec0fe611c85b1d77527db3e9becde7e473d)
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    <?= csrf_field() ?>
22    <div class="row form-group mb-3">
23        <label for="title" class="col-sm-2 col-form-label">
24            <?= I18N::translate('Family tree title') ?>
25        </label>
26        <div class="col-sm-10">
27            <input class="form-control" id="title" maxlength="255" name="title" required="required" type="text" value="<?= e($tree_title) ?>">
28        </div>
29    </div>
30    <div class="row form-group mb-3">
31        <label for="name" class="col-sm-2 col-form-label">
32            <?= I18N::translate('URL') ?>
33        </label>
34        <div class="col-sm-10">
35            <div class="input-group" dir="ltr">
36                <span class="input-group-text" dir="ltr">
37                    <?= e(explode('{tree}', rawurldecode(route('example')))[0]) ?>
38                </span>
39
40                <input class="form-control" id="name" maxlength="31" name="name" pattern="[^&lt;&gt;&quot;*?{}():/\\$%|]*" required="required" type="text" value="<?= e($tree_name) ?>" dir="ltr">
41
42                <span class="input-group-text" dir="ltr">
43                    <?= e(explode('{tree}', rawurldecode(route('example')))[1]) ?>
44                </span>
45            </div>
46            <div class="form-text">
47                <?= I18N::translate('Avoid spaces and punctuation. A family name might be a good choice.') ?>
48            </div>
49        </div>
50    </div>
51    <div class="row form-group mb-3">
52        <div class="offset-sm-2 col-sm-10">
53            <button type="submit" class="btn btn-primary">
54                <?= view('icons/save') ?>
55                <?= /* I18N: A button label. */
56                I18N::translate('create') ?>
57            </button>
58            <div class="form-text">
59                <?= I18N::translate('After creating the family tree, you will be able to import data from a GEDCOM file.') ?>
60            </div>
61        </div>
62    </div>
63</form>
64
65
66<?= view('modals/ajax') ?>
67