PageSourceSearch

https://www.visit-dorset.com/includes/public/managed/v_a2e6ae52_a5…/plugins/common/virtuals/js/custom_forms.js

js visit-dorset.com collected 2026-10-01 11:29:57 UTC 1,701 bytes, 46 lines download raw bytes

1require(["jquery", "domReady!"], function($) {
2	var rsvpForm = $('#rsvp-container');
3	var submitEventForm = $('#sv_submit_event_form');
4	var simpleForm = $('form.simpleForm');
5	var calendar = $('.lookup-calHolder');
6	var faCheck = '<i class="fas fa-check"></i>';
7
8	if (location.search.indexOf('action=popupCal') > -1 && calendar.length) {
9		/* This code is excuted when you're in the submit event for calendar popup.
10		   We need to hid everything but the calendar itself. */
11		calendar.addClass('core-styles');
12		calendar.parents().show().addClass('crm-calendar-parent');
13	} else if (simpleForm.length) {
14		simpleForm.each(function() {
15			var form = $(this);
16			var sideColHtml = '<div class="medium-3 columns"></div>';
17			var captcha = form.find('.captcha');
18			form.children('h3,p').each(function() {
19				$(this).wrap('<div class="row"><div class="medium-9 columns"></div></div>');
20				$(this).parent().parent().prepend(sideColHtml);
21			});
22			captcha.parent().prepend(sideColHtml);
23		});
24	} else if (rsvpForm.length) {
25		var labels = [];
26		// get header row titles
27		rsvpForm.find('.eventList_headerRow .eventListCell').each(function() {
28			labels.push($(this).html());
29		});
30		rsvpForm.find('.eventListRow').each(function() {
31			$(this).find('.eventListCell').each(function(i) {
32				if (labels[i].toLowerCase() !== 'details') {
33					$(this).attr('data-title', labels[i]);
34				}
35			});
36		});
37	} else if (submitEventForm.length) {
38		// removing inline styles to clean up form
39		submitEventForm.find('p,span,input,li').each(function(i, el) {
40			if ($(el).attr('style') && $(el).attr('type') !== 'file') {
41				$(el).attr('style', '');
42			}
43		});
44	}
45});
46

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.