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