← Back
Editing: upsell.min.js
export default function(t){let r=jQuery,s=new Set(["default","classic"]);return{isLocked(){return["upgrade","license"].includes(t.data.proTier)},isThemeLocked(e){var o=t.getTheme(e);return!(!t.upsell.isLocked()||!o)&&(e=Boolean(t.themes.wpforms[e])&&!s.has(e),Boolean(o.disabled)||!o.settings?.fieldSize||e)},onLockedSectionClick(){var e=r(this).closest(".wpforms-themes-editor-section").data("section")?.replace("_styles",""),o=t.data.strings.pro_sections?.[e]??"";"upgrade"===t.data.proTier?t.upsell.showProModal(e,o):"license"===t.data.proTier&&t.upsell.showLicenseModal(o,o,"pro-section")},maybeDisplayThemeModal(){return"upgrade"===t.data.proTier?(t.upsell.showProModal("themes",t.data.strings.pro_sections?.themes??""),!0):"license"===t.data.proTier&&(t.upsell.showLicenseModal("themes",t.data.strings.pro_sections?.themes??"","select-theme"),!0)},showProModal(t,s){if("undefined"!=typeof WPFormsEducation){let e="pro";var a=wpforms_education.upgrade[e].message_plural.replaceAll("%name%",s);let o={container:"General Container Styles",background:"General Background Styles",themes:"Upgrade to Pro - Themes"};r.alert({backgroundDismiss:!0,title:s+" "+wpforms_education.upgrade[e].title_plural,icon:"fa fa-lock",content:a,boxWidth:"550px",theme:"modern,wpforms-education",closeIcon:!0,onOpenBefore(){this.$btnc.after(`<div class="discount-note">${wpforms_education.upgrade_bonus}</div>`),this.$btnc.after(wpforms_education.upgrade[e].doc.replaceAll("%25name%25","AP - "+s)),this.$body.find(".jconfirm-content").addClass("lite-upgrade")},buttons:{confirm:{text:wpforms_education.upgrade[e].button,btnClass:"btn-confirm",keys:["enter"],action:()=>{window.open(WPFormsEducation.core.getUpgradeURL(o[t],e,"Form Preview"),"_blank"),WPFormsEducation.core.upgradeModalThankYou(e)}}}})}},showLicenseModal(e,o,t){"undefined"!=typeof WPFormsEducation&&WPFormsEducation.proCore.licenseModal(e,o,t)}}}
Save File
Cancel