1<?php 2 3use Fisharebest\Webtrees\Note; 4use Fisharebest\Webtrees\Tree; 5 6/** 7 * @var Note|null $note 8 * @var string|null $id 9 * @var string $name 10 * @var Tree $tree 11 */ 12 13?> 14 15<select 16 autocomplete="off" 17 class="form-control select2" 18 data-ajax--delay="350" 19 data-ajax--minimum-input-length="2" 20 data-ajax--type="POST" 21 data-ajax--url="<?= e(route('select2-note', ['ged' => $tree->name()])) ?>" 22 data-allow-clear="true" 23 id="<?= e($id ?? $name) ?>" 24 name="<?= e($name) ?>" 25 <?= ($disabled ?? false) ? 'disabled' : '' ?> 26 <?= ($required ?? false) ? 'required' : '' ?> 27> 28 <?php if (($note ?? null) instanceof Note): ?> 29 <option value="<?= e($note->xref()) ?>" selected> 30 <?= view('selects/note', ['note' => $note]) ?> 31 </option> 32 <?php else: ?> 33 <option></option> 34 <?php endif ?> 35</select> 36