芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/portpulselogistics.com/Modules/Payments/Entities/PaymentSetting.php
$(".array_boolen_ckeck").each(function(){ var id=$(this).attr("id"); if($(this).is(":checked") == true){ $("."+id).prop( "disabled", false ); $("."+id+"_label").removeClass("label-disabled"); }else{ $("."+id).prop( "disabled", true ); $("."+id+"_label").addClass("label-disabled"); } }); $(".array_boolen_ckeck").on("click", function(){ var id=$(this).attr("id"); if($(this).is(":checked") == true){ $("."+id).prop( "disabled", false ); $("."+id+"_label").removeClass("label-disabled"); conditionier_check(); }else{ $("."+id).prop( "disabled", true ); $("."+id+"_label").addClass("label-disabled"); } }); conditionier_check(); function conditionier_check(){ $(".conditionier").each(function(){ var id=$(this).attr("id"); if(id){ var name=id.replace("fields[","").replace("]",""); var value=$(this).val(); var appear = "if_"+name+"_"+value; $(".if_"+name+" input").prop( "disabled", true ); $(".if_"+name+" select").prop( "disabled", true ); if($(this).is(":disabled") != true){ console.log(appear); $("."+appear+" input").prop( "disabled", false ); $("."+appear+" select").prop( "disabled", false ); $("."+appear).show(); } } }); } $(".conditionier").on("change", function(){ var name=$(this).attr("id").replace("fields[","").replace("]",""); var value=$(this).val(); var appear = "if_"+name+"_"+value; $(".condition_fields.if_"+name).hide(); $(".condition_fields.if_"+name+" input").prop( "disabled", true ); $(".condition_fields.if_"+name+" select").prop( "disabled", true ); $("."+appear).show(); $("."+appear).find("input").prop( "disabled", false ); $("."+appear).find("select").prop( "disabled", false ); }); '; return $scripts; } public static function group(): string { return 'payments'; } public static function encrypted(): array { return [ ]; } }