UserGroupForm: Fix redirect when renaming a group

refs #8826
This commit is contained in:
Johannes Meyer 2015-05-22 17:03:02 +02:00
parent 18e413d15a
commit f3124ffd59
1 changed files with 18 additions and 0 deletions

View File

@ -33,6 +33,24 @@ class UserGroupForm extends RepositoryForm
}
}
/**
* Update a group
*
* @return bool
*/
protected function onUpdateSuccess()
{
if (parent::onUpdateSuccess()) {
if (($newName = $this->getValue('group_name')) !== $this->getIdentifier()) {
$this->getRedirectUrl()->setParam('group', $newName);
}
return true;
}
return false;
}
/**
* Create and add elements to this form to delete a group
*