form_sanitizer($_POST['panel_include'], '', 'panel_include') ]; if (\defender::safe()) { return \defender::serialize(self::$widget_data); } } public function validate_delete() { } public function display_form_input() { $lang = file_exists(WIDGETS."panel/locale/".LANGUAGE.".php") ? WIDGETS."panel/locale/".LANGUAGE.".php" : WIDGETS."panel/locale/English.php"; $widget_locale = fusion_get_locale('', $lang); self::$widget_data = [ 'panel_include' => '', ]; if (!empty(self::$colData['page_content'])) { self::$widget_data = \defender::unserialize(self::$colData['page_content']); } // Installed panel is displayed here. The visibility should be also seperately configured $panel_alt = strtr($widget_locale['PW_0201'], [ '[LINK]' => "", '[/LINK]' => "" ]); $panel_opts = \PHPFusion\Panels::get_available_panels(); unset($panel_opts['none']); echo form_select('panel_include', $widget_locale['PW_0200'], self::$widget_data['panel_include'], [ 'class' => 'm-b-0', 'inline' => TRUE, 'options' => $panel_opts, 'ext_tip' => $panel_alt, ] ); } public function display_form_button() { $widget_locale = fusion_get_locale('', WIDGETS."/panel/locale/".LANGUAGE.".php"); echo form_button('save_widget', $widget_locale['PW_0220'], 'widget', ['class' => 'btn-primary']); echo form_button('save_and_close_widget', $widget_locale['PW_0221'], 'widget', ['class' => 'btn-success']); } }