summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.htaccess4
-rw-r--r--extensions/BMO/Extension.pm11
-rw-r--r--extensions/BMO/template/en/default/bug/create/comment-doc.txt.tmpl19
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl155
4 files changed, 186 insertions, 3 deletions
diff --git a/.htaccess b/.htaccess
index e7c65bdc8..4d948b6a5 100644
--- a/.htaccess
+++ b/.htaccess
@@ -42,6 +42,8 @@ RewriteRule ^form[\.:]reps[\.:]budget$ enter_bug.cgi?product=Mozilla+Reps&format
RewriteRule ^form[\.:]reps[\.:]swag$ enter_bug.cgi?product=Mozilla+Reps&format=remo-swag
RewriteRule ^form[\.:]reps[\.:]payment$ page.cgi?id=remo-form-payment.html
RewriteRule ^form[\.:]employee[\.\-:]incident$ enter_bug.cgi?product=mozilla.org&format=employee-incident
-RewriteRule ^form[\.:]brownbag$ enter_bug.cgi?product=Air\ Mozilla&format=brownbag
+RewriteRule ^form[\.:]brownbag$ enter_bug.cgi?product=Air+Mozilla&format=brownbag
RewriteRule ^form[\.:]finance$ enter_bug.cgi?product=Finance&format=finance
RewriteRule ^form[\.:]privacy[\.\-:]data$ enter_bug.cgi?product=Privacy&format=privacy-data
+RewriteRule ^form[\.:]moz[\.\-:]project[\.\-:]review$ enter_bug.cgi?product=mozilla.org&format=moz-project-review
+RewriteRule ^form[\.:]docs?$ enter_bug.cgi?product=Developer+Documentation&format=doc
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm
index 84d04b0f8..186a83f73 100644
--- a/extensions/BMO/Extension.pm
+++ b/extensions/BMO/Extension.pm
@@ -28,6 +28,7 @@ use base qw(Bugzilla::Extension);
use Bugzilla::Field;
use Bugzilla::Constants;
use Bugzilla::Status;
+use Bugzilla::Product;
use Bugzilla::User;
use Bugzilla::User::Setting;
use Bugzilla::Util qw(html_quote trick_taint trim datetime_from detaint_natural);
@@ -123,18 +124,24 @@ sub template_before_process {
$vars->{'columns_sortkey'} = \%columns_sortkey;
}
- elsif ($file =~ /^bug\/create\/create[\.-]/) {
+ elsif ($file =~ /^bug\/create\/create[\.-](.*)/) {
+ my $format = $1;
if (!$vars->{'cloned_bug_id'}) {
# Allow status whiteboard values to be bookmarked
$vars->{'status_whiteboard'} =
Bugzilla->cgi->param('status_whiteboard') || "";
}
-
+
# Purpose: for pretty product chooser
$vars->{'format'} = Bugzilla->cgi->param('format');
# Data needed for "this is a security bug" checkbox
$vars->{'sec_groups'} = \%product_sec_groups;
+
+ if ($format eq 'doc.html.tmpl') {
+ my $versions = Bugzilla::Product->new({ name => 'Core' })->versions;
+ $vars->{'versions'} = [ reverse @$versions ];
+ }
}
diff --git a/extensions/BMO/template/en/default/bug/create/comment-doc.txt.tmpl b/extensions/BMO/template/en/default/bug/create/comment-doc.txt.tmpl
new file mode 100644
index 000000000..3b706476c
--- /dev/null
+++ b/extensions/BMO/template/en/default/bug/create/comment-doc.txt.tmpl
@@ -0,0 +1,19 @@
+[%# 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 +%]
+:: Developer Documentation Request
+
+ Request Type: [% cgi.param("type") %]
+ Gecko Version: [% cgi.param("gecko") %]
+
+:: Details
+
+[%+ cgi.param("details") %]
+
diff --git a/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl
new file mode 100644
index 000000000..c01d35401
--- /dev/null
+++ b/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl
@@ -0,0 +1,155 @@
+[%# 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 %]
+#doc_form th {
+ text-align: right;
+}
+
+#short_desc, #details {
+ width: 100%;
+}
+[% END %]
+
+[% inline_javascript = BLOCK %]
+function validateAndSubmit() {
+ var alert_text = '';
+ if (!isFilledOut('type')) alert_text += 'Please select the "Request Type".\n';
+ if (!isFilledOut('short_desc')) alert_text += 'Please enter a "Summary".\n';
+ if (!isFilledOut('gecko')) alert_text += 'Please select the "Gecko Version".\n';
+ if (!isFilledOut('details')) alert_text += 'Please enter some "Details".\n';
+ if (alert_text != '') {
+ alert(alert_text);
+ return false;
+ }
+ return true;
+}
+[% END %]
+
+[% PROCESS global/header.html.tmpl
+ title = "Developer Documentation Request"
+ style = inline_style
+ javascript = inline_javascript
+ javascript_urls = [ 'extensions/BMO/web/js/form_validate.js',
+ 'js/field.js', 'js/util.js' ]
+%]
+
+<h1>Developer Documentation Request</h1>
+
+<p>
+ Use this form to request <b>new documentation</b> or <b>corrections</b> to existing documentation.<br>
+ All fields except for the <i>Development [% terms.Bug %]</i> are mandatory.
+</p>
+
+<form method="post" action="post_bug.cgi" enctype="multipart/form-data"
+ onSubmit="return validateAndSubmit();">
+ <input type="hidden" name="format" value="doc">
+ <input type="hidden" name="product" value="Developer Documentation">
+ <input type="hidden" name="rep_platform" value="All">
+ <input type="hidden" name="op_sys" value="Other">
+ <input type="hidden" name="version" value="unspecified">
+ <input type="hidden" name="bug_severity" id="bug_severity" value="normal">
+ <input type="hidden" name="token" value="[% token FILTER html %]">
+
+<table id="doc_form">
+
+<tr>
+ <th>Request Type</th>
+ <td>
+ <select name="type" id="type">
+ <option value="">Please select..</option>
+ <option value="New Documentation">New Documentation</option>
+ <option value="Correction">Correction</option>
+ </select>
+ </td>
+</tr>
+
+<tr>
+ <th>Topic</th>
+ <td>
+ <select name="component" id="component">
+ [% FOREACH component = product.components %]
+ <option value="[% component.name FILTER html %]"
+ [% " selected" IF component.name == "General" %]>
+ [% component.name FILTER html %]
+ </option>
+ [% END %]
+ </select>
+ </td>
+</tr>
+
+<tr>
+ <th>Summary</th>
+ <td>
+ Please provide a brief summary of what documentation you're requesting, or
+ what problem you're reporting in existing documentation:<br>
+ <input type="text" name="short_desc" id="short_desc">
+ </td>
+</tr>
+
+<tr>
+ <th>Gecko Version</th>
+ <td>
+ <select name="gecko" id="gecko">
+ [% FOREACH version = versions %]
+ <option value="[% version.name FILTER html %]"
+ [% " selected" IF version.name == "unspecified" %]>
+ [% version.name FILTER html %]
+ </option>
+ [% END %]
+ </select>
+ </td>
+</tr>
+
+<tr>
+ <th>Details</th>
+ <td>
+ <textarea id="details" name="details" cols="50" rows="10"></textarea>
+ </td>
+</tr>
+
+<tr>
+ <th>Development [% terms.Bug %]</th>
+ <td>
+ <input type="text" id="blocked" name="blocked" size="10">
+ <i>Optional</i> &mdash; Corresponding development [% terms.bug %].
+ </td>
+</tr>
+
+<tr>
+ <th>Urgency</th>
+ <td>
+ <select name="priority" id="priority">
+ <option value="P1">Immediately</option>
+ <option value="P2">Before Release</option>
+ <option value="P3">Before Aurora</option>
+ <option value="P4">Before Beta</option>
+ <option value="P5" selected>No Rush</option>
+ </select>
+ <br>
+ Due to the volume of requests, the documentation team can't commit to
+ meeting specific deadlines for given documentation requests, but we will do
+ our best.
+ </td>
+</tr>
+
+<tr>
+ <td>&nbsp;</td>
+</tr>
+
+<tr>
+ <td>&nbsp;</td>
+ <td><input type="submit" id="commit" value="Submit Request"></td>
+</tr>
+
+</table>
+</form>
+
+[% PROCESS global/footer.html.tmpl %]