Файловый менеджер - Редактировать - /home/elecjxjk/tumaninvestigators.com/wp-content/plugins/wpforms-lite/assets/js/admin/builder/admin-builder-providers.min.js
Назад
!function(c){var s,a={settings:{spinner:'<i class="wpforms-loading-spinner wpforms-loading-inline"></i>',spinnerWhite:'<i class="wpforms-loading-spinner wpforms-loading-inline wpforms-loading-white"></i>'},init:function(){s=this.settings,c(a.ready),a.bindUIActions()},ready:function(){s.form=c("#wpforms-builder-form")},bindUIActions:function(){c(document).on("click",".wpforms-provider-connection-delete",function(e){a.connectionDelete(this,e)}),c(document).on("click",".wpforms-provider-connections-add",function(e){a.connectionAdd(this,e)}),c(document).on("click",".wpforms-provider-account-add button",function(e){a.accountAdd(this,e)}),c(document).on("change",".wpforms-provider-accounts select",function(e){a.accountSelect(this,e)}),c(document).on("change",".wpforms-provider-lists select",function(e){a.accountListSelect(this,e)}),c(document).on("wpformsPanelSwitch",function(e,o){a.providerPanelConfirm(o)}),c(document).on("wpformsSaved",function(){var r=[],e=c("#wpforms-panel-providers").find(".wpforms-connection-block");e.length&&e.each(function(){var e,o,n=!1;c(this).find("table span.required").each(function(){""===c(this).parent().parent().find("select").val()&&(n=!0)}),n&&((e=c(this).closest(".wpforms-panel-content-section").find(".wpforms-panel-content-section-title").clone()).find("button").remove(),e=e.text().trim(),o=wpforms_builder.provider_required_flds,-1<r.indexOf(e)||(c.alert({title:wpforms_builder.heads_up,content:o.replace("{provider}",e),icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"]}}}),r.push(e)))})})},connectionDelete:function(e,o){o.preventDefault();var n=c(e);c.confirm({title:!1,content:wpforms_builder_providers.confirm_connection,icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"],action:function(){var e=n.closest(".wpforms-panel-content-section"),o=(n.closest(".wpforms-provider-connection").remove(),n.closest(".wpforms-provider-connection").data("provider"));c(".wpforms-panel-sidebar-section-"+o).find(".fa-check-circle-o").toggleClass("wpforms-hidden",c(e).find(".wpforms-provider-connection").length<=0),e.find(".wpforms-provider-connection").length||e.find(".wpforms-builder-provider-connections-default").removeClass("wpforms-hidden")}},cancel:{text:wpforms_builder.cancel}}})},connectionAdd:function(e,o){o.preventDefault();var n=c(e),r=n.parent().parent(),i=n.parent(),t=n.data("provider"),o=n.data("type"),e=(e=wpforms_builder_providers.prompt_connection+('<input autofocus="" type="text" id="provider-connection-name" placeholder="'+wpforms_builder_providers.prompt_placeholder+'">')+('<p class="error">'+wpforms_builder_providers.error_name+"</p>")).replace(/%type%/g,o);c.confirm({title:!1,content:e,icon:"fa fa-info-circle",type:"blue",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"],action:function(){var e=this.$content.find("input#provider-connection-name").val().trim(),o=this.$content.find(".error");if(""===e)return o.show(),!1;a.inputToggle(n,"disable");o={action:"wpforms_provider_ajax_"+t,provider:t,task:"new_connection",name:e,id:s.form.data("id"),nonce:wpforms_builder.nonce};a.fireAJAX(n,o,function(e){var o;e.success?(r.find(".wpforms-builder-provider-connections-default").addClass("wpforms-hidden"),r.find(".wpforms-provider-connections").prepend(e.data.html),(o=r.find(".wpforms-provider-connection").first()).find(".wpforms-provider-accounts option:selected")&&(o.find(".wpforms-provider-accounts option").first().prop("selected",!0),o.find(".wpforms-provider-accounts select").trigger("change"))):a.errorDisplay(e.data.error,i)})}},cancel:{text:wpforms_builder.cancel}}})},accountAdd:function(e,o){o.preventDefault();var o=c(e),e=o.data("provider"),n=o.closest(".wpforms-provider-connection"),r=o.parent(),i=r.find(":input"),t=a.requiredCheck(i,r);if(a.inputToggle(o,"disable"),t)return o.prop("disabled",!1).find("i").remove(),!1;t={action:"wpforms_provider_ajax_"+e,provider:e,connection_id:n.data("connection_id"),task:"new_account",data:a.fakeSerialize(i)};a.fireAJAX(o,t,function(e){e.success?(r.nextAll(".wpforms-connection-block").remove(),r.nextAll(".wpforms-conditional-block").remove(),r.after(e.data.html),r.slideUp(),n.find(".wpforms-provider-accounts select").trigger("change")):a.errorDisplay(e.data.error,r)})},accountSelect:function(e,o){o.preventDefault();var o=c(e),n=o.closest(".wpforms-provider-connection"),r=o.parent(),e=n.data("provider");a.inputToggle(o,"disable"),r.nextAll(".wpforms-connection-block").remove(),r.nextAll(".wpforms-conditional-block").remove(),o.val()?(n.find(".wpforms-provider-account-add").slideUp(),e={action:"wpforms_provider_ajax_"+e,provider:e,connection_id:n.data("connection_id"),task:"select_account",account_id:o.find(":selected").val()},a.fireAJAX(o,e,function(e){e.success?(r.after(e.data.html),n.find(".wpforms-provider-lists option").first().prop("selected",!0),n.find(".wpforms-provider-lists select").trigger("change")):a.errorDisplay(e.data.error,r)})):(n.find(".wpforms-provider-account-add input").val(""),n.find(".wpforms-provider-account-add").slideDown(),a.inputToggle(o,"enable"))},accountListSelect:function(e,o){o.preventDefault();var o=c(e),e=o.closest(".wpforms-provider-connection"),n=o.parent(),r=e.data("provider"),r=(a.inputToggle(o,"disable"),n.nextAll(".wpforms-connection-block").remove(),n.nextAll(".wpforms-conditional-block").remove(),{action:"wpforms_provider_ajax_"+r,provider:r,connection_id:e.data("connection_id"),task:"select_list",account_id:e.find(".wpforms-provider-accounts option:selected").val(),list_id:o.find(":selected").val(),form_id:s.form.data("id")});a.fireAJAX(o,r,function(e){e.success?(n.after(e.data.html),wpf.initTooltips()):a.errorDisplay(e.data.error,n)})},providerPanelConfirm:function(e){wpforms_panel_switch=!0,"providers"!==e||s.form.data("revision")||wpf.savedState!=wpf.getFormState("#wpforms-builder-form")&&(wpforms_panel_switch=!1,c.confirm({title:!1,content:wpforms_builder_providers.confirm_save,icon:"fa fa-info-circle",type:"blue",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"],action:function(){c("#wpforms-save").trigger("click"),c(document).on("wpformsSaved",function(){window.location.href=wpforms_builder_providers.url})}},cancel:{text:wpforms_builder.cancel}}}))},fireAJAX:function(e,o,n){var r=c(e),e={id:c("#wpforms-builder-form").data("id"),nonce:wpforms_builder.nonce};c.extend(e,o),c.post(wpforms_builder.ajax_url,e,function(e){n(e),a.inputToggle(r,"enable")}).fail(function(e,o,n){console.log(e.responseText)})},inputToggle:function(e,o){e=c(e);"enable"===o?(e.is("select")?e.prop("disabled",!1).next("i"):e.prop("disabled",!1).find("i")).remove():"disable"===o&&(e.is("select")?e.prop("disabled",!0).after(s.spinner):e.prop("disabled",!0).prepend(s.spinnerWhite))},errorDisplay:function(e,o){o.find(".wpforms-error-msg").remove(),o.prepend('<p class="wpforms-alert-danger wpforms-alert wpforms-error-msg">'+e+"</p>")},requiredCheck:function(e,o){var n=!1;return o.find(".wpforms-alert-required").remove(),e.each(function(e,o){c(o).hasClass("wpforms-required")&&0===c(o).val().length?(c(o).addClass("wpforms-error"),n=!0):c(o).removeClass("wpforms-error")}),n&&o.prepend('<p class="wpforms-alert-danger wpforms-alert wpforms-alert-required">'+wpforms_builder_providers.required_field+"</p>"),n},fakeSerialize:function(e){e=e.clone();return e.each(function(e,o){c(o).data("name")&&c(o).attr("name",c(o).data("name"))}),e.serialize()}};a.init()}(jQuery);
| ver. 1.4 |
Github
|
.
| PHP 8.1.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка