PageSourceSearch

https://www.visitmorningtonpeninsula.org/DesktopModules/DnnSharp/A…/static/validators/fill-all.js?cdv=365

js visitmorningtonpeninsula.org collected 2026-10-02 07:07:12 UTC 2,117 bytes, 47 lines download raw bytes

1dnnsfjQuery(function () {
2
3    var $ = dnnsfjQuery;
4    for (var i = 0; i < 10; i++) {
5        (function (igroup) {
6            $.validator && $.validator.addMethod('group' + igroup + '-FillAll', function (value, element) {
7                var isValid = true;
8                var isAtLeastOneFilled = false;
9                var isAtLeastOneNotFilled = false;
10
11                var groupInputs = $(element).parents('.c-form:first').find('.group' + igroup + '-FillAll');
12
13                groupInputs.each(function (index, input) {
14                    if ($(input).is(':checked') || $.trim(input.value).length > 0) {
15                        isAtLeastOneFilled = true;
16                        if (isAtLeastOneNotFilled) {
17                            return false;
18                        }
19                    } else if (isAtLeastOneFilled) {
20                        isAtLeastOneNotFilled = true;
21                        return false;
22                    } else {
23                        isAtLeastOneNotFilled = true;
24                    }
25                });
26
27                if (isAtLeastOneFilled && isAtLeastOneNotFilled) {
28                    isValid = false;
29                }
30
31                // validate the rest of the controls in the group, but watch out for recursion
32                if (!window['group' + igroup + '-FillAll-check']) {
33                    window['group' + igroup + '-FillAll-check'] = true;
34                    groupInputs.each(function () {
35                        if ($(this).valid()) { // using the structure of tabspro, repair this if it changes
36                            $(this).closest('.tab-content').prev().find('.tabButton.active > .tabLink').removeClass('has-error');
37                        } else {
38                            $(this).closest('.tab-content').prev().find('.tabButton.active > .tabLink').addClass('has-error');
39                        }
40                    });
41                    window['group' + igroup + '-FillAll-check'] = false;
42                }
43                return isValid;
44            }, 'All fields in this group are required');
45        })(i);
46    }
47});

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.