parent
19ebdcfb37
commit
bef5eeda93
|
@ -277,12 +277,6 @@ class NavigationController extends Controller
|
||||||
'onSuccess' => function ($form) use ($navigationConfigForm) {
|
'onSuccess' => function ($form) use ($navigationConfigForm) {
|
||||||
try {
|
try {
|
||||||
$navigationConfigForm->unshare($form->getValue('name'));
|
$navigationConfigForm->unshare($form->getValue('name'));
|
||||||
} catch (NotFoundError $e) {
|
|
||||||
throw $e;
|
|
||||||
} catch (Exception $e) {
|
|
||||||
Notification::error($e->getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($navigationConfigForm->save()) {
|
if ($navigationConfigForm->save()) {
|
||||||
Notification::success(sprintf(
|
Notification::success(sprintf(
|
||||||
t('Navigation item "%s" has been unshared'),
|
t('Navigation item "%s" has been unshared'),
|
||||||
|
@ -296,6 +290,11 @@ class NavigationController extends Controller
|
||||||
$form->getValue('name')
|
$form->getValue('name')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
} catch (NotFoundError $e) {
|
||||||
|
throw $e;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
Notification::error($e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
$redirect = $form->getValue('redirect');
|
$redirect = $form->getValue('redirect');
|
||||||
if (! empty($redirect)) {
|
if (! empty($redirect)) {
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
'block',
|
'block',
|
||||||
sprintf(
|
sprintf(
|
||||||
$this->translate(
|
$this->translate(
|
||||||
'This is a child of the navigation item %s. You can'
|
'This is a child of the navigation item %1$s. You can'
|
||||||
. ' only unshare this item by unsharing its parent'
|
. ' only unshare this item by unsharing %1$s'
|
||||||
),
|
),
|
||||||
$item->parent
|
$item->parent
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue