RoleForm: Add zero-width char after each `/` in permission and restriction labels
Helps browsers break onto newlines if it's too narrow.
This commit is contained in:
parent
f5dc25b5c7
commit
e2bcdd365a
|
@ -209,7 +209,12 @@ class RoleForm extends RepositoryForm
|
|||
'autosubmit' => isset($spec['isFullPerm']),
|
||||
'disabled' => $hasFullPerm ?: null,
|
||||
'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']
|
||||
]
|
||||
)
|
||||
|
@ -234,7 +239,12 @@ class RoleForm extends RepositoryForm
|
|||
'text',
|
||||
$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']
|
||||
]
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue