Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/clinic.corals.io/public/assets/front/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/clinic.corals.io/public/assets/front/js/plugins.subscribe.js
window.scwSubscribeFormPlugin = window.scwSubscribeFormPlugin || {};

window.SEMICOLON_subscribeFormInit = function ($subscribeForm) {

    $subscribeForm = $subscribeForm.filter(':not(.customjs)');

    if ($subscribeForm.length < 1) {
        return true;
    }

    $subscribeForm.each(function () {
        let element = $(this),
            elAlert = element.attr('data-alert-type'),
            elLoader = element.attr('data-loader'),
            elResult = element.find('.widget-subscribe-form-result'),
            elRedirect = element.attr('data-redirect'),
            defButton, defButtonText, alertType;

        element.find('form').validate({
            submitHandler: function (form) {

                elResult.hide();

                if (elLoader == 'button') {
                    defButton = $(form).find('button');
                    defButtonText = defButton.html();

                    defButton.html(
                        '<i class="icon-line-loader icon-spin nomargin"></i>');
                } else {
                    $(form).
                        find('.icon-email2').
                        removeClass('icon-email2').
                        addClass('icon-line-loader icon-spin');
                }

                $(form).ajaxSubmit({
                    target: elResult,
                    dataType: 'json',
                    resetForm: true,
                    success: function (data) {
                        if (elLoader == 'button') {
                            defButton.html(defButtonText);
                        } else {
                            $(form).
                                find('.icon-line-loader').
                                removeClass('icon-line-loader icon-spin').
                                addClass('icon-email2');
                        }
                        if (data.alert != 'error' && elRedirect) {
                            window.location.replace(elRedirect);
                            return true;
                        }
                        if (elAlert == 'inline') {
                            if (data.alert == 'error') {
                                alertType = 'alert-danger';
                            } else {
                                alertType = 'alert-success';
                            }

                            elResult.addClass('alert ' + alertType).
                                html(data.message).
                                slideDown(400);
                        } else {
                            elResult.attr('data-notify-type', data.alert).
                                attr('data-notify-msg', data.message).
                                html('');
                            SEMICOLON.widget.notifications({ el: elResult });
                        }
                    },
                });
            },
        });

    });

};


Spamworldpro Mini