praiadeseselle/wire/modules/Process/ProcessUser/ProcessUser.min.js

1 line
877 B
JavaScript
Raw Permalink Normal View History

2022-03-08 15:55:41 +01:00
$(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").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})}})});