'
// @formatter:on
/* beautify preserve:end */
),
textAreaTemplate: (
/* beautify preserve:start */
// @formatter:off
'' +
'{{name}}' +
'{{#required}}* {{/required}}' +
' ' +
' ' +
'' +
'
'
// @formatter:on
/* beautify preserve:end */
),
emailInputTemplate: (
/* beautify preserve:start */
// @formatter:off
''
// @formatter:on
/* beautify preserve:end */
),
selectInputTemplate: (
/* beautify preserve:start */
// @formatter:off
'' +
'{{name}}' +
'{{#required}}* {{/required}}' +
' ' +
' ' +
'' +
'{{#options}}{{value}} {{/options}}' +
' ' +
'
'
// @formatter:on
/* beautify preserve:end */
),
checkboxInputTemplate: (
/* beautify preserve:start */
// @formatter:off
''
// @formatter:on
/* beautify preserve:end */
),
errorTemplate: (
/* beautify preserve:start */
// @formatter:off
'The following errors must be corrected
' +
'' +
'{{#.}}' +
'' +
'{{name}} is required ' +
' ' +
'{{/.}}' +
' '
// @formatter:on
/* beautify preserve:end */
),
beforeRender: function (e, formData) {
$.each(formData.items, function (i, item) {
var name = item.hiddenInputValue;
var inputIcon = function (name) {
var icons = {
'FirstName': 'fa-user',
'LastName': 'fa-user',
'Title': 'fa-user',
'Email': 'fa-envelope',
'Institution': 'fa-bank',
'Address1': 'fa-location-arrow',
'Address2': 'fa-location-arrow',
'City': 'fa-cab',
'State': 'fa-flag',
'ZipCode': 'fa-send-o',
'Country': 'fa-Country',
'Fax': 'fa-phone',
'Phone': 'fa-phone',
'Comments': '',
};
return 'fa ' + icons[name];
};
item.icon = inputIcon(name);
});
},
onComplete: function (e) {
$('.module-form_itemCaptcha').addClass('col-sm-12').find('.CaptchaContainer input').addClass(
'form-control');
$('.module-form button[type="submit"]').addClass('btn btn-primary btn-InforRequestSubmit');
var $button = $('.module-form button[type="submit"]').addClass(
'btn btn-primary btn-InforRequestSubmit').parent().html().trim();
$('.module_actions').html(
/* beautify preserve:start */
// @formatter:off
'' +
'
This form submits information via e-mail which is inherently insecure. Please do not include ANY personal information that you do not wish to be shared with others.
' +
'
' +
'' +
'
' +
$button +
'
' +
'
' +
' ' +
' Required Field ' +
'
'
// @formatter:on
/* beautify preserve:end */
);
$(e.target).find('.module_container--inner').addClass('HasCustomFields infoWell irwWell');
$('label.checkbox').on('click', function (e) {
var $input = $(this).find('input'),
$pseudoCheckbox = $(this).find('.icon.fa');
if ($input.is(':checked')) {
$pseudoCheckbox.removeClass('fa-square-o text-muted').addClass(
'fa-check-square-o text-primary');
} else {
$pseudoCheckbox.addClass('fa-square-o text-muted').removeClass(
'fa-check-square-o text-primary');
}
});
}
});
q4App.scrollTo($('.MessageSent'));