From 16bc0e5d5addca6ac4d9c6aa07e9278fa3f4ab53 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 12 Sep 2014 13:29:23 +0200 Subject: [PATCH] monitoring/commands: Add icon to the check now command form refs #6593 --- .../Command/Object/CheckNowCommandForm.php | 40 +++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php b/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php index ecf933102..65ef67ff5 100644 --- a/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php +++ b/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php @@ -6,7 +6,6 @@ namespace Icinga\Module\Monitoring\Form\Command\Object; use Icinga\Module\Monitoring\Command\Object\ScheduleHostCheckCommand; use Icinga\Module\Monitoring\Command\Object\ScheduleServiceCheckCommand; -use Icinga\Module\Monitoring\Form\Command\Object\ObjectsCommandForm; use Icinga\Web\Notification; use Icinga\Web\Request; @@ -15,17 +14,52 @@ use Icinga\Web\Request; */ class CheckNowCommandForm extends ObjectsCommandForm { - /** * (non-PHPDoc) * @see \Zend_Form::init() For the method documentation. */ public function init() { - $this->setSubmitLabel(mt('monitoring', 'Check Now')); $this->setAttrib('class', 'inline link-like'); } + /** + * (non-PHPDoc) + * @see \Icinga\Web\Form::addSubmitButton() For the method documentation. + */ + public function addSubmitButton() + { + $this->addElements(array( + array( + 'note', + 'icon', + array( + 'decorators' => array( + array( + 'HtmlTag', + array( + 'tag' => 'img', + 'src' => $this->getView()->href('img/icons/refresh_petrol.png'), + ) + ) + ) + ) + ), + array( + 'submit', + 'btn_submit', + array( + 'ignore' => true, + 'label' => mt('monitoring', 'Check Now'), + 'decorators' => array( + 'ViewHelper' + ) + ) + ) + )); + return $this; + } + /** * (non-PHPDoc) * @see \Icinga\Web\Form::onSuccess() For the method documentation.