From b880345a8a897b3fe600ef94a0fee5bb5f2f8558 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:46:04 +0200 Subject: Adding upstream version 1.1.0. Signed-off-by: Daniel Baumann --- application/forms/Config/GeneralConfigForm.php | 62 ++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 application/forms/Config/GeneralConfigForm.php (limited to 'application/forms/Config/GeneralConfigForm.php') diff --git a/application/forms/Config/GeneralConfigForm.php b/application/forms/Config/GeneralConfigForm.php new file mode 100644 index 0000000..d751055 --- /dev/null +++ b/application/forms/Config/GeneralConfigForm.php @@ -0,0 +1,62 @@ +setName('form_config_pnp4nagios_general'); + $this->setSubmitLabel($this->translate('Save Changes')); + } + + /** + * {@inheritdoc} + */ + public function createElements(array $formData) + { + $this->addElement( + 'text', + 'pnp4nagios_config_dir', + array( + 'value' => '/etc/pnp4nagios', + 'label' => $this->translate('PNP4Nagios configuration'), + 'description' => $this->translate('PNP4Nagios configuration path name (e.g. /etc/pnp4nagios)') + ) + ); + $this->addElement( + 'text', + 'pnp4nagios_base_url', + array( + 'value' => '/pnp4nagios', + 'label' => $this->translate('PNP4Nagios url'), + 'description' => $this->translate('The base URL of your PNP4Nagios installation (e.g. /pnp4nagios)') + ) + ); + + $this->addElement( + 'checkbox', + 'pnp4nagios_menu_disabled', + array( + 'label' => $this->translate('Disable menu entry'), + 'description' => $this->translate('Hide PNP from main menu') + ) + ); + + $this->addElement( + 'text', + 'pnp4nagios_default_query', + array( + 'value' => 'host=.pnp-internal&srv=runtime', + 'label' => $this->translate('Index query'), + 'description' => $this->translate('Default URL query for the index view: /pnp4nagios/graph?{query}') + ) + ); + } +} -- cgit v1.2.3