From 8553f91f07568d64ff84b3bedee9e6e532b5cc0c Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 27 Jul 2015 12:29:10 +0800 Subject: Bug 1181453 - Amend https://bugzilla.mozilla.org/form.fxos.feature form --- .../bug/create/comment-fxos-feature.txt.tmpl | 18 ++- .../bug/create/create-fxos-feature.html.tmpl | 128 ++++++++++++++------- 2 files changed, 94 insertions(+), 52 deletions(-) (limited to 'extensions/BMO/template') diff --git a/extensions/BMO/template/en/default/bug/create/comment-fxos-feature.txt.tmpl b/extensions/BMO/template/en/default/bug/create/comment-fxos-feature.txt.tmpl index 65224bfba..7664ff502 100644 --- a/extensions/BMO/template/en/default/bug/create/comment-fxos-feature.txt.tmpl +++ b/extensions/BMO/template/en/default/bug/create/comment-fxos-feature.txt.tmpl @@ -7,18 +7,14 @@ #%] [% USE Bugzilla %] -[% cgi = Bugzilla.cgi +%] ->> Feature Request Title: +[% cgi = Bugzilla.cgi %] + +>> Feature Request Summary: [%+ cgi.param('short_desc') %] >> Description of feature, or problem to be solved -[%+ cgi.param("description") %] - ->> Impact of implementing the feature/solution -[%+ cgi.param("implement_impact") %] - ->> Impact of NOT implementing the feature/solution -[%+ cgi.param("not_implement_impact") %] +[%+ cgi.param("description") || "-" %] ->> Date required -[%+ cgi.param("date_required") %] +[% RETURN IF cgi.param("discussion") != "yes" %] +>> Mailing list thread +[%+ cgi.param("bug_file_loc") %] diff --git a/extensions/BMO/template/en/default/bug/create/create-fxos-feature.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-fxos-feature.html.tmpl index faa0495a4..ec0cc84c9 100644 --- a/extensions/BMO/template/en/default/bug/create/create-fxos-feature.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-fxos-feature.html.tmpl @@ -43,10 +43,13 @@ color: green; padding-left: 1em; } +#feature_form .hidden { + display: none; +} [% END %] [% inline_javascript = BLOCK %] -var compdesc = new Array(); +var compdesc = []; compdesc[""] = 'Please select a component from the list above.'; [% FOREACH comp = product.components %] compdesc['[% comp.name FILTER js %]'] = '[% comp.description FILTER js %]'; @@ -55,24 +58,44 @@ 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 value for product component.\n'; - if (!isFilledOut('short_desc')) alert_text += 'Please enter a value for feature request title.\n'; + 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; } -YAHOO.util.Event.onDOMReady(showCompDesc); + +$(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' ] + javascript_urls = [ 'extensions/BMO/web/js/form_validate.js', 'js/field.js' ] %] [% USE Bugzilla %] @@ -82,39 +105,57 @@ YAHOO.util.Event.onDOMReady(showCompDesc); onSubmit="return validateAndSubmit();"> - + - + + - +
Which product component is your feature request applicable to? - If you are not sure, choose "General". + If you are not sure, choose "Gaia::Feedback".
- + +
+ Is this a defect with existing functionality or a new feature request? +
+ +
+ +
+
Please enter a title for your feature request that is brief and self explanatory. (Example: "Memory dialing using keypad numbers") @@ -134,40 +175,45 @@ YAHOO.util.Event.onDOMReady(showCompDesc);
- +
- If this solution were to be implemented, what would the impact be? - (Example, "If this solution were to be implemented, it would save the users - significant time when dialing commonly used phone numbers.")
- +
-
- + -
- +
- Once your form has been submitted, a tracking [% terms.bug %] will be created. We will - then reach out for additional info and next steps. Thanks! + Once your form has been submitted, a tracking [% terms.bug %] will be + created. We will then reach out for additional info and next steps. If you + discussed this on a mailing list, please link the people there to this + tracking [% terms.bug %]. Thanks!
-- cgit v1.2.3-24-g4f1b