From dedb348af90e4ba89f409bef1aedd5e18eed9136 Mon Sep 17 00:00:00 2001 From: Alexander Fuhr Date: Thu, 13 Nov 2014 15:38:44 +0100 Subject: [PATCH] Add clickable icon for command check now 2 --- .../Command/Object/CheckNowCommandForm.php | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php b/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php index 14e7be011..aa109ff7f 100644 --- a/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php +++ b/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php @@ -6,6 +6,7 @@ namespace Icinga\Module\Monitoring\Form\Command\Object; use Icinga\Module\Monitoring\Command\Object\ScheduleHostCheckCommand; use Icinga\Module\Monitoring\Command\Object\ScheduleServiceCheckCommand; +use Icinga\Web\Form\Element\Button; use Icinga\Web\Form\Element\Note; use Icinga\Web\Notification; use Icinga\Web\Request; @@ -30,23 +31,19 @@ class CheckNowCommandForm extends ObjectsCommandForm */ public function addSubmitButton() { + $iconUrl = $this->getView()->href('img/icons/refresh_petrol.png'); + $this->addElements(array( - new Note( - 'icon', // Bogus - array( - 'decorators' => array(array( - 'HtmlTag', - array('tag' => 'img', 'src' => $this->getView()->href('img/icons/refresh_petrol.png')) - )) - ) - ), - array( - 'submit', + new Button( 'btn_submit', array( 'ignore' => true, - 'label' => mt('monitoring', 'Check now'), - 'decorators' => array('ViewHelper') + 'type' => 'submit', + 'value' => mt('monitoring', 'Check now'), + 'label' => ' ' . mt('monitoring', 'Check now'), + 'decorators' => array('ViewHelper'), + 'escape' => false, + 'class' => 'link-like' ) ) ));