PageSourceSearch

https://site.smol.ink/wp-content/plugins/e-signature/add-ons/secon…/assets/js/esig-slv-dashboard.js?ver=2.1.6

js smol.ink collected 2026-10-10 02:12:38 UTC 9,281 bytes, 257 lines download raw bytes

1
2(function ($) {
3
4    var validationMessage = {
5        "esig-email-address": "Invalid e-mail address. Please input valid e-mail adddress.",
6        "esig-access-code": "Invalid Access Code/Password.",
7        "esig-slv-password": "Please enter your password",
8        "esig-slv-confirm-password": "Please enter your confirm password"
9    };
10 
11    // email address validation with on focusout. 
12    wpEsig("#esig-email-address").on("focusout",function(){
13
14        var emailAdress = wpEsig("#esig-email-address").value();
15           
16        // check for valid email address
17        if (!esig_validation.is_email(emailAdress))
18        {
19            wpEsig("#esig-email-address").insertAfterValidationMsg(validationMessage["esig-email-address"], true);
20        }
21        else 
22        {
23            wpEsig("#esig-show-error").hide();
24            wpEsig("#esig-email-address").removeValidationMsg(true);
25        }
26
27    });
28
29    // validate access code on focusout event 
30    wpEsig("#esig-access-code").on("focusout", function(){
31
32        var accessCode = wpEsig("#esig-access-code").value(); 
33        // check access code is fresh string 
34        if (!esig_validation.is_string(accessCode)) 
35        { 
36            wpEsig("#esig-access-code").insertAfterValidationMsg(validationMessage["esig-access-code"], true);
37        }
38        else
39        {
40            wpEsig("#esig-show-error").hide();
41            wpEsig("#esig-access-code").removeValidationMsg(true);
42        }
43
44    });
45
46    /************ populate login ****************/
47    $("#esig-access-code-login").click(function (e) {
48        
49        
50
51        var fieldList = document.querySelectorAll("#esig-login-form input");
52        
53        var validationResult = esigValidateInputs(fieldList,validationMessage);
54
55        if(validationResult)
56        {
57            return false; 
58        }
59        
60        // checking valid access code input 
61        var data = {
62            "esig_email_address": wpEsig("#esig-email-address").value(),
63            "esig_access_code": wpEsig("#esig-access-code").value(),
64            "invite_hash": $("#esig-invite-hash").val(),
65            "checksum": $("#esig-document-checksum").val(),
66            "sender_name": $("#esig-document-sender_name").val(),
67            "esig_nonce": esigAjax.esig_ajax_nonce
68        };
69        
70        $.post(esigAjax.ajax_url + "?action=esig_verify_access_code", data).done(function (response) {
71
72            if (response == "verified") {
73                // Add a timestamp to force cache bypass
74                window.location.href = window.location.href.split('?')[0] + window.location.search + (window.location.search ? '&' : '?') + '_t=' + new Date().getTime();
75            } else if (response == "display") {
76                $("#esig-login-form").hide();
77                $("#esig-password-set-form").show();
78            } else {
79                wpEsig("#esig-show-error").show();
80                wpEsig("#esig-show-error").html(response);
81            }
82
83        });
84
85        // alert();
86
87    });
88
89    /**
90     *  Adding password focust out event 
91     */
92    // validate access code on focusout event 
93    wpEsig("#esig-slv-password").on("focusout", function () {
94
95        var password = wpEsig("#esig-slv-password").value();
96        // check access code is fresh string 
97        if (!esig_validation.is_string(password)) {
98            wpEsig("#esig-slv-password").insertAfterValidationMsg(validationMessage["esig-slv-password"], true);
99        }
100        else if (esigHasWhiteSpace(password)) {
101            wpEsig("#esig-slv-password").insertAfterValidationMsg("White space is not allowed", true);
102            return false;
103        }
104        else {
105            wpEsig("#esig-show-error").hide();
106            wpEsig("#esig-slv-password").removeValidationMsg(true);
107        }
108
109    });
110
111    /**
112     *  Adding confirm password focust out event to validate its input  
113     */
114    // validate access code on focusout event 
115    wpEsig("#esig-slv-confirm-password").on("focusout", function () {
116
117        var password = wpEsig("#esig-slv-confirm-password").value();
118        // check access code is fresh string 
119        if (!esig_validation.is_string(password)) {
120            wpEsig("#esig-slv-confirm-password").insertAfterValidationMsg(validationMessage["esig-slv-confirm-password"], true);
121        }
122        else if (esigHasWhiteSpace(password)) {
123            wpEsig("#esig-slv-confirm-password").insertAfterValidationMsg("White space is not allowed", true);
124            return false;
125        }
126        else {
127            wpEsig("#esig-show-error").hide();
128            wpEsig("#esig-slv-confirm-password").removeValidationMsg(true);
129        }
130
131    });
132
133    // setting password 
134    $("#esig-slv-set-password").click(function () {
135
136        // checking valid access code input 
137
138        var fieldList = document.querySelectorAll("#esig-password-set-form input");
139
140        var validationResult = esigValidateInputs(fieldList, validationMessage);
141
142        if (validationResult) 
143        {
144            return false;
145        }
146
147        var password = $("#esig-slv-password").val();
148        var confirmPassword = $("#esig-slv-confirm-password").val(); 
149
150        if (esigHasWhiteSpace(password)) 
151        {
152            wpEsig("#esig-slv-password").insertAfterValidationMsg("White space is not allowed", true);
153            return false;
154        }
155
156        if (esigHasWhiteSpace(confirmPassword)) {
157            wpEsig("#esig-slv-confirm-password").insertAfterValidationMsg("White space is not allowed", true);
158            return false;
159        }
160
161        if (password !== confirmPassword) 
162        {
163            wpEsig("#esig-set-error").show();
164            wpEsig("#esig-set-error").html("<span class='esig-icon-esig-alert'></span><span class='error-msg' id='error-access-code'>The Password do not match. Thats OK though....Type each password carefully and try again.</span>");
165            return false;
166        }
167
168        var data = {
169            "esig_slv_password": $("#esig-slv-password").val(),
170            "esig_slv_confirm_password": $("#esig-slv-confirm-password").val(),
171            "invite_hash": $("#esig-invite-hash").val(),
172            "checksum": $("#esig-document-checksum").val(),
173            "esig_nonce": esigAjax.esig_ajax_nonce
174        };
175
176        // pass to server through Ajax 
177        $.post(esigAjax.ajax_url + "?action=slv_set_password", data).done(function (response) {
178
179            if (response == "done") {
180                window.location.reload();
181            }
182            else {
183                $("#esig-set-error").show().html(response);
184                document.getElementById("esig-slv-confirm-password").style.borderColor = "red";
185                document.getElementById("esig-slv-password").style.borderColor = "red";
186                document.getElementById("access-error-textt").className = 'text-error';
187            }
188        });
189
190    });
191
192    // password reset popups 
193    $("#forget_access_password").click(function () {
194
195        $("#slv-login-form").hide();
196        $("#reset-password-popup").show();
197        // hide login form 
198    });
199
200    // go back button here 
201    $("#slv-go-back").click(function () {
202
203        $("#slv-login-form").show();
204        $("#reset-password-popup").hide();
205        // hide login form 
206    });
207
208    // adding onfocus out event in reset password email input field. 
209    wpEsig("#esig-slv-reset-address").on("focusout",function(){
210        let resetPasswordEmailAddress = wpEsig("#esig-slv-reset-address").value();
211        if (esig_validation.is_email(resetPasswordEmailAddress)) {
212            wpEsig("#esig-slv-reset-address").removeValidationMsg(true);
213            return false;
214        }
215        else if (!esig_validation.is_email(resetPasswordEmailAddress)) {
216            wpEsig("#esig-slv-reset-address").insertAfterValidationMsg("Invalid e-mail address. Please input a valid e-mail address", true);
217            return false;
218        }
219    });
220
221    // Re-setting password 
222    $("#esig-slv-reset-password").click(function () {
223
224        let resetPasswordEmailAddress = wpEsig("#esig-slv-reset-address").value();
225
226        if (!esig_validation.is_email(resetPasswordEmailAddress)) {
227            wpEsig("#esig-slv-reset-address").insertAfterValidationMsg("Invalid e-mail address. Please input a valid e-mail address", true);
228            return false;
229        }
230
231        let data = {
232            "esig_slv_reset_address": resetPasswordEmailAddress,
233            "invite_hash": $("#esig-invite-hash").val(),
234            "checksum": $("#esig-document-checksum").val(),
235            "esig_nonce": esigAjax.esig_ajax_nonce
236        };
237
238        // pass to server through Ajax 
239        $.post(esigAjax.ajax_url + "?action=slv_reset_password", data).done(function (response) {
240
241            if (response == "done") {
242                $("#reset-password-popup").hide();
243                $("#slv_reset_confirmation").show();
244            }
245            else {
246
247                //$("#esig-confirm-error").show().html(response);
248                wpEsig("#esig-confirm-error").show();
249                wpEsig("#esig-confirm-error").html("<span class='esig-icon-esig-alert'></span><span class='error-msg' id='error-access-code'>
249E-mail address is not correct</span>");
250
251            }
252        });
253
254    });
255
256
257})(jQuery);

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.