fisharebest /
webtrees
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * webtrees: online genealogy |
||
| 4 | * Copyright (C) 2018 webtrees development team |
||
| 5 | * This program is free software: you can redistribute it and/or modify |
||
| 6 | * it under the terms of the GNU General Public License as published by |
||
| 7 | * the Free Software Foundation, either version 3 of the License, or |
||
| 8 | * (at your option) any later version. |
||
| 9 | * This program is distributed in the hope that it will be useful, |
||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
| 12 | * GNU General Public License for more details. |
||
| 13 | * You should have received a copy of the GNU General Public License |
||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
| 15 | */ |
||
| 16 | namespace Fisharebest\Webtrees; |
||
| 17 | |||
| 18 | use Fisharebest\Webtrees\Controller\BranchesController; |
||
| 19 | |||
| 20 | /** @global Tree $WT_TREE */ |
||
| 21 | global $WT_TREE; |
||
|
0 ignored issues
–
show
|
|||
| 22 | |||
| 23 | require 'includes/session.php'; |
||
| 24 | |||
| 25 | $controller = new BranchesController; |
||
| 26 | $controller->pageHeader(); |
||
| 27 | |||
| 28 | ?> |
||
| 29 | <h2 class="wt-page-title"><?= $controller->getPageTitle() ?></h2> |
||
| 30 | |||
| 31 | <form class="wt-page-options wt-page-options-branches d-print-none"> |
||
| 32 | <input type="hidden" name="ged" id="ged" value="<?= $WT_TREE->getNameHtml() ?>"> |
||
| 33 | <div class="form-group row"> |
||
| 34 | <label class="col-form-label col-sm-3 wt-page-options-label" for="surname"> |
||
| 35 | <?= I18N::translate('Surname') ?> |
||
| 36 | </label> |
||
| 37 | <div class="col-sm-9 wt-page-options-value"> |
||
| 38 | <input class="form-control" data-autocomplete-type="SURN" type="text" name="surname" id="surname" value="<?= e($controller->getSurname()) ?>" dir="auto"> |
||
| 39 | </div> |
||
| 40 | </div> |
||
| 41 | |||
| 42 | <fieldset class="form-group"> |
||
| 43 | <div class="row"> |
||
| 44 | <legend class="col-form-label col-sm-3 wt-page-options-label"> |
||
| 45 | <?= I18N::translate('Phonetic search') ?> |
||
| 46 | </legend> |
||
| 47 | <div class="col-sm-9 wt-page-options-value"> |
||
| 48 | <?= Bootstrap4::checkbox(I18N::translate('Russell'), true, ['name' => 'soundex_std', 'checked' => $controller->getSoundexStd()]) ?> |
||
| 49 | <?= Bootstrap4::checkbox(I18N::translate('Daitch-Mokotoff'), true, ['name' => 'soundex_dm', 'checked' => $controller->getSoundexDm()]) ?> |
||
| 50 | </div> |
||
| 51 | </div> |
||
| 52 | </fieldset> |
||
| 53 | |||
| 54 | <div class="form-group row"> |
||
| 55 | <div class="col-sm-3 wt-page-options-label"> |
||
| 56 | </div> |
||
| 57 | <div class="col-sm-9 wt-page-options-value"> |
||
| 58 | <button type="submit" class="btn btn-primary"> |
||
| 59 | <?= /* I18N: A button label. */ I18N::translate('view') ?> |
||
| 60 | </button> |
||
| 61 | </div> |
||
| 62 | </div> |
||
| 63 | </form> |
||
| 64 | |||
| 65 | <ol> |
||
| 66 | <?= $controller->getPatriarchsHtml() ?> |
||
| 67 | </ol> |
||
| 68 |
Instead of relying on
globalstate, we recommend one of these alternatives:1. Pass all data via parameters
2. Create a class that maintains your state