Add URL to service template creation note

This follows the same principle as with hosts where the URL
already is put into. I've found it more convenient to just
click on it and not having to navigate into the services tree :)
This commit is contained in:
Michael Friedrich 2018-10-16 14:53:15 +02:00 committed by Thomas Gelf
parent cb9366c5f5
commit 0d95d5142c
1 changed files with 8 additions and 1 deletions

View File

@ -82,7 +82,14 @@ class IcingaAddServiceForm extends DirectorObjectForm
$this->addError($this->translate('No service has been chosen'));
} else {
if ($this->hasPermission('director/admin')) {
$html = $this->translate('Please define a Service Template first');
$html = sprintf(
$this->translate('Please define a %s first'),
Link::create(
$this->translate('Service Template'),
'director/service/add',
['type' => 'template']
)
);
} else {
$html = $this->translate('No Service Templates have been provided yet');
}