PageSourceSearch

https://www.vitra.com.tr/_ui/responsive/common/js/custom/acc.eczacibasi.forgotpassword.js

js vitra.com.tr collected 2026-09-24 10:02:15 UTC 2,603 bytes, 72 lines download raw bytes

1ACC.eczacibasiForgotPassword = {
2    el: {
3        page: '.page-forgottenPasswordResetRequestPage',
4        btn: '.js-submit-forgotpassword',
5        result_tab: '.js-forgot-result',
6        result_mail: '.js-result-mail',
7        result_phone: '.js-result-phone',
8        form: '.js-forgot-form',
9    },
10    init: function () {
11        if($(ACC.eczacibasiForgotPassword.el.page).length < 1){
12            return
13        }
14        this.events.forgot_password_submit();
15    },
16    events: {
17        forgot_password_submit: function () {
18            var _forgotpass = ACC.eczacibasiForgotPassword;
19            $(_forgotpass.el.btn).click(function () {
20                var _t = $(this)
21                _forgotpass.methods.forgotpass_submit(_t);
22            })
23        }
24
25    },
26    methods: {
27        forgotpass_submit: function (_t) {
28            var _forgotpass = ACC.eczacibasiForgotPassword;
29            var _misc = ACC.eczacibasiMisc;
30            var _form = _t.closest('form');
31            var _phone = _form.find('input[name="phoneNumber"]').val();
32            var _mail = _form.find('input[name="email"]').val();
33            var _usePhone = _form.find('input[name="usePhone"]:checked').val();
34
35            if(_misc.captcha.isActive()){
36                if(!_misc.captcha.isValid()){
37                    return;
38                }
39            }
40            ACC.eczacibasiMisc.loading.start();
41            var url = _form.attr('action');
42            ACC.eczacibasiUpdate.services.sendForm(url, _form).promise().done(function (res) {
43                if (res.success == true) {
44                    if(_usePhone == 'true'){
45                        $(_forgotpass.el.result_phone).html($(_forgotpass.el.result_phone).text().replace("{0}", _phone));
46                        $(_forgotpass.el.result_phone).show();
47                    }
48                    else{
49                        $(_forgotpass.el.result_mail).html($(_forgotpass.el.result_mail).text().replace("{0}", _mail));
50                        $(_forgotpass.el.result_mail).show();
51                    }
52                    $(_forgotpass.el.form).hide();
53                    $(_forgotpass.el.result_tab).show();
54                }
55                ACC.eczacibasiMisc.loading.end();
56            }).fail(function () {
57                ACC.eczacibasiMisc.loading.end();
58            });
59        },
60    },
61    services: {
62        sendForm: function (url, form) {
63            return ACC.eczacibasiApiService.postBindingResult(url, form);
64        }
65    }
66};
67
68$(document).ready(function () {
69    with (ACC.eczacibasiForgotPassword) {
70        init();
71    }
72})

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.