{"size": 1919, "ext": "js", "max_stars_repo_path": "public/assets/frontend-assest/javascript/forgotPassword.js", "max_stars_repo_name": "vyapaarnetwork/CRM", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/assets/frontend-assest/javascript/forgotPassword.js", "max_issues_repo_name": "vyapaarnetwork/CRM", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/assets/frontend-assest/javascript/forgotPassword.js", "max_forks_repo_name": "vyapaarnetwork/CRM", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.9516129032, "max_line_length": 68, "alphanum_fraction": 0.4544033351}
var spinnerfgp = new jQuerySpinner({
    parentId: 'changePassword'
});
$("#changePassword").validate({
    errorElement: "small",
    errorClass: "text-danger",
    rules: {
        fcpassword: {
            required: true,
            minlength: 8,
        },
        frcpassword: {
            required: true,
            minlength: 8,
            equalTo: "#fcpassword"
        }
    },
    messages:{
        fcpassword: {
            required: "New Password Can Not Be Empty.",
            minlength: "New Password Must Be At Least 8 Characters."
        },
        frcpassword: {
            required: "Password Can Not Be Empty.",
            minlength: "Password Must Be At Least 8 Characters.",
            equalTo: "Enter This Password Same As Password."
        }
    },
    highlight: function (element) {
        $(element).addClass("is-invalid").removeClass('is-valid');
    },
    unhighlight: function (element) {
        $(element).addClass("is-valid").removeClass("is-invalid");
    },
    submitHandler: function (form) {
        spinnerfgp.show();
        $.ajax({
            url: base_url + '/passwordChange',
            type: 'post',
            data: {
                password: $("#fcpassword").val(),
                slug: $('#slug').val()
            },
            success: function (result) {
                var response = $.parseJSON(result);
                if (response.status) {
                    spinnerfgp.hide();
                    window.location.replace(base_url+"?pwdCng=true")
                } else {
                    iziToast.show({
                        theme: 'light',
                        color: 'red',
                        position: 'bottomCenter',
                        title: 'Error',
                        message: response.message,
                    });
                    spinnerfgp.hide();
                }
            }
        });
    }
});