From 1ba3954b95a30f1ca6554a0e09dd11ece40c82d9 Mon Sep 17 00:00:00 2001 From: Alexander Klimov Date: Tue, 19 Aug 2014 14:02:26 +0200 Subject: [PATCH] Monitoring config: implement SecurityForm refs #6641 --- .../application/forms/Config/SecurityForm.php | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 modules/monitoring/application/forms/Config/SecurityForm.php diff --git a/modules/monitoring/application/forms/Config/SecurityForm.php b/modules/monitoring/application/forms/Config/SecurityForm.php new file mode 100644 index 000000000..51b64dea0 --- /dev/null +++ b/modules/monitoring/application/forms/Config/SecurityForm.php @@ -0,0 +1,56 @@ +addElement( + 'text', + 'customvars', + array( + 'label' => 'Protected Custom Variables', + 'required' => true, + 'value' => $this->config->customvars + ) + ); + $this->setSubmitLabel('{{SAVE_ICON}} Save'); + } + + /** + * Set the configuration to be used for initial population of the form + */ + public function setConfiguration($config) + { + $this->config = $config; + } + + /** + * Return the configuration set by this form + * + * @return Zend_Config The configuration set in this form + */ + public function getConfig() + { + $values = $this->getValues(); + return new Zend_Config(array( + 'customvars' => $values['customvars'] + )); + } +}