fix(morelevel): level mandatory in proil
This commit is contained in:
parent
ea31b7255d
commit
b9bb605ad2
1
.php-version
Normal file
1
.php-version
Normal file
@ -0,0 +1 @@
|
||||
8.1
|
@ -374,11 +374,19 @@
|
||||
|
||||
function requireniveau() {
|
||||
roles=[];
|
||||
{% if access=="admin" or access=="modo" %}
|
||||
if($("#user_roles_0").is(":checked")) roles.push("ROLE_ADMIN");
|
||||
if($("#user_roles_1").is(":checked")) roles.push("ROLE_MODO");
|
||||
if($("#user_roles_2").is(":checked")) roles.push("ROLE_MASTER");
|
||||
if($("#user_roles_3").is(":checked")) roles.push("ROLE_MANAGER");
|
||||
if($("#user_roles_4").is(":checked")) roles.push("ROLE_USER");
|
||||
{% else %}
|
||||
{% if is_granted('ROLE_ADMIN') %} roles.push("ROLE_ADMIN"); {% endif %}
|
||||
{% if is_granted('ROLE_MODO') %} roles.push("ROLE_MODO"); {% endif %}
|
||||
{% if is_granted('ROLE_MASTER') %} roles.push("ROLE_MASTER"); {% endif %}
|
||||
{% if is_granted('ROLE_MANAGER') %} roles.push("ROLE_MANAGER"); {% endif %}
|
||||
{% if is_granted('ROLE_USER') %} roles.push("ROLE_USER"); {% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if "ALL" in appNiveau02mandatory %}
|
||||
$("#user_niveau02").attr("required","required");
|
||||
|
Loading…
Reference in New Issue
Block a user