chg: [UI] Show SightingDB field just when SightingDB is enabled

pull/8613/head
Jakub Onderka 2022-09-29 15:06:45 +02:00
parent 29b2924bf2
commit c8e3961e37
2 changed files with 4 additions and 2 deletions

View File

@ -1653,6 +1653,7 @@ class EventsController extends AppController
$cortex_modules = $this->Module->getEnabledModules($user, false, 'Cortex');
$this->set('cortex_modules', $cortex_modules);
}
$this->set('sightingsDbEnabled', (bool)Configure::read('Plugin.Sightings_sighting_db_enable'));
}
public function view($id = null, $continue = false, $fromEvent = null)

View File

@ -207,9 +207,10 @@
'title' => __('Show SightingDB lookup results'),
'fa-icon' => 'binoculars',
'text' => __('SightingDB'),
'active' => empty($includeSightingdb) ? false : true,
'active' => !empty($includeSightingdb),
'onClick' => 'toggleBoolFilter',
'onClickParams' => array('includeSightingdb')
'onClickParams' => array('includeSightingdb'),
'requirement' => $sightingsDbEnabled,
),
array(
'id' => 'show_attribute_context',