From 41e58e2f043162806bfb9fd3723a5391c9599de2 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 13 Oct 2014 21:38:24 +0000 Subject: Bug 1080554: Create custom entry form for submissions to Mozilla Communities newsletter --- .htaccess | 1 + .../bug/create/comment-comm-newsletter.txt.tmpl | 55 +++++ .../bug/create/create-comm-newsletter.html.tmpl | 251 +++++++++++++++++++++ .../en/default/bug/create/custom_forms.none.tmpl | 4 + 4 files changed, 311 insertions(+) create mode 100644 extensions/BMO/template/en/default/bug/create/comment-comm-newsletter.txt.tmpl create mode 100644 extensions/BMO/template/en/default/bug/create/create-comm-newsletter.html.tmpl diff --git a/.htaccess b/.htaccess index c392c4653..21ce60169 100644 --- a/.htaccess +++ b/.htaccess @@ -76,5 +76,6 @@ RewriteRule ^form[\.:]web[\.:]bounty$ enter_bug.cgi?product=mozilla.org&format=w RewriteRule ^form[\.:]automative$ enter_bug.cgi?product=Testing&format=automative 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 ^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-comm-newsletter.txt.tmpl b/extensions/BMO/template/en/default/bug/create/comment-comm-newsletter.txt.tmpl new file mode 100644 index 000000000..e1dca9242 --- /dev/null +++ b/extensions/BMO/template/en/default/bug/create/comment-comm-newsletter.txt.tmpl @@ -0,0 +1,55 @@ +[%# 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 +%] +>> Opportunity Headline +[%+ cgi.param('short_desc') FILTER html %] + +>> Is your opportunity one time or recurring? +[%+ cgi.param('recurring') || 'None' FILTER html %] + +>> Describe the opportunity, project goal, and what contributors will get from +>> participating in your project. Does this project support the Mozilla Mission +>> or Goals for 2014? +[%+ cgi.param('description') FILTER html %] + +>> Time Required +[%+ cgi.param('time_required') FILTER html %] + +>> Email Address for Contact +[%+ cgi.param('primary_contact') FILTER html %] + +>> Backup person or group to reach out to if necessary +[%+ cgi.param('backup_contact') || 'None' FILTER html %] + +>> Functional area or Product area +Coding: [% IF cgi.param('area_coding') %] Yes [% ELSE %] No [% END %] +Community Building: [% IF cgi.param('area_community_building') %] Yes [% ELSE %] No [% END %] +Education: [% IF cgi.param('area_education') %] Yes [% ELSE %] No [% END %] +Badges: [% IF cgi.param('area_badges') %] Yes [% ELSE %] No [% END %] +UX: [% IF cgi.param('area_ux') %] Yes [% ELSE %] No [% END %] +Design: [% IF cgi.param('area_design') %] Yes [% ELSE %] No [% END %] +Marketing: [% IF cgi.param('area_marketing') %] Yes [% ELSE %] No [% END %] +Engagement: [% IF cgi.param('area_engagement') %] Yes [% ELSE %] No [% END %] +Firefox Desktop: [% IF cgi.param('area_firefox_desktop') %] Yes [% ELSE %] No [% END %] +Firefox for Android: [% IF cgi.param('area_firefox_android') %] Yes [% ELSE %] No [% END %] +FirefoxOS: [% IF cgi.param('area_firefox_os') %] Yes [% ELSE %] No [% END %] +Marketplace: [% IF cgi.param('area_marketplace') %] Yes [% ELSE %] No [% END %] +User Research/User Centered Design: [% IF cgi.param('area_user_research') %] Yes [% ELSE %] No [% END %] +Security: [% IF cgi.param('area_security') %] Yes [% ELSE %] No [% END %] +Support: [% IF cgi.param('area_support') %] Yes [% ELSE %] No [% END %] +Public Policy: [% IF cgi.param('area_public_policy') %] Yes [% ELSE %] No [% END %] +Privacy: [% IF cgi.param('area_privacy') %] Yes [% ELSE %] No [% END %] +Other: [% IF cgi.param('area_other') %][% cgi.param('area_other_text') FILTER html %][% ELSE %] No [% END %] + +>> Timeframe +[%+ cgi.param("timeframe") FILTER html %] + +>> Background URL +[%+ cgi.param('background_url') FILTER html %] diff --git a/extensions/BMO/template/en/default/bug/create/create-comm-newsletter.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-comm-newsletter.html.tmpl new file mode 100644 index 000000000..5e1a13c9a --- /dev/null +++ b/extensions/BMO/template/en/default/bug/create/create-comm-newsletter.html.tmpl @@ -0,0 +1,251 @@ +[%# 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 %] +#newsletter_form { + padding: 10px; +} +#newsletter_form .required:after { + content: " *"; + color: red; +} +#newsletter_form .field_label { + font-weight: bold; +} +#newsletter_form .field_desc { + padding-bottom: 3px; +} +#newsletter_form .field_desc, +#newsletter_form .head_desc { + width: 600px; + word-wrap: normal; +} +#newsletter_form .head_desc { + padding-top: 5px; + padding-bottom: 12px; +} +#newsletter_form .form_section { + margin-bottom: 10px; +} +#newsletter_form textarea { + font-family: inherit; + font-size: inherit; +} +#newsletter_form em { + font-size: 1em; +} +.yui-calcontainer { + z-index: 2; +} +[% END %] + +[% inline_javascript = BLOCK %] +function validateAndSubmit() { + var alert_text = ''; + if (!isFilledOut('short_desc')) alert_text += 'Please enter a value for opportunity headline.\n'; + if (!isFilledOut('description')) alert_text += 'Please enter a value for description.\n'; + if (!isFilledOut('time_required')) alert_text += 'Please enter a value for time required.\n'; + if (!isFilledOut('primary_contact')) alert_text += 'Please enter a value for contact email.\n'; + if (!isFilledOut('timeframe')) alert_text += 'Please select a value for timeframe.\n'; + if (YAHOO.util.Dom.get('area_other').checked == true + && !isFilledOut('area_other_text')) + { + alert_text += 'Please enter a value for other type of functional area.\n'; + } + if (alert_text != '') { + alert(alert_text); + return false; + } + return true; +} +function toggleAreaOther() { + var area_other_cb = document.getElementById('area_other'); + if (area_other_cb.checked == true) { + YAHOO.util.Dom.removeClass('area_other_text', 'bz_default_hidden'); + } + else { + YAHOO.util.Dom.addClass('area_other_text', 'bz_default_hidden'); + } +} +[% END %] + +[% PROCESS global/header.html.tmpl + title = "Contributor Opportunity Submission" + style = inline_style + javascript = inline_javascript + javascript_urls = [ 'extensions/BMO/web/js/form_validate.js' ] +%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +
+ + + + + + + + + +

Contributor Opportunity Submission

+ +
+ I have a contribution opportunity I’d like to promote for use in the Mozilla + Communities newsletter and beyond! +
+ +

+ [ * Required Field ] +

+ +
+ +
+ What's the opportunity called? +
+ +
+ +
+ +
+ Can contributors do this only one time or are you looking for long-term + contributors? +
+ One time
+ Recurring +
+ +
+ +
+ Please describe how contributors can help or participate and how might you + recognize their participation. Please also include any information about how + it fits into the Mozilla Mission or Goals for 2014 +
+ +
+ +
+ +
+ Approximately how much time per volunteer, will this task take? +
+ +
+ +
+ +
+ Your contact information +
+ +
+ +
+ +
+ Is there someone else we can reach out to for information on this project? +
+ +
+ +
+ +
+ What product or functional area does this opportunity relate to? Click + multiple areas if they apply (ie both Marketplace and UX) +
+ Coding
+ Community Building
+ Education
+ Badges
+ UX
+ Design
+ Marketing
+ Engagement
+ Firefox Desktop
+ Firefox for Android
+ Firefox OS
+ Marketplace
+ User Research
+ Security
+ Support
+ Public Policy
+ Privacy
+ Other:
+ +
+ +
+ +
+ Please provide specifics on the timeframe for the opportunity. It can be + ongoing, but the newsletter is especially oriented toward time sensitive + contribution. +
+ +
+ +
+ +
+ We especially appreciate mozilla.org urls as we can instrument them more easily + to count responses, but we accept other ones too. +
+ +
+ + + +
+ +[% 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 25af4fa47..af53413de 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 @@ -61,6 +61,10 @@ custom_forms = { link => "form.poweredby", title => "Powered by Mozilla Logo Requests", }, + { + link => "form.comm.newsletter", + title => "Mozilla Communities Newsletter", + }, ], "Finance" => [ { -- cgit v1.2.3-24-g4f1b