RoleForm: Show a header for permissions and restrictions

This commit is contained in:
Johannes Meyer 2019-07-24 13:22:01 +02:00
parent 616f1fe2c8
commit 5a10b06200
1 changed files with 10 additions and 1 deletions

View File

@ -174,7 +174,11 @@ class RoleForm extends RepositoryForm
foreach ($this->providedPermissions as $moduleName => $permissionList) {
$this->sortPermissions($permissionList);
$elements = [];
$elements = ['permission_header'];
$this->addElement('note', 'permission_header', [
'value' => '<h3>' . $this->translate('Permissions') . '</h3>'
]);
$hasFullPerm = false;
foreach ($permissionList as $name => $spec) {
$elements[] = $name;
@ -199,6 +203,11 @@ class RoleForm extends RepositoryForm
}
if (isset($this->providedRestrictions[$moduleName])) {
$elements[] = 'restriction_header';
$this->addElement('note', 'restriction_header', [
'value' => '<h3>' . $this->translate('Restrictions') . '</h3>'
]);
foreach ($this->providedRestrictions[$moduleName] as $name => $spec) {
$elements[] = $name;
$this->addElement(