xref: /webtrees/resources/views/admin/trees-create.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
15afbc57aSGreg Roach<?php
25afbc57aSGreg Roach
3*10e06497SGreg Roachdeclare(strict_types=1);
4*10e06497SGreg Roach
50c0910bfSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
65afbc57aSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateTreeAction;
75afbc57aSGreg Roachuse Fisharebest\Webtrees\I18N;
85afbc57aSGreg Roach
97c2c99faSGreg Roach/**
107c2c99faSGreg Roach * @var string $title
117c2c99faSGreg Roach * @var string $tree_name
127c2c99faSGreg Roach * @var string $tree_title
137c2c99faSGreg Roach */
147c2c99faSGreg Roach
155afbc57aSGreg Roach?>
165afbc57aSGreg Roach
170c0910bfSGreg Roach<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?>
185afbc57aSGreg Roach
195afbc57aSGreg Roach<h1><?= $title ?></h1>
205afbc57aSGreg Roach
215afbc57aSGreg Roach
225afbc57aSGreg Roach<form method="post" action="<?= e(route(CreateTreeAction::class)) ?>" class="form-horizontal">
239e3c2cf9SGreg Roach    <div class="row mb-3">
245afbc57aSGreg Roach        <label for="title" class="col-sm-2 col-form-label">
255afbc57aSGreg Roach            <?= I18N::translate('Family tree title') ?>
265afbc57aSGreg Roach        </label>
275afbc57aSGreg Roach        <div class="col-sm-10">
287dca5265SGreg Roach            <input class="form-control" id="title" maxlength="255" name="title" required="required" type="text" value="<?= e($tree_title) ?>">
295afbc57aSGreg Roach        </div>
305afbc57aSGreg Roach    </div>
319e3c2cf9SGreg Roach    <div class="row mb-3">
325afbc57aSGreg Roach        <label for="name" class="col-sm-2 col-form-label">
335afbc57aSGreg Roach            <?= I18N::translate('URL') ?>
345afbc57aSGreg Roach        </label>
355afbc57aSGreg Roach        <div class="col-sm-10">
365afbc57aSGreg Roach            <div class="input-group" dir="ltr">
375afbc57aSGreg Roach                <span class="input-group-text" dir="ltr">
385afbc57aSGreg Roach                    <?= e(explode('{tree}', rawurldecode(route('example')))[0]) ?>
395afbc57aSGreg Roach                </span>
40315eb316SGreg Roach
417dca5265SGreg Roach                <input class="form-control" id="name" maxlength="31" name="name" pattern="[^&lt;&gt;&quot;*?{}():/\\$%|]*" required="required" type="text" value="<?= e($tree_name) ?>" dir="ltr">
42315eb316SGreg Roach
435afbc57aSGreg Roach                <span class="input-group-text" dir="ltr">
445afbc57aSGreg Roach                    <?= e(explode('{tree}', rawurldecode(route('example')))[1]) ?>
455afbc57aSGreg Roach                </span>
465afbc57aSGreg Roach            </div>
47315eb316SGreg Roach            <div class="form-text">
485afbc57aSGreg Roach                <?= I18N::translate('Avoid spaces and punctuation. A family name might be a good choice.') ?>
49315eb316SGreg Roach            </div>
505afbc57aSGreg Roach        </div>
515afbc57aSGreg Roach    </div>
529e3c2cf9SGreg Roach    <div class="row mb-3">
535afbc57aSGreg Roach        <div class="offset-sm-2 col-sm-10">
545afbc57aSGreg Roach            <button type="submit" class="btn btn-primary">
555afbc57aSGreg Roach                <?= view('icons/save') ?>
565afbc57aSGreg Roach                <?= /* I18N: A button label. */
575afbc57aSGreg Roach                I18N::translate('create') ?>
585afbc57aSGreg Roach            </button>
59315eb316SGreg Roach            <div class="form-text">
605afbc57aSGreg Roach                <?= I18N::translate('After creating the family tree, you will be able to import data from a GEDCOM file.') ?>
61315eb316SGreg Roach            </div>
625afbc57aSGreg Roach        </div>
635afbc57aSGreg Roach    </div>
6481443e3cSGreg Roach
6581443e3cSGreg Roach    <?= csrf_field() ?>
665afbc57aSGreg Roach</form>
675afbc57aSGreg Roach
685afbc57aSGreg Roach
695afbc57aSGreg Roach<?= view('modals/ajax') ?>
70