mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
MenuItemForm: Only allow to select _blank and _main as url target
refs #5600
This commit is contained in:
parent
3c7155f246
commit
3f70351239
@ -16,6 +16,11 @@ class MenuItemForm extends NavigationItemForm
|
|||||||
public function createElements(array $formData)
|
public function createElements(array $formData)
|
||||||
{
|
{
|
||||||
parent::createElements($formData);
|
parent::createElements($formData);
|
||||||
|
|
||||||
|
// Remove _self and _next as for menu entries only _main is valid
|
||||||
|
$this->getElement('target')->removeMultiOption('_self');
|
||||||
|
$this->getElement('target')->removeMultiOption('_next');
|
||||||
|
|
||||||
$parentElement = $this->getParent()->getElement('parent');
|
$parentElement = $this->getParent()->getElement('parent');
|
||||||
if ($parentElement !== null) {
|
if ($parentElement !== null) {
|
||||||
$parentElement->setDescription($this->translate(
|
$parentElement->setDescription($this->translate(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user