xref: /webtrees/resources/views/admin/trees-create.phtml (revision 315eb31683006273e24c08b447e6e1095d6f2147)
15afbc57aSGreg Roach<?php
25afbc57aSGreg Roach
30c0910bfSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
45afbc57aSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateTreeAction;
55afbc57aSGreg Roachuse Fisharebest\Webtrees\I18N;
65afbc57aSGreg Roach
77c2c99faSGreg Roach/**
87c2c99faSGreg Roach * @var string $title
97c2c99faSGreg Roach * @var string $tree_name
107c2c99faSGreg Roach * @var string $tree_title
117c2c99faSGreg Roach */
127c2c99faSGreg Roach
135afbc57aSGreg Roach?>
145afbc57aSGreg Roach
150c0910bfSGreg Roach<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?>
165afbc57aSGreg Roach
175afbc57aSGreg Roach<h1><?= $title ?></h1>
185afbc57aSGreg Roach
195afbc57aSGreg Roach
205afbc57aSGreg Roach<form method="post" action="<?= e(route(CreateTreeAction::class)) ?>" class="form-horizontal">
215afbc57aSGreg Roach    <?= csrf_field() ?>
225afbc57aSGreg Roach    <div class="row form-group">
235afbc57aSGreg Roach        <label for="title" class="col-sm-2 col-form-label">
245afbc57aSGreg Roach            <?= I18N::translate('Family tree title') ?>
255afbc57aSGreg Roach        </label>
265afbc57aSGreg Roach        <div class="col-sm-10">
277dca5265SGreg Roach            <input class="form-control" id="title" maxlength="255" name="title" required="required" type="text" value="<?= e($tree_title) ?>">
285afbc57aSGreg Roach        </div>
295afbc57aSGreg Roach    </div>
305afbc57aSGreg Roach    <div class="row form-group">
315afbc57aSGreg Roach        <label for="name" class="col-sm-2 col-form-label">
325afbc57aSGreg Roach            <?= I18N::translate('URL') ?>
335afbc57aSGreg Roach        </label>
345afbc57aSGreg Roach        <div class="col-sm-10">
355afbc57aSGreg Roach            <div class="input-group" dir="ltr">
365afbc57aSGreg Roach                <span class="input-group-text" dir="ltr">
375afbc57aSGreg Roach                    <?= e(explode('{tree}', rawurldecode(route('example')))[0]) ?>
385afbc57aSGreg Roach                </span>
39*315eb316SGreg Roach
407dca5265SGreg 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">
41*315eb316SGreg Roach
425afbc57aSGreg Roach                <span class="input-group-text" dir="ltr">
435afbc57aSGreg Roach                    <?= e(explode('{tree}', rawurldecode(route('example')))[1]) ?>
445afbc57aSGreg Roach                </span>
455afbc57aSGreg Roach            </div>
46*315eb316SGreg Roach            <div class="form-text">
475afbc57aSGreg Roach                <?= I18N::translate('Avoid spaces and punctuation. A family name might be a good choice.') ?>
48*315eb316SGreg Roach            </div>
495afbc57aSGreg Roach        </div>
505afbc57aSGreg Roach    </div>
515afbc57aSGreg Roach    <div class="row form-group">
525afbc57aSGreg Roach        <div class="offset-sm-2 col-sm-10">
535afbc57aSGreg Roach            <button type="submit" class="btn btn-primary">
545afbc57aSGreg Roach                <?= view('icons/save') ?>
555afbc57aSGreg Roach                <?= /* I18N: A button label. */
565afbc57aSGreg Roach                I18N::translate('create') ?>
575afbc57aSGreg Roach            </button>
58*315eb316SGreg Roach            <div class="form-text">
595afbc57aSGreg Roach                <?= I18N::translate('After creating the family tree, you will be able to import data from a GEDCOM file.') ?>
60*315eb316SGreg Roach            </div>
615afbc57aSGreg Roach        </div>
625afbc57aSGreg Roach    </div>
635afbc57aSGreg Roach</form>
645afbc57aSGreg Roach
655afbc57aSGreg Roach
665afbc57aSGreg Roach<?= view('modals/ajax') ?>
67