artabro/wire/modules/Process/ProcessUser/ProcessUser.min.js
2024-08-27 11:35:37 +02:00

1 line
No EOL
882 B
JavaScript

$(document).ready(function(){if($("#Inputfield_id").val()==40){$("#wrap_Inputfield_pass").hide();$("#wrap_Inputfield_email").hide();$("#wrap_Inputfield_roles input").prop("disabled",true)}var $guestRole=$("#Inputfield_roles_37");if($guestRole.length>0&&!$guestRole.is(":checked")){$guestRole.prop("checked",true)}$("#wrap_Inputfield_roles").find("input[type=checkbox]").each(function(){if($.inArray(parseInt($(this).val()),ProcessWire.config.ProcessUser.editableRoles)==-1){$(this).closest("label").addClass("ui-priority-secondary").on("click",function(){var $alert=$(this).find(".ui-state-error-text");if($alert.length==0){$alert=$("<span class='ui-state-error-text'>&nbsp;("+ProcessWire.config.ProcessUser.notEditableAlert+")</span>");$(this).append($alert);setTimeout(function(){$alert.fadeOut("normal",function(){$alert.remove()})},2e3)}else{$alert.remove()}return false})}})});