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