diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2018-06-27 20:38:58 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2018-06-27 21:13:41 +0100 |
| commit | 6e29a5413989095c58c335c9895cb23d87445719 (patch) | |
| tree | 74a339f1481fa72cf806423cbf4f37c7d1b36b6c /app | |
| parent | 02d07fae3d7f486abf121c6aff3b803c834d8e0d (diff) | |
| download | webtrees-6e29a5413989095c58c335c9895cb23d87445719.tar.gz webtrees-6e29a5413989095c58c335c9895cb23d87445719.tar.bz2 webtrees-6e29a5413989095c58c335c9895cb23d87445719.zip | |
Simplify some code
Diffstat (limited to 'app')
| -rw-r--r-- | app/Functions/FunctionsEdit.php | 67 |
1 files changed, 1 insertions, 66 deletions
diff --git a/app/Functions/FunctionsEdit.php b/app/Functions/FunctionsEdit.php index 0956b20704..a9186ece43 100644 --- a/app/Functions/FunctionsEdit.php +++ b/app/Functions/FunctionsEdit.php @@ -558,14 +558,7 @@ class FunctionsEdit { $name = 'text[]'; } - if ($level === '0') { - $id = $fact; - } else { - $id = $fact . Uuid::uuid4(); - } - if ($upperlevel) { - $id = $upperlevel . '_' . $fact . Uuid::uuid4(); - } + $id = $fact . Uuid::uuid4()->toString(); $previous_ids[$fact] = $id; @@ -751,10 +744,6 @@ class FunctionsEdit { $html .= '<div class="input-group-append"><span class="input-group-text">' . FontAwesome::linkIcon('coordinates', I18N::translate('Latitude') . ' / ' . I18N::translate('Longitude'), ['data-toggle' => 'collapse', 'data-target' => '.child_of_' . $id]) . '</span></div>'; $html .= self::inputAddonHelp('PLAC'); $html .= '</div>'; - if (Module::getModuleByName('places_assistant')) { - \PlacesAssistantModule::setup_place_subfields($id); - \PlacesAssistantModule::print_place_subfields($id); - } } elseif ($fact === 'QUAY') { $html .= Bootstrap4::select(GedcomCodeQuay::getValues(), $value, ['id' => $id, 'name' => $name]); } elseif ($fact === 'RELA') { @@ -985,60 +974,6 @@ class FunctionsEdit { } /** - * Prints collapsable fields to add ASSO/RELA, SOUR, OBJE, etc. - * - * @param string $tag - * @param int $level - * @param string $parent_tag - */ - public static function printAddLayer($tag, $level = 2, $parent_tag = '') { - global $WT_TREE; - - switch ($tag) { - case 'SOUR': - echo view('cards/add-source-citation', [ - 'level' => $level, - 'full_citations' => $WT_TREE->getPreference('FULL_SOURCES'), - ]); - break; - - case 'ASSO': - case 'ASSO2': - echo view('cards/add-associate', [ - 'level' => $level, - ]); - break; - - case 'NOTE': - echo view('cards/add-note', [ - 'level' => $level, - ]); - break; - - case 'SHARED_NOTE': - echo view('cards/add-shared-note', [ - 'level' => $level, - 'parent_tag' => $parent_tag, - ]); - break; - - case 'OBJE': - if ($WT_TREE->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($WT_TREE)) { - echo view('cards/add-media-object', [ - 'level' => $level, - ]); - } - break; - - case 'RESN': - echo view('cards/add-restriction', [ - 'level' => $level, - ]); - break; - } - } - - /** * Add some empty tags to create a new fact. * * @param string $fact |
