RoleForm: Replace static inline styles with css class

The static inline style for resetriction text element is replaced with css class `role-restriction-text`
to avoid Content-Security-Policy violations.
This commit is contained in:
raviks789 2023-08-17 12:22:34 +02:00
parent afd2a65df6
commit 4e8107c231
2 changed files with 5 additions and 1 deletions

View File

@ -262,7 +262,7 @@ class RoleForm extends RepositoryForm
PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY
)))),
'description' => $spec['description'],
'style' => $isUnrestricted ? 'text-decoration:line-through;' : '',
'class' => $isUnrestricted ? 'unrestricted-role' : '',
'readonly' => $isUnrestricted ?: null
]
)

View File

@ -269,6 +269,10 @@ form.role-form {
font-style: normal;
}
.unrestricted-role {
text-decoration: line-through;
}
.control-label > * {
display: inline-block;
}