Merge pull request #4021 from Icinga/fix/monitoring-permissions-not-correctly-displayed-3996
Assist browsers in breaking permission and restriction labels onto multiple lines
This commit is contained in:
commit
f34fb97b39
|
@ -209,7 +209,12 @@ class RoleForm extends RepositoryForm
|
||||||
'autosubmit' => isset($spec['isFullPerm']),
|
'autosubmit' => isset($spec['isFullPerm']),
|
||||||
'disabled' => $hasFullPerm ?: null,
|
'disabled' => $hasFullPerm ?: null,
|
||||||
'value' => $hasFullPerm,
|
'value' => $hasFullPerm,
|
||||||
'label' => isset($spec['label']) ? $spec['label'] : $spec['name'],
|
'label' => preg_replace(
|
||||||
|
// Adds a zero-width char after each slash to help browsers break onto newlines
|
||||||
|
'~(?<!<)/~',
|
||||||
|
'/​',
|
||||||
|
isset($spec['label']) ? $spec['label'] : $spec['name']
|
||||||
|
),
|
||||||
'description' => isset($spec['description']) ? $spec['description'] : $spec['name']
|
'description' => isset($spec['description']) ? $spec['description'] : $spec['name']
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
@ -234,7 +239,12 @@ class RoleForm extends RepositoryForm
|
||||||
'text',
|
'text',
|
||||||
$name,
|
$name,
|
||||||
[
|
[
|
||||||
'label' => isset($spec['label']) ? $spec['label'] : $spec['name'],
|
'label' => preg_replace(
|
||||||
|
// Adds a zero-width char after each slash to help browsers break onto newlines
|
||||||
|
'~(?<!<)/~',
|
||||||
|
'/​',
|
||||||
|
isset($spec['label']) ? $spec['label'] : $spec['name']
|
||||||
|
),
|
||||||
'description' => $spec['description']
|
'description' => $spec['description']
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue