[%# 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 %] #feature_form { padding: 10px; } #feature_form .required:after { content: " *"; color: red; } #feature_form .field_label { font-weight: bold; } #feature_form .field_desc { padding-bottom: 3px; } #feature_form .field_desc, #feature_form .head_desc { width: 600px; word-wrap: normal; } #feature_form .head_desc { padding-top: 5px; padding-bottom: 12px; } #feature_form .form_section { margin-bottom: 10px; } #feature_form textarea { font-family: inherit; font-size: inherit; } #feature_form #comp_description { test-align: left; color: green; padding-left: 1em; } #feature_form .hidden { display: none; } [% END %] [% inline_javascript = BLOCK %] var compdesc = []; compdesc[""] = 'Please select a component from the list above.'; [% FOREACH comp = product.components %] compdesc['[% comp.name FILTER js %]'] = '[% comp.description FILTER js %]'; [% END %] function showCompDesc() { var comp_select = document.getElementById('component'); document.getElementById('comp_description').innerHTML = compdesc[comp_select.value]; } function validateAndSubmit() { var alert_text = ''; if (!isFilledOut('component')) alert_text += 'Please select a component.\n'; if (!isFilledOut('short_desc')) alert_text += 'Please provide a summary of the feature request.\n'; if ($('#discussion').val() === 'yes') { if (!isFilledOut('bug_file_loc')) alert_text += 'Please provide the "Mailing list thread" URL.\n'; } if (alert_text != '') { alert(alert_text); return false; } return true; } $(function() { $('#discussion') .change(function() { if ($(this).val() === 'yes') { $('.thread').removeClass('hidden'); $('.thread input').prop('disabled', false); } else { $('.thread').addClass('hidden'); $('.thread input').prop('disabled', true); } }) .change(); showCompDesc(); }); [% END %] [% PROCESS global/header.html.tmpl title = "Firefox OS Feature Request Form" generate_api_token = 1 style = inline_style javascript = inline_javascript javascript_urls = [ 'extensions/BMO/web/js/form_validate.js', 'js/field.js' ] %] [% USE Bugzilla %] [% cgi = Bugzilla.cgi %]
[% PROCESS global/footer.html.tmpl %]