Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/controllers/CControllerDashboardWidgetConfigure.php')
-rw-r--r--ui/app/controllers/CControllerDashboardWidgetConfigure.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/ui/app/controllers/CControllerDashboardWidgetConfigure.php b/ui/app/controllers/CControllerDashboardWidgetConfigure.php
index 44edcb0ac35..a71d24b64d4 100644
--- a/ui/app/controllers/CControllerDashboardWidgetConfigure.php
+++ b/ui/app/controllers/CControllerDashboardWidgetConfigure.php
@@ -23,15 +23,16 @@ class CControllerDashboardWidgetConfigure extends CController {
private $context;
+ protected function init() {
+ $this->setPostContentType(self::POST_CONTENT_TYPE_JSON);
+ }
+
protected function checkInput() {
$fields = [
- 'templateid' => 'db dashboard.templateid',
- 'type' => 'required|string',
- 'fields' => 'json',
- 'view_mode' => 'required|in '.implode(',', [
- ZBX_WIDGET_VIEW_MODE_NORMAL,
- ZBX_WIDGET_VIEW_MODE_HIDDEN_HEADER
- ])
+ 'templateid' => 'db dashboard.templateid',
+ 'type' => 'required|string',
+ 'fields' => 'json',
+ 'view_mode' => 'required|in '.implode(',', [ZBX_WIDGET_VIEW_MODE_NORMAL, ZBX_WIDGET_VIEW_MODE_HIDDEN_HEADER])
];
$ret = $this->validateInput($fields);