Sha256: 44a4b80fd59c3e95c830ae14a6ccaebb73258336790629dd11caac2782ac830f

Contents?: true

Size: 1.51 KB

Versions: 11

Compression:

Stored size: 1.51 KB

Contents

"use strict";var KTModalUpgradePlan=function(){var t,n,e,a,i=function(n){[].slice.call(t.querySelectorAll("[data-kt-plan-price-month]")).map((function(t){var e=t.getAttribute("data-kt-plan-price-month"),a=t.getAttribute("data-kt-plan-price-annual");"month"===n?t.innerHTML=e:"annual"===n&&(t.innerHTML=a)}))};return{init:function(){(t=document.querySelector("#kt_modal_upgrade_plan"))&&(n=t.querySelector('[data-kt-plan="month"]'),e=t.querySelector('[data-kt-plan="annual"]'),a=document.querySelector("#kt_modal_upgrade_plan_btn"),n.addEventListener("click",(function(t){t.preventDefault(),n.classList.add("active"),e.classList.remove("active"),i("month")})),e.addEventListener("click",(function(t){t.preventDefault(),n.classList.remove("active"),e.classList.add("active"),i("annual")})),a&&a.addEventListener("click",(function(n){n.preventDefault();var e=this;swal.fire({text:"Are you sure you would like to upgrade to selected plan ?",icon:"warning",buttonsStyling:!1,showDenyButton:!0,confirmButtonText:"Yes",denyButtonText:"No",customClass:{confirmButton:"btn btn-primary",denyButton:"btn btn-light-danger"}}).then((n=>{n.isConfirmed&&(e.setAttribute("data-kt-indicator","on"),e.disabled=!0,setTimeout((function(){Swal.fire({text:"Your subscription plan has been successfully upgraded",icon:"success",confirmButtonText:"Ok",buttonsStyling:!1,customClass:{confirmButton:"btn btn-light-primary"}}).then((n=>{bootstrap.Modal.getInstance(t).hide()}))}),2e3))}))})),i())}}}();KTUtil.onDOMContentLoaded((function(){KTModalUpgradePlan.init()}));

Version data entries

11 entries across 5 versions & 1 rubygems

Version Path
phcthemes_admin_panel_pack-7.0.0 app/assets/dist/themes/metronic/theme27/js/custom/utilities/modals/upgrade-plan.js
phcthemes_admin_panel_pack-6.0.3 app/assets/dist/themes/metronic/theme13/js/custom/utilities/modals/upgrade-plan.js
phcthemes_admin_panel_pack-6.0.3 app/assets/dist/themes/metronic/theme21/js/custom/utilities/modals/upgrade-plan.js
phcthemes_admin_panel_pack-6.0.2 app/assets/dist/themes/metronic/theme13/js/custom/utilities/modals/upgrade-plan.js
phcthemes_admin_panel_pack-6.0.2 app/assets/dist/themes/metronic/theme21/js/custom/utilities/modals/upgrade-plan.js
phcthemes_admin_panel_pack-6.0.2 app/assets/dist/themes/metronic/theme27/js/custom/utilities/modals/upgrade-plan.js
phcthemes_admin_panel_pack-6.0.1 app/assets/dist/themes/metronic/theme13/js/custom/utilities/modals/upgrade-plan.js
phcthemes_admin_panel_pack-6.0.1 app/assets/dist/themes/metronic/theme21/js/custom/utilities/modals/upgrade-plan.js
phcthemes_admin_panel_pack-6.0.1 app/assets/dist/themes/metronic/theme27/js/custom/utilities/modals/upgrade-plan.js
phcthemes_admin_panel_pack-6.0.0 app/assets/dist/themes/metronic/theme_21/js/custom/utilities/modals/upgrade-plan.js
phcthemes_admin_panel_pack-6.0.0 app/assets/dist/themes/metronic/theme_13/js/custom/utilities/modals/upgrade-plan.js