[%# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. #%] [% PROCESS global/variables.none.tmpl %] [% inline_css = BLOCK %] #data_comp_form { width: 60%; } #data_comp_form .required:after { content: " *"; color: red; } #data_comp_form .field_label { text-align: left; font-weight: bold; } #data_comp_form .field_desc, #data_comp_form .head_desc { word-wrap: normal; } #data_comp_form .head_desc { font-size: 1.25em; padding-bottom: .5em; } #data_comp_form .form_section { margin-bottom: 1em; padding-left: 2em; } .yui-calcontainer { z-index: 2; } [% END %] [% inline_javascript = BLOCK %] function validateAndSubmit() { var alert_text = ''; var required_labels = YAHOO.util.Selector.query('label.required'); if (required_labels.length) { required_labels.forEach(function (label) { var id = label.getAttribute('for'); if (id && !isFilledOut(id)) { var desc = label.textContent || id; alert_text += "Please select or enter a value for" + desc.replace(/[\r\n]+/, "").replace(/\s+/g, " ") + "\n"; } }); } if (alert_text != '') { alert(alert_text); return false; } return true; } [% END %] [% PROCESS global/header.html.tmpl title = "Data Compliance Form" generate_api_token = 1 style = inline_css style_urls = [ 'skins/standard/enter_bug.css' ] javascript = inline_javascript javascript_urls = [ 'js/field.js', 'js/util.js', 'extensions/BMO/web/js/form_validate.js' ] %]