Merge branch 'bugfix/navigation-item-creation-throws-exception-without-scheme-in-url-12890'

fixes #12890
This commit is contained in:
Noah Hilverling 2016-10-28 10:42:23 +02:00
commit e737d591e5
6 changed files with 26 additions and 30 deletions

View File

@ -53,9 +53,27 @@ class NavigationItemForm extends Form
'allowEmpty' => true, 'allowEmpty' => true,
'label' => $this->translate('Url'), 'label' => $this->translate('Url'),
'description' => $this->translate( 'description' => $this->translate(
'The url of this navigation item. Leave blank if you only want the' 'The url of this navigation item. Leave blank if only the name should be displayed.'
. ' name being displayed. For external urls, make sure to prepend' . ' For urls with username and password and for all external urls,'
. ' an appropriate protocol identifier (e.g. http://example.tld)' . ' make sure to prepend an appropriate protocol identifier (e.g. http://example.tld)'
),
'validators' => array(
array(
'Callback',
false,
array(
'callback' => function($url) {
// Matches if the given url contains obviously
// a username but not any protocol identifier
return !preg_match('#^((?=[^/@]).)+@.*$#', $url);
},
'messages' => array(
'callbackValue' => $this->translate(
'Missing protocol identifier'
)
)
)
)
) )
) )
); );

View File

@ -2564,14 +2564,12 @@ msgstr "Der eindeutige Name dieser Ressource"
#: /vagrant/application/forms/Navigation/NavigationItemForm.php:56 #: /vagrant/application/forms/Navigation/NavigationItemForm.php:56
msgid "" msgid ""
"The url of this navigation item. Leave blank if you only want the name being " "The url of this navigation item. Leave blank if only the name should be displayed. For urls with username and password and "
"displayed. For external urls, make sure to prepend an appropriate protocol " "for all external urls, make sure to prepend an appropriate protocol identifier (e.g. http://example.tld)"
"identifier (e.g. http://example.tld)"
msgstr "" msgstr ""
"Die URL dieses Navigationselementes. Dies kann leer gelassen werden, wenn " "Die URL dieses Navigationselementes. Dies kann leer gelassen werden, wenn nur der Name angezeigt werden soll. Stelle für URLs "
"nur der Name angezeigt werden soll. Stellen Sie für externe URLs sicher, " "mit Benutzername und Passwort sowie alle externen URLs sicher, dass eine passender Protokollnamen voran gestellt ist (z.B. "
"dass Sie einen passenden Protokollnamen voran stellen (z.B. http://example." "http://example.tld)"
"tld)"
#: /vagrant/application/forms/Navigation/DashletForm.php:29 #: /vagrant/application/forms/Navigation/DashletForm.php:29
msgid "" msgid ""

View File

@ -2517,16 +2517,6 @@ msgstr "Tipo del backend gruppo utenti"
msgid "The unique name of this resource" msgid "The unique name of this resource"
msgstr "Nome univoco per questa risorsa" msgstr "Nome univoco per questa risorsa"
#: /usr/share/icingaweb2/application/forms/Navigation/NavigationItemForm.php:56
msgid ""
"The url of this navigation item. Leave blank if you only want the name being "
"displayed. For external urls, make sure to prepend an appropriate protocol "
"identifier (e.g. http://example.tld)"
msgstr ""
"La url di questo oggetto di navigazione. Lasciare vuoto se si vuole solo "
"mostrare il nome. Per url esterne ricordare di anteporre l'appropriato "
"identificatore di protocollo (ex. http://esempio.tld)"
#: /usr/share/icingaweb2/application/forms/Navigation/DashletForm.php:29 #: /usr/share/icingaweb2/application/forms/Navigation/DashletForm.php:29
msgid "" msgid ""
"The url to load in the dashlet. For external urls, make sure to prepend an " "The url to load in the dashlet. For external urls, make sure to prepend an "

View File

@ -2417,16 +2417,6 @@ msgstr ""
msgid "The unique name of this resource" msgid "The unique name of this resource"
msgstr "Уникальное название ресурса" msgstr "Уникальное название ресурса"
#: /vagrant/application/forms/Navigation/NavigationItemForm.php:56
msgid ""
"The url of this navigation item. Leave blank if you only want the name being "
"displayed. For external urls, make sure to prepend an appropriate protocol "
"identifier (e.g. http://example.tld)"
msgstr ""
"URL адрес элемента навигации. Оставьте пустым, если необходимо только "
"отображение имени. Для внешних адресов убедитесь, что в начале ссылке указан "
"корректный протокол (например, http://example.tld)"
#: /vagrant/application/forms/Navigation/DashletForm.php:29 #: /vagrant/application/forms/Navigation/DashletForm.php:29
msgid "" msgid ""
"The url to load in the dashlet. For external urls, make sure to prepend an " "The url to load in the dashlet. For external urls, make sure to prepend an "