From 300d1ba13e050aa1e954dde640092c448184cbba Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Tue, 4 Nov 2014 04:14:00 +0000 Subject: Bug 1083876: create a bugzilla template for whitelist applications --- .htaccess | 1 + .../create/comment-screen-share-whitelist.txt.tmpl | 27 +++ .../create/create-screen-share-whitelist.html.tmpl | 183 +++++++++++++++++++++ .../en/default/bug/create/custom_forms.none.tmpl | 6 + 4 files changed, 217 insertions(+) create mode 100644 extensions/BMO/template/en/default/bug/create/comment-screen-share-whitelist.txt.tmpl create mode 100644 extensions/BMO/template/en/default/bug/create/create-screen-share-whitelist.html.tmpl diff --git a/.htaccess b/.htaccess index 21ce60169..d5d3aa771 100644 --- a/.htaccess +++ b/.htaccess @@ -77,5 +77,6 @@ RewriteRule ^form[\.:]automative$ enter_bug.cgi?product=Testing&format=automativ RewriteRule ^form[\.:]fxos[\.\-:]preload[\.\-:]app$ enter_bug.cgi?product=Marketplace&format=fxos-preload-app RewriteRule ^form[\.:]fxos[\.\-:]mcts[\.\-:]waiver$ enter_bug.cgi?product=Firefox+OS&format=fxos-mcts-waiver RewriteRule ^form[\.:]comm[\.:]newsletter$ enter_bug.cgi?product=Marketing&format=comm-newsletter +RewriteRule ^form[\.:]screen[\.:]share[\.:]whitelist$ enter_bug.cgi?product=Firefox&format=screen-share-whitelist RewriteRule ^rest/(.*)$ rest.cgi/$1 [NE] RewriteRule ^bzapi/(.*)$ extensions/BzAPI/bin/rest.cgi/$1 [NE] diff --git a/extensions/BMO/template/en/default/bug/create/comment-screen-share-whitelist.txt.tmpl b/extensions/BMO/template/en/default/bug/create/comment-screen-share-whitelist.txt.tmpl new file mode 100644 index 000000000..d63f7ea9c --- /dev/null +++ b/extensions/BMO/template/en/default/bug/create/comment-screen-share-whitelist.txt.tmpl @@ -0,0 +1,27 @@ +[%# 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. + #%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi +%] +>> Vendor name +[%+ cgi.param('vendor') %] + +>> Point of contact +[%+ cgi.param("contact") %] + +>> Site URLs +[%+ cgi.param("site_urls") %] + +>> Does the application provide users with notice and control? +[%+ cgi.param("notice") %] + +>> Have you seen and agree with the Developer Screen Sharing Submission policy? +[%+ cgi.param("compliance_agreement") %] + +>> Does the usage comply with the Developer Screen Sharing Submission Policy guidelines? +[%+ cgi.param("compliance_usage") %] diff --git a/extensions/BMO/template/en/default/bug/create/create-screen-share-whitelist.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-screen-share-whitelist.html.tmpl new file mode 100644 index 000000000..98047e36b --- /dev/null +++ b/extensions/BMO/template/en/default/bug/create/create-screen-share-whitelist.html.tmpl @@ -0,0 +1,183 @@ +[%# 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' ] +%] + +

Firefox Screen Sharing Whitelist Submission

+ +

Description

+ +
+ Please supply the following information for a new screen sharing + whitelist requests +
+ +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ Site URLs requesting addition to the Whitelist for screen sharing. +
+ +
+ +

Access Resquest Details

+ +
+ Please answer the questions below and freely ask for any clarification + needed. please provide requested information. +
+ +
+ +
+ Please paste the privacy notice or a link to the privacy notice below. +
+ +
+ +
+ +
+ More information at + https://wiki.mozilla.org/Screensharing under Developer + Screen Sharing Submission Policy. +
+ +
+ +
+ +
+ +
+ + + +

+ [ * Required Field ] +

+ +
+ +[% PROCESS global/footer.html.tmpl %] diff --git a/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl b/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl index af53413de..9bbef99eb 100644 --- a/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl +++ b/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl @@ -118,6 +118,12 @@ custom_forms = { title => "Web Bounty Form", }, ], + "Firefox" => [ + { + link => "form.screen.share.whitelist", + title => "Firefox Screen Sharing Whitelist Submission", + } + ], "Firefox OS" => [ { link => "form.fxos.feature", -- cgit v1.2.3-24-g4f1b