From 037272636fbad946b1572ce962542d000d06bb3c Mon Sep 17 00:00:00 2001 From: Gervase Markham Date: Wed, 14 Aug 2013 16:45:29 -0400 Subject: Bug 904713 - Mobile Web Compatibility Custom Bugzilla form r=dkl --- .../bug/create/comment-mobile-compat.txt.tmpl | 33 ++++ .../bug/create/create-mobile-compat.html.tmpl | 201 +++++++++++++++++++++ 2 files changed, 234 insertions(+) create mode 100644 extensions/BMO/template/en/default/bug/create/comment-mobile-compat.txt.tmpl create mode 100644 extensions/BMO/template/en/default/bug/create/create-mobile-compat.html.tmpl (limited to 'extensions/BMO/template/en') diff --git a/extensions/BMO/template/en/default/bug/create/comment-mobile-compat.txt.tmpl b/extensions/BMO/template/en/default/bug/create/comment-mobile-compat.txt.tmpl new file mode 100644 index 000000000..37b7d98d5 --- /dev/null +++ b/extensions/BMO/template/en/default/bug/create/comment-mobile-compat.txt.tmpl @@ -0,0 +1,33 @@ +[%# 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 +%] + +Site: [%+ cgi.param("bug_file_loc") %] +[%+ cgi.param("short_desc") %] + +:: Steps To Reproduce + +[%+ cgi.param("desc") %] + +:: Expected Result + +[%+ cgi.param("expected_result") %] + +:: Actual Result + +[%+ cgi.param("actual_result") %] + +:: Additional Information + +Software Version: [% cgi.param("software_version") %] +[% IF cgi.param("device") %] +Device Information: [% cgi.param("device") %] +[% END %] +Reporter's User Agent: [% cgi.param("user_agent") %] diff --git a/extensions/BMO/template/en/default/bug/create/create-mobile-compat.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-mobile-compat.html.tmpl new file mode 100644 index 000000000..a9f0fd2cc --- /dev/null +++ b/extensions/BMO/template/en/default/bug/create/create-mobile-compat.html.tmpl @@ -0,0 +1,201 @@ +[%# 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 %] +#bug_form th { + text-align: right; + vertical-align: middle; +} + +#bug_form input[type="text"], #bug_form textarea { + width: 100%; +} + +#bug_form textarea { + font-family: inherit; + font-size: inherit; +} + +#standard_link { + margin-top: 2em; +} + +#standard_link img { + vertical-align: middle; +} + +#standard_link a { + cursor: pointer; +} + +[% END %] + +[% inline_javascript = BLOCK %] +function validateAndSubmit() { + var field_errors = { + 'op_sys': "Please tell us which product you are using.", + 'software_version': "Please tell us which version of the product you are using.", + 'bug_file_loc': "Please give the URL of the broken page.", + 'short_desc': "Please enter a summary of the problem.", + 'desc': "Please tell us how to reproduce the problem.", + 'expected_result': "Please tell us what you expected to happen.", + 'actual_result': "Please tell us what actually happened.", + }; + + var alert_text = ''; + + for (key in field_errors) { + if (!isFilledOut(key)) { + alert_text += field_errors[key] + '\n'; + } + } + + if (alert_text != '') { + alert(alert_text); + return false; + } + + return true; +} +[% END %] + +[% title = "Mobile Web Compatibility Problem" %] + +[% PROCESS global/header.html.tmpl + title = title + style = inline_style + javascript = inline_javascript + javascript_urls = [ 'extensions/BMO/web/js/form_validate.js'] +%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +

[% title FILTER none %]

+ +
+ + + + + + + + + + + + +[% IF NOT cgi.user_agent("Mobile") %] +

If possible, it's best to file [% terms.bugs %] using your device's browser. Visit and bookmark <https://bugzilla.mozilla.org/form.mobile.compat>.

+[% END %] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Product + +
Product Version + +
Full Web Page Address + +
 
Problem Summary + +
Steps To Reproduce + +
Expected Result + +
Actual Result + +
 
Device Information + +
 
 
+
+ +[ * Required Field ] + + + +[% PROCESS global/footer.html.tmpl %] -- cgit v1.2.3-24-g4f1b