From 75a0c17933ee7ada01fd1c605e0d122288a623e9 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 22 Aug 2014 12:15:02 +0200 Subject: [PATCH] Ensure that all forms have a name refs #5525 --- .../forms/Config/Authentication/AutologinBackendForm.php | 8 ++++++++ application/forms/Config/Authentication/DbBackendForm.php | 2 ++ .../forms/Config/Authentication/LdapBackendForm.php | 2 ++ application/forms/Dashboard/AddUrlForm.php | 8 ++++++++ application/forms/Preference/GeneralForm.php | 2 +- .../application/controllers/ConfigController.php | 3 +++ .../monitoring/application/forms/Config/BackendForm.php | 8 ++++++++ .../monitoring/application/forms/Config/InstanceForm.php | 8 ++++++++ .../monitoring/application/forms/Config/SecurityForm.php | 8 ++++++++ 9 files changed, 48 insertions(+), 1 deletion(-) diff --git a/application/forms/Config/Authentication/AutologinBackendForm.php b/application/forms/Config/Authentication/AutologinBackendForm.php index eab096c71..d6ba109e9 100644 --- a/application/forms/Config/Authentication/AutologinBackendForm.php +++ b/application/forms/Config/Authentication/AutologinBackendForm.php @@ -11,6 +11,14 @@ use Zend_Validate_Callback; */ class AutologinBackendForm extends BaseBackendForm { + /** + * Initialize this form + */ + public function init() + { + $this->setName('form_config_authentication_autologin'); + } + public function isValidAuthenticationBackend() { return true; diff --git a/application/forms/Config/Authentication/DbBackendForm.php b/application/forms/Config/Authentication/DbBackendForm.php index bb1e68924..56e74ae14 100644 --- a/application/forms/Config/Authentication/DbBackendForm.php +++ b/application/forms/Config/Authentication/DbBackendForm.php @@ -30,6 +30,8 @@ class DbBackendForm extends BaseBackendForm */ public function init() { + $this->setName('form_config_authentication_db'); + $dbResources = array_keys( ResourceFactory::getResourceConfigs('db')->toArray() ); diff --git a/application/forms/Config/Authentication/LdapBackendForm.php b/application/forms/Config/Authentication/LdapBackendForm.php index 8d275b00e..7209b5435 100644 --- a/application/forms/Config/Authentication/LdapBackendForm.php +++ b/application/forms/Config/Authentication/LdapBackendForm.php @@ -30,6 +30,8 @@ class LdapBackendForm extends BaseBackendForm */ public function init() { + $this->setName('form_config_authentication_ldap'); + $ldapResources = array_keys( ResourceFactory::getResourceConfigs('ldap')->toArray() ); diff --git a/application/forms/Dashboard/AddUrlForm.php b/application/forms/Dashboard/AddUrlForm.php index 4a9d93016..4ef0c985c 100644 --- a/application/forms/Dashboard/AddUrlForm.php +++ b/application/forms/Dashboard/AddUrlForm.php @@ -13,6 +13,14 @@ use Icinga\Web\Form; */ class AddUrlForm extends Form { + /** + * Initialize this form + */ + public function init() + { + $this->setName('form_dashboard_addurl'); + } + /** * @see Form::createElements() */ diff --git a/application/forms/Preference/GeneralForm.php b/application/forms/Preference/GeneralForm.php index a1f89951d..45044234c 100644 --- a/application/forms/Preference/GeneralForm.php +++ b/application/forms/Preference/GeneralForm.php @@ -19,7 +19,7 @@ class GeneralForm extends Form */ public function init() { - $this->setName('form_preference_set'); + $this->setName('form_config_preferences'); } /** diff --git a/modules/monitoring/application/controllers/ConfigController.php b/modules/monitoring/application/controllers/ConfigController.php index 2e03fbe28..4f1d3c7fa 100644 --- a/modules/monitoring/application/controllers/ConfigController.php +++ b/modules/monitoring/application/controllers/ConfigController.php @@ -251,6 +251,9 @@ class Monitoring_ConfigController extends ModuleActionController return true; } + /** + * Display a form to adjust security relevant settings + */ public function securityAction() { $this->view->tabs = $this->Module()->getConfigTabs()->activate('security'); diff --git a/modules/monitoring/application/forms/Config/BackendForm.php b/modules/monitoring/application/forms/Config/BackendForm.php index 4b2859432..f9ea25806 100644 --- a/modules/monitoring/application/forms/Config/BackendForm.php +++ b/modules/monitoring/application/forms/Config/BackendForm.php @@ -12,6 +12,14 @@ use Icinga\Data\ResourceFactory; */ class BackendForm extends Form { + /** + * Initialize this form + */ + public function init() + { + $this->setName('form_config_monitoring_backends'); + } + /** * @see Form::createElements() */ diff --git a/modules/monitoring/application/forms/Config/InstanceForm.php b/modules/monitoring/application/forms/Config/InstanceForm.php index e74ecca86..422a3a9e2 100644 --- a/modules/monitoring/application/forms/Config/InstanceForm.php +++ b/modules/monitoring/application/forms/Config/InstanceForm.php @@ -14,6 +14,14 @@ use Icinga\Web\Form\Decorator\ElementWrapper; */ class InstanceForm extends Form { + /** + * Initialize this form + */ + public function init() + { + $this->setName('form_config_monitoring_instances'); + } + /** * @see Form::createElements() */ diff --git a/modules/monitoring/application/forms/Config/SecurityForm.php b/modules/monitoring/application/forms/Config/SecurityForm.php index 7b004f21b..65544c23e 100644 --- a/modules/monitoring/application/forms/Config/SecurityForm.php +++ b/modules/monitoring/application/forms/Config/SecurityForm.php @@ -17,6 +17,14 @@ class SecurityForm extends Form */ protected $config; + /** + * Initialize this form + */ + public function init() + { + $this->setName('form_config_monitoring_security'); + } + /** * @see Form::createElements() */