1<?php 2 3use Fisharebest\Webtrees\Bootstrap4; 4use Fisharebest\Webtrees\GedcomTag; 5 6/** 7 * @var string[] $date_options 8 * @var string $field_name 9 * @var string $field_value 10 * @var string $modifier 11 * @var string[] $name_options 12 */ 13 14?> 15 16<div class="row form-group"> 17 <label class="col-sm-3 col-form-label wt-page-options-label" for="fields[<?= e($field_name) ?>]"> 18 <?= GedcomTag::getLabel($field_name) ?> 19 </label> 20 21 <div class="col-sm-6 wt-page-options-value"> 22 <input class="form-control form-control" type="text" id="fields[<?= e($field_name) ?>]" name="fields[<?= e($field_name) ?>]" value="<?= e($field_value) ?>" <?php if (substr($field_name, -5) === ':DATE'): ?>onchange="valid_date(this, 'dmy')" <?php endif ?>> 23 </div> 24 25 <div class="col-sm-3 wt-page-options-value"> 26 <?php if (preg_match('/(GIVN|SURN)$/', $field_name)) : ?> 27 <?= Bootstrap4::select($name_options, $modifier, ['name' => 'modifiers[' . $field_name . ']']) ?> 28 <?php endif ?> 29 30 <?php if (preg_match('/(DATE)$/', $field_name)) : ?> 31 <?= Bootstrap4::select($date_options, $modifier, ['name' => 'modifiers[' . $field_name . ']']) ?> 32 <?php endif ?> 33 </div> 34</div> 35