[%# 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_style = BLOCK %] #whitelist_form { padding: 10px; } #whitelist_form .required:after { content: " *"; color: red; } #whitelist_form .field_label { font-weight: bold; } #whitelist_form .field_desc { padding-bottom: 3px; } #whitelist_form .field_desc, #whitelist_form .head_desc { width: 600px; word-wrap: normal; } #whitelist_form .head_desc { padding-top: 5px; padding-bottom: 12px; } #whitelist_form .form_section { margin-bottom: 10px; } #whitelist_form textarea { font-family: inherit; font-size: inherit; } #whitelist_form #comp_description { test-align: left; color: green; padding-left: 1em; } [% END %] [% inline_javascript = BLOCK %] function validateAndSubmit() { var alert_text = ''; var required_fields = { vendor: "Please enter a vendor name.", contact: "Please enter a point of contact.", site_urls: "Please enter site urls for adding to whitelist.", notice: "Please enter a notice provided to users.", compliance_agreement: "Please select whether you have read and agree with the policy.", compliance_usage: "Please select whether the usage complies with guidelines.", }; for (var field in required_fields) { if (!fieldValue(field)) alert_text += required_fields[field] + "\n"; } if (alert_text != '') { alert(alert_text); return false; } document.getElementById('short_desc').value = fieldValue('vendor'); return true; } function fieldValue(elem_id) { var el = document.getElementById(elem_id); if (!el) return false; if (el.type == 'text' || el.type == 'textarea') { return el.value; } return el.options[el.selectedIndex].value; } [% END %] [% PROCESS global/header.html.tmpl title = "Firefox Screen Sharing Whitelisti Submission" style = inline_style javascript = inline_javascript javascript_urls = [ 'extensions/BMO/web/js/form_validate.js' ] %]