Add clickable icon for command check now 2
This commit is contained in:
parent
3343599a63
commit
dedb348af9
|
@ -6,6 +6,7 @@ namespace Icinga\Module\Monitoring\Form\Command\Object;
|
||||||
|
|
||||||
use Icinga\Module\Monitoring\Command\Object\ScheduleHostCheckCommand;
|
use Icinga\Module\Monitoring\Command\Object\ScheduleHostCheckCommand;
|
||||||
use Icinga\Module\Monitoring\Command\Object\ScheduleServiceCheckCommand;
|
use Icinga\Module\Monitoring\Command\Object\ScheduleServiceCheckCommand;
|
||||||
|
use Icinga\Web\Form\Element\Button;
|
||||||
use Icinga\Web\Form\Element\Note;
|
use Icinga\Web\Form\Element\Note;
|
||||||
use Icinga\Web\Notification;
|
use Icinga\Web\Notification;
|
||||||
use Icinga\Web\Request;
|
use Icinga\Web\Request;
|
||||||
|
@ -30,23 +31,19 @@ class CheckNowCommandForm extends ObjectsCommandForm
|
||||||
*/
|
*/
|
||||||
public function addSubmitButton()
|
public function addSubmitButton()
|
||||||
{
|
{
|
||||||
|
$iconUrl = $this->getView()->href('img/icons/refresh_petrol.png');
|
||||||
|
|
||||||
$this->addElements(array(
|
$this->addElements(array(
|
||||||
new Note(
|
new Button(
|
||||||
'icon', // Bogus
|
|
||||||
array(
|
|
||||||
'decorators' => array(array(
|
|
||||||
'HtmlTag',
|
|
||||||
array('tag' => 'img', 'src' => $this->getView()->href('img/icons/refresh_petrol.png'))
|
|
||||||
))
|
|
||||||
)
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'submit',
|
|
||||||
'btn_submit',
|
'btn_submit',
|
||||||
array(
|
array(
|
||||||
'ignore' => true,
|
'ignore' => true,
|
||||||
'label' => mt('monitoring', 'Check now'),
|
'type' => 'submit',
|
||||||
'decorators' => array('ViewHelper')
|
'value' => mt('monitoring', 'Check now'),
|
||||||
|
'label' => '<img src="'.$iconUrl.'"> ' . mt('monitoring', 'Check now'),
|
||||||
|
'decorators' => array('ViewHelper'),
|
||||||
|
'escape' => false,
|
||||||
|
'class' => 'link-like'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
Loading…
Reference in New Issue