at path:ROOT / clients / assets / js / whmcs / form.js
run:R W Run
2.97 KB
2026-04-08 19:29:25
R W Run
9 KB
2026-04-08 19:29:26
R W Run
1.49 KB
2026-04-08 19:29:25
R W Run
2.44 KB
2026-04-08 19:29:28
R W Run
5.28 KB
2026-04-08 19:29:28
R W Run
45 By
2026-04-08 19:29:27
R W Run
5.71 KB
2026-04-08 19:29:26
R W Run
4.91 KB
2026-04-08 19:29:25
R W Run
3.24 KB
2026-04-08 19:29:27
R W Run
24.58 KB
2026-04-08 19:29:26
R W Run
13.16 KB
2026-04-08 19:29:26
R W Run
5.46 KB
2026-04-08 19:29:27
R W Run
error_log
📄form.js
1/**
2 * Form module
3 *
4 * @copyright Copyright (c) WHMCS Limited 2005-2017
5 * @license http://www.whmcs.com/license/ WHMCS Eula
6 */
7(function(module) {
8 if (!WHMCS.hasModule('form')) {
9 WHMCS.loadModule('form', module);
10 }
11})(
12function () {
13 this.checkAllBound = false;
14
15 this.register = function () {
16 if (!this.checkAllBound) {
17 this.bindCheckAll();
18 this.checkAllBound = true;
19 }
20 };
21
22 this.bindCheckAll = function ()
23 {
24 var huntSelector = '.btn-check-all';
25 jQuery('body').on('click', huntSelector, function (e) {
26 var btn = jQuery(e.target);
27 var targetInputs = jQuery(
28 '#' + btn.data('checkbox-container') + ' input[type="checkbox"]'
29 );
30 if (btn.data('btn-check-toggle')) {
31 // one control that changes
32 var textDeselect = 'Deselect All';
33 var textSelect = 'Select All';
34 if (btn.data('label-text-deselect')) {
35 textDeselect = btn.data('label-text-deselect');
36 }
37 if (btn.data('label-text-select')) {
38 textSelect = btn.data('label-text-select');
39 }
40
41 if (btn.hasClass('toggle-active')) {
42 targetInputs.prop('checked',false);
43 btn.text(textSelect);
44 btn.removeClass('toggle-active');
45 } else {
46 targetInputs.prop('checked',true);
47 btn.text(textDeselect);
48 btn.addClass('toggle-active');
49 }
50 } else {
51 // two controls that are static
52 if (btn.data('btn-toggle-on')) {
53 targetInputs.prop('checked',true);
54 } else {
55 targetInputs.prop('checked',false);
56 }
57 }
58 });
59 };
60
61 this.reloadCaptcha = function (element)
62 {
63 if (typeof grecaptcha !== 'undefined') {
64 grecaptcha.reset();
65 } else {
66 if (!element) {
67 element = jQuery('#inputCaptchaImage');
68 }
69
70 var src = jQuery(element).data('src');
71 jQuery(element).attr('src', src + '?nocache=' + (new Date()).getTime());
72
73 var userInput = jQuery('#inputCaptcha');
74 if (userInput.length) {
75 userInput.val('');
76 }
77 }
78 };
79
80 return this;
81});
82