mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
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) {
|
} else if ($this->loadError === true) {
|
||||||
$output .= '<div class="container-center">';
|
$output .= '<div class="container-center">';
|
||||||
$output .= \ui_print_error_message(
|
$output .= \ui_print_error_message(
|
||||||
__('Widget cannot be loaded'),
|
__('Widget cannot be loaded').'. '.__('Please, configure the widget again to recover it'),
|
||||||
'',
|
'',
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
$output .= __('Please, configure the widget again to recover it');
|
|
||||||
$output .= '</div>';
|
$output .= '</div>';
|
||||||
} else {
|
} else {
|
||||||
$output .= $this->load();
|
$output .= $this->load();
|
||||||
|
@ -182,6 +182,17 @@ class MapsMadeByUser extends Widget
|
|||||||
$this->configurationRequired = false;
|
$this->configurationRequired = false;
|
||||||
if (empty($this->values['vcId']) === true) {
|
if (empty($this->values['vcId']) === true) {
|
||||||
$this->configurationRequired = 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;
|
$this->overflow_scrollbars = false;
|
||||||
@ -368,7 +379,7 @@ class MapsMadeByUser extends Widget
|
|||||||
$visualConsole = VisualConsole::fromDB(
|
$visualConsole = VisualConsole::fromDB(
|
||||||
['id' => $this->values['vcId']]
|
['id' => $this->values['vcId']]
|
||||||
);
|
);
|
||||||
} catch (Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
db_pandora_audit(
|
db_pandora_audit(
|
||||||
AUDIT_LOG_ACL_VIOLATION,
|
AUDIT_LOG_ACL_VIOLATION,
|
||||||
'Trying to access visual console without Id'
|
'Trying to access visual console without Id'
|
||||||
|
@ -172,6 +172,17 @@ class ReportsWidget extends Widget
|
|||||||
$this->configurationRequired = false;
|
$this->configurationRequired = false;
|
||||||
if (empty($this->values['reportId']) === true) {
|
if (empty($this->values['reportId']) === true) {
|
||||||
$this->configurationRequired = 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;
|
$this->overflow_scrollbars = false;
|
||||||
|
@ -220,12 +220,11 @@ if ($writeDashboards === 1) {
|
|||||||
$output = '<a href="#" class="float-right" onclick=\'';
|
$output = '<a href="#" class="float-right" onclick=\'';
|
||||||
$output .= 'show_option_dialog('.json_encode(
|
$output .= 'show_option_dialog('.json_encode(
|
||||||
[
|
[
|
||||||
'title' => $text,
|
'title' => $text,
|
||||||
'btn_text' => __('Ok'),
|
'btn_text' => __('Ok'),
|
||||||
'btn_cancel' => __('Cancel'),
|
'btn_cancel' => __('Cancel'),
|
||||||
'url' => $ajaxController,
|
'url' => $ajaxController,
|
||||||
'url_ajax' => ui_get_full_url('ajax.php'),
|
'url_ajax' => ui_get_full_url('ajax.php'),
|
||||||
'dashboardId' => $dashboardId,
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
$output .= ')\'>';
|
$output .= ')\'>';
|
||||||
|
@ -31,7 +31,6 @@ require_once $config['homedir'].'/include/class/HTML.class.php';
|
|||||||
|
|
||||||
$form = [
|
$form = [
|
||||||
'id' => 'form-search-widget',
|
'id' => 'form-search-widget',
|
||||||
'action' => $url,
|
|
||||||
'onsubmit' => 'return false;',
|
'onsubmit' => 'return false;',
|
||||||
'class' => 'modal-dashboard',
|
'class' => 'modal-dashboard',
|
||||||
'enctype' => 'multipart/form-data',
|
'enctype' => 'multipart/form-data',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user