diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2018-06-28 20:27:52 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2018-06-28 22:15:06 +0100 |
| commit | c5bff3bd5d359dccca0d43e44678b0e6f41e3f25 (patch) | |
| tree | 57877d074b0a2cbd13f8393cc31a6d45412024e2 /resources/views/cards | |
| parent | a4a1033e5201f50cc1c2bd2bd07a3688486873d8 (diff) | |
| download | webtrees-c5bff3bd5d359dccca0d43e44678b0e6f41e3f25.tar.gz webtrees-c5bff3bd5d359dccca0d43e44678b0e6f41e3f25.tar.bz2 webtrees-c5bff3bd5d359dccca0d43e44678b0e6f41e3f25.zip | |
Remove global
Diffstat (limited to 'resources/views/cards')
| -rw-r--r-- | resources/views/cards/add-source-citation.php | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/resources/views/cards/add-source-citation.php b/resources/views/cards/add-source-citation.php index 056a2b0ac8..da3e1cc1a9 100644 --- a/resources/views/cards/add-source-citation.php +++ b/resources/views/cards/add-source-citation.php @@ -1,3 +1,4 @@ +<?php use Fisharebest\Webtrees\GedcomTag; ?> <?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?> <?php use Fisharebest\Webtrees\I18N; ?> @@ -10,6 +11,59 @@ <div class="card-body collapse" id="add-source-citation"> <?= FunctionsEdit::addSimpleTag($level . ' SOUR @') ?> + + <?php if ($level === 1): ?> + <div class="row"> + <div class="col-sm-3"></div> + <div class="col-sm-9"> + <?php if (strpos($bdm, 'B') !== false): ?> + <label> + <input type="checkbox" name="SOUR_INDI" <?= $prefer_level2_sources === '2' ? 'checked' : '' ?> value="1"> + <?= I18N::translate('Individual') ?> + </label> + <?php if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $quick_required_facts, $matches)): ?> + <?php foreach ($matches[1] as $match): ?> + <?php if (!in_array($match, explode('|', WT_EVENTS_DEAT))): ?> + <label> + <input type="checkbox" name="SOUR_<?= $match ?>" <?= $prefer_level2_sources === '1' ? 'checked' : '' ?> value="1"> + <?= GedcomTag::getLabel($match) ?> + </label> + <?php endif ?> + <?php endforeach ?> + <?php endif ?> + <?php endif ?> + + <?php if (strpos($bdm, 'D') !== false): ?> + <?php if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $quick_required_facts, $matches)): ?> + <?php foreach ($matches[1] as $match): ?> + <?php if (in_array($match, explode('|', WT_EVENTS_DEAT))): ?> + <label> + <input type="checkbox" name="SOUR_<?= $match ?>" <?= $prefer_level2_sources === '1' ? 'checked' : '' ?> value="1"> + <?= GedcomTag::getLabel($match) ?> + </label> + <?php endif ?> + <?php endforeach ?> + <?php endif ?> + <?php endif ?> + + <?php if (strpos($bdm, 'M') !== false): ?> + <label> + <input type="checkbox" name="SOUR_FAM" <?= $prefer_level2_sources === '2' ? 'checked' : '' ?> value="1"> + <?= I18N::translate('Family') ?> + </label> + <?php if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $quick_required_famfacts, $matches)): ?> + <?php foreach ($matches[1] as $match): ?> + <label> + <input type="checkbox" name="SOUR_<?= $match ?>" <?= $prefer_level2_sources === '1' ? 'checked' : '' ?> value="1"> + <?= GedcomTag::getLabel($match) ?> + </label> + <?php endforeach ?> + <?php endif ?> + <?php endif ?> + </div> + </div> + <?php endif ?> + <?= FunctionsEdit::addSimpleTag(($level + 1) . ' PAGE') ?> <?= FunctionsEdit::addSimpleTag(($level + 1) . ' DATA') ?> <?= FunctionsEdit::addSimpleTag(($level + 2) . ' TEXT') ?> |
