From e62f3072492aa55e626325e8889365b23c25892f Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Fri, 30 Jan 2015 13:19:40 +0800 Subject: Bug 1106121: Create a Bugzilla form for Firefox costume requests --- .../en/default/bug/create/comment-costume.txt.tmpl | 85 +++++ .../en/default/bug/create/create-costume.html.tmpl | 367 +++++++++++++++++++++ .../en/default/bug/create/custom_forms.none.tmpl | 4 + 3 files changed, 456 insertions(+) create mode 100644 extensions/BMO/template/en/default/bug/create/comment-costume.txt.tmpl create mode 100644 extensions/BMO/template/en/default/bug/create/create-costume.html.tmpl (limited to 'extensions/BMO') diff --git a/extensions/BMO/template/en/default/bug/create/comment-costume.txt.tmpl b/extensions/BMO/template/en/default/bug/create/comment-costume.txt.tmpl new file mode 100644 index 000000000..539f2e12b --- /dev/null +++ b/extensions/BMO/template/en/default/bug/create/comment-costume.txt.tmpl @@ -0,0 +1,85 @@ +[%# 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 +%] +[%+ PROCESS global/variables.none.tmpl +%] +:: Requester's Information + +Name: +[%+ cgi.param("requester_name") %] + +Email: +[%+ cgi.param("requester_email") %] + +Mozillian Profile: +[%+ cgi.param("requester_profile") %] + +Responsibile for the Costume: +[%+ cgi.param("responsible") == "Yes" ? "Requester" : cgi.param("responsible_other") %] + +:: Event Information + +Number of Events: +[%+ cgi.param("event_count") %] + +Event Dates: +[%+ cgi.param("event_dates") %] + +Type of Event and estimated attendance: +[%+ cgi.param("event_type") %] + +Mozilla Goal: +[%+ cgi.param("goal") %] + +Main Audience: +[%+ cgi.param("event_audience") %] + +Event Name: +[%+ cgi.param("event_name") || "-" %] + +Event website/wiki page: +[%+ cgi.param("event_page") || "-" %] + +:: Shipping Information + +First name: +[%+ cgi.param("ship_firstname") %] + +Last name: +[%+ cgi.param("ship_lastname") %] + +Address 1: +[%+ cgi.param("ship_address1") %] + +Address 2: +[%+ cgi.param("ship_address2") %] + +City: +[%+ cgi.param("ship_city") %] + +State: +[%+ cgi.param("ship_state") %] + +Country: +[%+ cgi.param("ship_country") %] + +Postal Code: +[%+ cgi.param("ship_postcode") %] + +Personal tax ID: +[%+ cgi.param("ship_taxid") %] + +Phone number: +[%+ cgi.param("ship_phone") %] + +Email: +[%+ cgi.param("ship_email") %] + +Additional Notes: +[%+ cgi.param("notes") || "-" %] diff --git a/extensions/BMO/template/en/default/bug/create/create-costume.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-costume.html.tmpl new file mode 100644 index 000000000..5db30bbef --- /dev/null +++ b/extensions/BMO/template/en/default/bug/create/create-costume.html.tmpl @@ -0,0 +1,367 @@ +[%# 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 %] +#custom_form .field_name { + margin-bottom: 2px; +} + +#custom_form .field_input { + margin-bottom: 0.5em; +} + + +#custom_form th { + text-align: right; + font-weight: normal; + white-space: nowrap; +} + +#custom_form .heading { + text-align: left; + font-weight: bold; + border-top: 2px dotted #969696; +} + +#custom_form input[type="text"], #custom_form textarea { + width: 300px; + font-family: "Fira Sans","Open Sans","Helvetica Neue",Arial,Helvetica,sans-serif; + font-size: 1em; +} + +#custom_form input.short { + width: 100px; +} + +#custom_form .field_input p { + margin: 2px 0; +} + +.mandatory:after { + content: " *"; + color: red; +} +[% END %] + +[% inline_javascript = BLOCK %] +function validateAndSubmit() { + var Dom = YAHOO.util.Dom; + var alert_text = ''; + + if (!isFilledOut('requester_name')) + alert_text += "Please enter your name\n"; + if (!isFilledOut('requester_email')) + alert_text += "Please enter your Email address\n"; + if (!isFilledOut('requester_profile')) + alert_text += "Please provide your Mozillian Profile\n"; + if (!isFilledOut('responsible')) { + alert_text += "Please provide your Mozillian Profile\n"; + } else { + if (Dom.get('responsible').value == 'No' && !isFilledOut('responsible_other')) { + alert_text += "Please provide the person responsible for the costume\n"; + } + } + + if (!isFilledOut('event_count')) + alert_text += "Please enter the number of events\n"; + if (!isFilledOut('event_dates')) + alert_text += "Please enter date(s) of the event\n"; + if (!isFilledOut('event_type')) + alert_text += "Please enter the type of event and attendance\n"; + if (!isFilledOut('goal')) + alert_text += "Please select the Mozilla Goal\n"; + if (!isFilledOut('event_audience')) + alert_text += "Please enter event's main audience\n"; + + if (!isFilledOut('ship_firstname')) + alert_text += "Please enter the shipping First name\n"; + if (!isFilledOut('ship_lastname')) + alert_text += "Please enter the shipping Last name\n"; + if (!isFilledOut('ship_address1')) + alert_text += "Please enter the shipping Address 1\n"; + if (!isFilledOut('ship_city')) + alert_text += "Please enter the shipping City\n"; + if (!isFilledOut('ship_country')) + alert_text += "Please enter the shipping Country\n"; + if (!isFilledOut('ship_phone')) + alert_text += "Please enter the shipping Phone number\n"; + if (!isFilledOut('ship_email')) + alert_text += "Please enter the shipping Email address\n"; + + if (isFilledOut('requester_email') && !isValidEmail(Dom.get('requester_email').value)) + alert_text += "Please enter a valid Email address.\n"; + if (isFilledOut('ship_email') && !isValidEmail(Dom.get('ship_email').value)) + alert_text += "Please enter a valid shipping Email address.\n"; + + if (alert_text != '') { + alert(alert_text); + return false; + } + + Dom.get('short_desc').value = 'Firefox Costume Request - ' + YAHOO.util.Dom.get('requester_name').value; + return true; +} + +function on_responsible_change() { + if (YAHOO.util.Dom.get('responsible').value == 'No') { + YAHOO.util.Dom.removeClass('responsible_who', 'bz_default_hidden'); + } + else { + YAHOO.util.Dom.addClass('responsible_who', 'bz_default_hidden'); + } +} + +YAHOO.util.Event.onDOMReady(function() { + YAHOO.util.Event.addListener('responsible', 'change', on_responsible_change); + on_responsible_change(); +}); +[% END %] + +[% PROCESS global/header.html.tmpl + title = "Firefox Costume Request Form" + style = inline_style + javascript = inline_javascript + javascript_urls = [ 'extensions/BMO/web/js/form_validate.js', + 'js/field.js', 'js/util.js' ] +%] + +

Firefox Costume Request Form

+ +

+ Looking to get a Firefox Costume for your upcoming event(s)? Please use this + form to tell us about your event(s). Filling out this form does not guarantee + that you will receive the Fox costume. Requests are reviewed weekly. We will + get back to you with next steps after we have reviewed. +

+ +

+ Before submitting your request, please make sure to review the + Firefox Costume wiki pages. + You’ll find all the information you ever imagined needing, including details + about what we’re looking for in your request, how it’s decided where a + costume will be sent, and details about the actual costumes. +

+ +
+ + + + + + + + + + + + +
+ +

Requester's Information

+ +
+ Name +
+
+ +
+ +
+ Email +
+
+ +
+ +
+ Mozillian Profile +
+
+ +
+ +
+ Will you be responsible for the costume at its destination? +
+
+ +
+ Who will be responsible for the costume?
+ +
+
+ +

Event Information

+ +
+ Number of events Foxy will support +
+
+ +
+ +
+ Event date(s) +
+
+ +
+ +
+ Type of event(s) and estimated attendance at each +
+
+ +
+ +
+ Mozilla Goal +
+
+ +
+ +
+ Main audience at the event +
+
+ +
+ +
+ Event name (if applicable) +
+
+ +
+ +
+ Event website/wiki page (if applicable) +
+
+ +
+ +

Shipping Information

+ +
+ First name +
+
+ +
+ +
+ Last name +
+
+ +
+ +
+ Address 1 +
+
+ +
+ +
+ Address 2 +
+
+ +
+ +
+ City +
+
+ +
+ +
+ State +
+
+ +
+ +
+ Country +
+
+ +
+ +
+ Postal Code +
+
+ +
+ +
+ Personal tax ID (if required) +
+
+ +
+ +
+ Phone number +
+
+ +
+ +
+ Email +
+
+ +
+ +
+ More Information +
+
+ +
+

+ + + +
+
+ +

+ 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 14fa71b76..9ce7406e4 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 @@ -65,6 +65,10 @@ custom_forms = { link => "form.comm.newsletter", title => "Mozilla Communities Newsletter", }, + { + link => "form.costume", + title => "Firefox Costume Requests", + }, ], "Finance" => [ { -- cgit v1.2.3-24-g4f1b