PageSourceSearch

https://www.hornospujol.com/App_Plugins/UmbracoForms/Assets/Themes/Default/umbracoforms-dependencies.js

js hornospujol.com collected 2026-10-08 02:59:28 UTC 2,647 bytes, 62 lines download raw bytes

1var umbracoForms = umbracoForms || {};
2
3/*
4    Umbraco Forms - Dependencies Checker
5*/
6umbracoForms.dependencyCheck = function (formId) {
7
8    //Only perform check if the global 'Umbraco.Sys' is null/undefined
9    //If present means we are in backoffice & that this is being rendered as a macro preview
10    //We do not need to perform this check here
11    if (typeof Umbraco !== 'undefined' && typeof Umbraco.Sys !== 'undefined') {
12        return;
13    }
14    else {
15
16        //Select the wrapping div around the form 
17        //umbraco_form_GUID
18        var formEl = document.getElementById('umbraco_form_' + formId);
19
20        var errorElement = document.createElement('div');
21        errorElement.className = 'umbraco-forms missing-library';
22        errorElement.style.color = '#fff';
23        errorElement.style.backgroundColor = '#9d261d';
24        errorElement.style.padding = '15px';
25        errorElement.style.margin = '10px 0';
26        var errorMessage = "";
27
28        //Ensure umbracoForm is not null
29        if (formEl) {
30
31            //Check to see if the message for the form has been inserted already
32            var checkForExistinhgErr = formEl.getElementsByClassName('umbraco-forms missing-library');
33            if(checkForExistinhgErr.length > 0){
34                return;
35            }
36
37            //Check for jQuery
38            if (typeof jQuery == 'undefined') {
39                errorMessage = errorMessage + 'jQuery has not been loaded & is required for Umbraco Forms.';
40            } else {
41                //These only work if jQuery is present, so it's in the else block
42
43                //Check for jQuery Validation
44                if (!$.validator) {
45                    errorMessage = errorMessage + '<br />jQuery Validate has not been loaded & is required for Umbraco Forms.'
46                }
47
48                //Check for jQuery Validation Unobtrusive
49                //Only works if jQuery validator has been loaded
50                if ($.validator && !$.validator.unobtrusive) {
51                    errorMessage = errorMessage + '<br />jQuery Validate Unobtrusive has not been loaded & is required for Umbraco Forms.';
52                }
53            }
54            if (errorMessage !== "") {
55                errorElement.innerHTML = errorMessage + '<br/> <a href="https://our.umbraco.org/documentation/products/umbracoforms/developer/Prepping-Frontend/" target="_blank" style="text-decoration:underline; color:#fff;">See Umbraco Forms Documentation</a>';
56
57                formEl.insertBefore(errorElement, formEl.childNodes[0]);
58            }
59        }
60    }
61
62};

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.