delete item into widget pandora_enterprise#9213
This commit is contained in:
parent
6765cc136f
commit
6d1121602a
|
@ -474,11 +474,10 @@ class Widget
|
|||
} else if ($this->loadError === true) {
|
||||
$output .= '<div class="container-center">';
|
||||
$output .= \ui_print_error_message(
|
||||
__('Widget cannot be loaded'),
|
||||
__('Widget cannot be loaded').'. '.__('Please, configure the widget again to recover it'),
|
||||
'',
|
||||
true
|
||||
);
|
||||
$output .= __('Please, configure the widget again to recover it');
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
$output .= $this->load();
|
||||
|
|
|
@ -182,6 +182,17 @@ class MapsMadeByUser extends Widget
|
|||
$this->configurationRequired = false;
|
||||
if (empty($this->values['vcId']) === true) {
|
||||
$this->configurationRequired = true;
|
||||
} else {
|
||||
$check_exist = db_get_value(
|
||||
'id',
|
||||
'tlayout',
|
||||
'id',
|
||||
$this->values['vcId']
|
||||
);
|
||||
|
||||
if ($check_exist === false) {
|
||||
$this->loadError = true;
|
||||
}
|
||||
}
|
||||
|
||||
$this->overflow_scrollbars = false;
|
||||
|
@ -368,7 +379,7 @@ class MapsMadeByUser extends Widget
|
|||
$visualConsole = VisualConsole::fromDB(
|
||||
['id' => $this->values['vcId']]
|
||||
);
|
||||
} catch (Throwable $e) {
|
||||
} catch (\Throwable $e) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access visual console without Id'
|
||||
|
|
|
@ -172,6 +172,17 @@ class ReportsWidget extends Widget
|
|||
$this->configurationRequired = false;
|
||||
if (empty($this->values['reportId']) === true) {
|
||||
$this->configurationRequired = true;
|
||||
} else {
|
||||
$check_exist = db_get_value(
|
||||
'id_report',
|
||||
'treport',
|
||||
'id_report',
|
||||
$this->values['reportId']
|
||||
);
|
||||
|
||||
if ($check_exist === false) {
|
||||
$this->loadError = true;
|
||||
}
|
||||
}
|
||||
|
||||
$this->overflow_scrollbars = false;
|
||||
|
|
|
@ -220,12 +220,11 @@ if ($writeDashboards === 1) {
|
|||
$output = '<a href="#" class="float-right" onclick=\'';
|
||||
$output .= 'show_option_dialog('.json_encode(
|
||||
[
|
||||
'title' => $text,
|
||||
'btn_text' => __('Ok'),
|
||||
'btn_cancel' => __('Cancel'),
|
||||
'url' => $ajaxController,
|
||||
'url_ajax' => ui_get_full_url('ajax.php'),
|
||||
'dashboardId' => $dashboardId,
|
||||
'title' => $text,
|
||||
'btn_text' => __('Ok'),
|
||||
'btn_cancel' => __('Cancel'),
|
||||
'url' => $ajaxController,
|
||||
'url_ajax' => ui_get_full_url('ajax.php'),
|
||||
]
|
||||
);
|
||||
$output .= ')\'>';
|
||||
|
|
|
@ -31,7 +31,6 @@ require_once $config['homedir'].'/include/class/HTML.class.php';
|
|||
|
||||
$form = [
|
||||
'id' => 'form-search-widget',
|
||||
'action' => $url,
|
||||
'onsubmit' => 'return false;',
|
||||
'class' => 'modal-dashboard',
|
||||
'enctype' => 'multipart/form-data',
|
||||
|
|
Loading…
Reference in New Issue