mirror of https://gitgud.io/fatchan/jschan.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
916 B
14 lines
916 B
for bit, index in Object.keys(jsonPermissions).filter(p => manageBoardBits.includes(parseInt(p)))
|
|
if jsonPermissions[bit].title && index > 0
|
|
hr(size=1)
|
|
h4.mv-5 #{__(jsonPermissions[bit].title)}
|
|
if jsonPermissions[bit].subtitle
|
|
p #{__(jsonPermissions[bit].subtitle)}
|
|
.row
|
|
- const parentAllowed = jsonPermissions[bit].parent == null || permissions.get(jsonPermissions[bit].parent);
|
|
- const parentLabel = !parentAllowed ? jsonPermissions[jsonPermissions[bit].parent].label : '';
|
|
label.postform-style.ph-5(class=(!parentAllowed ? 'notallowed' : null) title=(!parentAllowed ? __(`Requires permission "${parentLabel}"`) : null))
|
|
input(type='checkbox' name=`permission_bit_${bit}` value=bit checked=jsonPermissions[bit].state disabled=(!parentAllowed || jsonPermissions[bit].block))
|
|
.rlabel #{__(jsonPermissions[bit].label)}
|
|
p #{__(jsonPermissions[bit].desc)}
|
|
input(type='submit', value=__('Save'))
|
|
|