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