1b6c326d8SGreg Roach<?php 2b6c326d8SGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 50c0910bfSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel; 690949315SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\MapDataImportAction; 794e35917SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\MapDataList; 8b6c326d8SGreg Roachuse Fisharebest\Webtrees\I18N; 9b6c326d8SGreg Roach 1090949315SGreg Roach/** 1190949315SGreg Roach * @var array<string> $files 1290949315SGreg Roach * @var string $folder 1390949315SGreg Roach * @var string $title 1490949315SGreg Roach */ 1590949315SGreg Roach 16b6c326d8SGreg Roach?> 17dd6b2bfcSGreg Roach 1894e35917SGreg Roach<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(MapDataList::class) => I18N::translate('Geographic data'), $title]]) ?> 19dd6b2bfcSGreg Roach 20dd6b2bfcSGreg Roach<h3><?= $title ?></h3> 21dd6b2bfcSGreg Roach 2290949315SGreg Roach<form method="post" action="<?= e(route(MapDataImportAction::class)) ?>" id="upload_form" enctype="multipart/form-data"> 23dd6b2bfcSGreg Roach <!-- Server file --> 249e3c2cf9SGreg Roach <div class="row mb-3"> 25dd6b2bfcSGreg Roach <label class="col-form-label col-sm-4" for="serverfile"> 26dd6b2bfcSGreg Roach <?= I18N::translate('A file on the server') ?> 27dd6b2bfcSGreg Roach </label> 28dd6b2bfcSGreg Roach <div class="col-sm-8"> 29dd6b2bfcSGreg Roach <div class="input-group" dir="ltr"> 30dd6b2bfcSGreg Roach <span class="input-group-text"> 3190949315SGreg Roach <?= e($folder) ?> 32dd6b2bfcSGreg Roach </span> 33315eb316SGreg Roach 344b9213b3SGreg Roach <select id="serverfile" name="serverfile" class="form-select"> 35dd6b2bfcSGreg Roach <option selected value=""></option> 36dd6b2bfcSGreg Roach <?php foreach ($files as $file) : ?> 37dd6b2bfcSGreg Roach <option value="<?= e($file) ?>"> 38dd6b2bfcSGreg Roach <?= e($file) ?> 39dd6b2bfcSGreg Roach </option> 40dd6b2bfcSGreg Roach <?php endforeach ?> 41dd6b2bfcSGreg Roach </select> 42dd6b2bfcSGreg Roach </div> 43dd6b2bfcSGreg Roach </div> 44dd6b2bfcSGreg Roach </div> 45dd6b2bfcSGreg Roach 46dd6b2bfcSGreg Roach <!-- local file --> 479e3c2cf9SGreg Roach <div class="row mb-3"> 48dd6b2bfcSGreg Roach <label class="col-form-label col-sm-4" for="localfile"> 49dd6b2bfcSGreg Roach <?= I18N::translate('A file on your computer') ?> 50dd6b2bfcSGreg Roach </label> 51dd6b2bfcSGreg Roach <div class="col-sm-8"> 529e3c2cf9SGreg Roach <input id="localfile" type="file" name="localfile" class="form-control"> 53dd6b2bfcSGreg Roach </div> 54dd6b2bfcSGreg Roach </div> 55dd6b2bfcSGreg Roach 56dd6b2bfcSGreg Roach <!-- Import options --> 579e3c2cf9SGreg Roach <fieldset class="row mb-3"> 58315eb316SGreg Roach <legend class="col-form-label col-sm-4"> 59b5e8e56bSGreg Roach <?= I18N::translate('Import') ?> 60dd6b2bfcSGreg Roach </legend> 61dd6b2bfcSGreg Roach <div class="col-sm-8"> 6294e35917SGreg Roach <?= view('components/select', ['name' => 'import-options', 'selected' => '', 'options' => ['update' => I18N::translate('Only update existing records'), 'add' => I18N::translate('Only add new records'), 'addupdate' => I18N::translate('Add new, and update existing records')]]) ?> 63dd6b2bfcSGreg Roach </div> 64dd6b2bfcSGreg Roach </fieldset> 65dd6b2bfcSGreg Roach 66dd6b2bfcSGreg Roach <!-- SAVE BUTTON --> 679e3c2cf9SGreg Roach <div class="row mb-3"> 68dd6b2bfcSGreg Roach <div class="offset-sm-4 col-sm-8"> 69dd6b2bfcSGreg Roach <button type="submit" class="btn btn-primary"> 70dd6b2bfcSGreg Roach <?= view('icons/save') ?> 71dd6b2bfcSGreg Roach <?= I18N::translate('continue') ?> 72dd6b2bfcSGreg Roach </button> 7394e35917SGreg Roach <a href="<?= e(route(MapDataList::class)) ?>"> 7494e35917SGreg Roach <?= view('icons/cancel') ?> 7594e35917SGreg Roach <?= /* I18N: A button label. */ I18N::translate('cancel') ?> 7694e35917SGreg Roach </a> 77dd6b2bfcSGreg Roach </div> 78dd6b2bfcSGreg Roach </div> 7981443e3cSGreg Roach 8081443e3cSGreg Roach <?= csrf_field() ?> 81dd6b2bfcSGreg Roach</form> 82