Файловый менеджер - Редактировать - /home/harasnat/www/labour/wp-content/plugins/wpforms-lite/assets/js/integrations/stripe/admin-builder-modern-stripe.min.js
Назад
var WPFormsStripeModernBuilder=window.WPFormsStripeModernBuilder||((e,r)=>{let i={},s={init(){r(s.ready)},ready(){var e,t,n;s.customMetadataActions(),s.isLegacySettings()||(i={$alert:r("#wpforms-stripe-credit-card-alert"),$panelContent:r("#wpforms-panel-content-section-payment-stripe"),$feeNotice:r(".wpforms-stripe-notice-info")},s.bindUIActions(),s.bindPlanUIActions(),wpforms_builder_stripe.is_pro)||(n=(e=".wpforms-panel-content-section-stripe")+" .wpforms-panel-content-section-payment-plan-name input",r(t=e+" .wpforms-panel-content-section-payment-toggle input").each(WPFormsBuilderPaymentsUtils.toggleContent),r(n).each(WPFormsBuilderPaymentsUtils.checkPlanName),r("#wpforms-panel-payments").on("click",t,WPFormsBuilderPaymentsUtils.toggleContent).on("click",e+" .wpforms-panel-content-section-payment-plan-head-buttons-toggle",WPFormsBuilderPaymentsUtils.togglePlan).on("click",e+" .wpforms-panel-content-section-payment-plan-head-buttons-delete",WPFormsBuilderPaymentsUtils.deletePlan).on("input",n,WPFormsBuilderPaymentsUtils.renamePlan).on("focusout",n,WPFormsBuilderPaymentsUtils.checkPlanName))},customMetadataActions(){r("#wpforms-panel-payments").on("focusout",".wpforms-panel-field-stripe-custom-metadata-meta-key",function(){r(this).val(r(this).val().replace(/[^\p{L}\p{N}_-]/gu,""))}).on("click",".wpforms-panel-content-section-stripe-custom-metadata-add",function(e){e.preventDefault();var e=r(this).parents(".wpforms-panel-content-section-stripe-custom-metadata-table"),t=e.find("tr").last(),n=t.clone(!0),t=t.data("key"),i=t+1;n.attr("data-key",i),n.html(n.html().replaceAll("["+t+"]","["+i+"]").replaceAll("-"+t+"-","-"+i+"-")),n.find("select, input").val(""),n.find(".wpforms-panel-content-section-stripe-custom-metadata-delete").removeClass("hidden"),e.find("tbody").append(n.get(0))}).on("click",".wpforms-panel-content-section-stripe-custom-metadata-delete",function(e){e.preventDefault(),r(this).parents(".wpforms-panel-content-section-stripe-custom-metadata-table tr").remove()})},bindUIActions(){r("#wpforms-builder").on("wpformsFieldDelete",s.disableNotifications).on("wpformsSaved",s.requiredFieldsCheck).on("wpformsFieldAdd",s.fieldAdded).on("wpformsFieldDelete",s.fieldDeleted).on("wpformsPaymentsPlanCreated",s.toggleMultiplePlansWarning).on("wpformsPaymentsPlanCreated",s.bindPlanUIActions).on("wpformsPaymentsPlanDeleted",s.toggleMultiplePlansWarning)},bindPlanUIActions(){i.$panelContent.find('.wpforms-panel-content-section-payment-plan-body .wpforms-panel-field-select select[name*="email"]').on("change",s.resetEmailAlertErrorClass)},requiredFieldsCheck(){if(r("#wpforms-panel-field-stripe-enable_recurring").is(":checked")&&!i.$panelContent.hasClass("wpforms-hidden")){let t=!1;i.$panelContent.find(".wpforms-panel-content-section-payment-plan").each(function(){var e=r(this).data("plan-id"),e=r(`#wpforms-panel-field-stripe-recurring-${e}-email`);e.val()||(e.addClass("wpforms-required-field-error"),t=!0)}),t&&s.recurringEmailAlert()}},resetEmailAlertErrorClass(){r(this).toggleClass("wpforms-required-field-error",!r(this).val())},recurringEmailAlert(){let e=wpforms_builder.stripe_recurring_email;r(".wpforms-panel-content-section-stripe").is(":visible")||(e+=" "+wpforms_builder.stripe_recurring_settings),r.alert({title:wpforms_builder.stripe_recurring_heading,content:e,icon:"fa fa-exclamation-circle",type:"red",buttons:{confirm:{text:wpforms_builder.ok,btnClass:"btn-confirm",keys:["enter"]}},onOpen(){r(".wpforms-stripe-settings-redirect").on("click",s.settingsRedirect)}})},settingsRedirect(){r(".wpforms-panel-payments-button").trigger("click"),r(".wpforms-panel-sidebar-section-stripe").trigger("click"),e.location.href=e.location.pathname+e.location.search+"#wpforms-panel-field-stripe-enable_recurring-wrap",r(this).closest(".jconfirm-box").find(".btn-confirm").trigger("click")},disableNotifications(e,t,n){s.isStripeField(n)&&!s.hasStripeCreditCardFieldInBuilder()&&((n=r('.wpforms-panel-content-section-notifications [id*="-stripe-wrap"]')).find('input[id*="-stripe"]').prop("checked",!1),n.addClass("wpforms-hidden"))},isLegacySettings(){return r("#wpforms-panel-field-stripe-enable").length},fieldAdded(e,t,n){s.isStripeField(n)&&s.hasStripeCreditCardFieldInBuilder()&&(s.settingsToggle(!0),i.$feeNotice.toggleClass("wpforms-hidden"))},fieldDeleted(e,t,n){!s.isStripeField(n)||s.hasStripeCreditCardFieldInBuilder()||(s.settingsToggle(!1),s.disablePayments(),i.$feeNotice.toggleClass("wpforms-hidden"))},isStripeField(e){return e===wpforms_builder_stripe.field_slug},hasStripeCreditCardFieldInBuilder(){return 0<r(".wpforms-field.wpforms-field-"+wpforms_builder_stripe.field_slug).length},toggleMultiplePlansWarning(){i.$panelContent.find(".wpforms-stripe-multiple-plans-warning").toggleClass("wpforms-hidden",1===i.$panelContent.find(".wpforms-panel-content-section-payment-plan").length)},settingsToggle(e){(i.$alert.length||i.$panelContent.length)&&(i.$alert.toggleClass("wpforms-hidden",e),i.$panelContent.toggleClass("wpforms-hidden",!e))},toggleContent(){console.warn('WARNING! Function "WPFormsStripeModernBuilder.toggleContent()" has been deprecated, please use the new "WPFormsPaymentsUtils.toggleContent()" function instead!'),WPFormsBuilderPaymentsUtils.toggleContent()},togglePlan(){console.warn('WARNING! Function "WPFormsStripeModernBuilder.togglePlan()" has been deprecated, please use the new "WPFormsPaymentsUtils.togglePlan()" function instead!'),WPFormsBuilderPaymentsUtils.togglePlan()},deletePlan(){console.warn('WARNING! Function "WPFormsStripeModernBuilder.checkPlanName()" has been deprecated, please use the new "WPFormsPaymentsUtils.deletePlan()" function instead!'),WPFormsBuilderPaymentsUtils.deletePlan()},checkPlanName(){console.warn('WARNING! Function "WPFormsStripeModernBuilder.checkPlanName()" has been deprecated, please use the new "WPFormsPaymentsUtils.checkPlanName()" function instead!'),WPFormsBuilderPaymentsUtils.checkPlanName()},renamePlan(){console.warn('WARNING! Function "WPFormsStripeModernBuilder.renamePlan()" has been deprecated, please use the new "WPFormsPaymentsUtils.renamePlan()" function instead!'),WPFormsBuilderPaymentsUtils.renamePlan()},disablePayments(){r("#wpforms-panel-field-stripe-enable_one_time, #wpforms-panel-field-stripe-enable_recurring").prop("checked",!1).trigger("change").each(WPFormsBuilderPaymentsUtils.toggleContent)}};return s})((document,window),jQuery);WPFormsStripeModernBuilder.init();
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка