Current File : /home/inlingua/www/crm/ninexb/wp-content/plugins/ultimate-member/assets/js/admin/security.min.js
jQuery(document).ready(function(){const n=jQuery(".um-secure-scan-results"),t=jQuery(".um-secure-scan-content"),e=jQuery("input[data-field_id^='banned_capabilities']");var c={init:function(){n.css({"margin-top":"10px",padding:"10px","padding-bottom":"10px","background-color":"#fff",display:"block","max-height":"200px",height:"500px","overflow-y":"scroll"}),t.on("click",function(e){c.effect(),e.preventDefault(),jQuery(this).prop("disabled",!0),n.empty(),c.log(wp.i18n.__("Scanning site..","ultimate-member")),c.ajax("")}),e.on("change",function(){t.after(' <small style="color: red;">'+wp.i18n.__("You can start the scan now but you must save the settings to apply the selected capabilities after the scan is complete.","ultimate-member")+"</small>"),e.off("change")})},ajax:function(e){let a=[];n.parents(".um-form-table").find('input[type="checkbox"][data-field_id^="banned_capabilities_"]:checked').each(function(){a.push(jQuery(this).data("field_id").replace("banned_capabilities_",""))});e={nonce:um_admin_scripts.nonce,capabilities:a,last_scanned_capability:e};wp.ajax.send("um_secure_scan_affected_users",{data:e,success:function(e){e.completed?e.completed&&(n.empty(),c.log(e.recommendations),n.find(".current").removeClass("current"),t.prop("disabled",!1)):(c.ajax(e.last_scanned_capability),c.log(e.message))}})},log:function(e){n.find(".current").removeClass("current"),n.append('<span class="current">'+e+"</span><br/>")},effect:function(){setInterval(function(){n.find(".current").fadeTo(100,.1).fadeTo(200,1)},1e3)}};c.init()});