summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en/default/bug/create/create-fxos-feature.html.tmpl
blob: ae6a8873f9611501d773f72ed321023409abf684 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
[%# 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 %]
#feature_form {
  padding: 10px;
}
#feature_form .required:after {
  content: " *";
  color: red;
}
#feature_form .field_label {
  font-weight: bold;
}
#feature_form .field_desc {
  padding-bottom: 3px;
}
#feature_form .field_desc,
#feature_form .head_desc {
  width: 600px;
  word-wrap: normal;
}
#feature_form .head_desc {
  padding-top: 5px;
  padding-bottom: 12px;
}
#feature_form .form_section {
  margin-bottom: 10px;
}
#feature_form textarea {
  font-family: inherit;
  font-size: inherit;
}
#feature_form #comp_description {
  test-align: left;
  color: green;
  padding-left: 1em;
}
#feature_form .hidden {
  display: none;
}
[% END %]

[% inline_javascript = BLOCK %]
var compdesc = [];
compdesc[""] = 'Please select a component from the list above.';
[% FOREACH comp = product.components %]
  compdesc['[% comp.name FILTER js %]'] = '[% comp.description FILTER js %]';
[% END %]
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 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;
}

$(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', 'js/field.js' ]
%]

[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]

<form id="feature_form" method="post" action="post_bug.cgi" enctype="multipart/form-data"
      onSubmit="return validateAndSubmit();">
  <input type="hidden" name="format" value="fxos-feature">
  <input type="hidden" name="product" value="Firefox OS">
  <input type="hidden" name="keywords" id="keywords" value="foxfood">
  <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_status" value="UNCONFIRMED">
  <input type="hidden" name="bug_severity" value="normal">
  <input type="hidden" name="token" value="[% token FILTER html %]">

<img title="Firefox OS Feature Form" src="extensions/BMO/web/producticons/firefox_os.png" width="64" height="64">

<div class="form_section">
  <label for="component" class="field_label required">Product Component</label>
  <div class="field_desc">
    Which product component is your feature request applicable to?
    If you are not sure, choose "Gaia::Feedback".
  </div>
  <select name="component" id="component" onchange="showCompDesc(this);">
    <option value="">Select One</option>
    [% FOREACH c IN product.components %]
      [% NEXT UNLESS c.is_active %]
      [% NEXT UNLESS c.name == "Gaia::Feedback" %]
      <option value="[% c.name FILTER html %]" id="v[% c.id FILTER html %]_component"
              [% " selected" IF c.name == default.component_ %]>
        [% c.name FILTER html %]
      </option>
    [% END %]
    [% FOREACH c IN product.components %]
      [% NEXT UNLESS c.is_active %]
      [% NEXT IF c.name == "Gaia::Feedback" %]
      <option value="[% c.name FILTER html %]" id="v[% c.id FILTER html %]_component"
              [% " selected" IF c.name == default.component_ %]>
        [% c.name FILTER html %]
      </option>
    [% END %]
  </select>
  <div id="comp_description"></div>
</div>

<div class="form_section">
  <label for="feature_type" class="field_label required">This is a feature request</label>
  <div class="field_desc">
    Is this a defect with existing functionality or a new feature request?
  </div>
  <select id="feature_type" name="feature_type">
    <option value="new" [%= "selected" IF feature_type == 'new' %]>
      New Feature Request</option>
    <option value="existing" [%= "selected" IF feature_type == 'existing' %]>
      Existing Feature Defect</option>
  </select>
</div>

<div class="form_section">
  <label for="short_desc" class="field_label required">Feature Request Summary</label>
  <div class="field_desc">
    Please enter a title for your feature request that is brief and self explanatory.
    (Example: "Memory dialing using keypad numbers")
  </div>
  <input type="text" name="short_desc" id="short_desc"
         size="80" value="[% short_desc FILTER html %]">
</div>

<div class="form_section">
  <label for="description" class="field_label">Description of feature or problem to be solved</label>
  <div class="field_desc">
    Please describe the feature that you are requesting or the problem that you would like solved in detail
    (Example, "Today, there is no way for the user to quickly dial user-defined numbers from the dial pad.
    Instead the user must search for an find the contact in their contact list.").
    If the described feature only applies to certain device types (eg. tablet vs. smartphone), please make note of it.
  </div>
  <textarea id="description" name="description" cols="80" rows="5">
    [% description FILTER html %]</textarea>
</div>

<div class="form_section">
  <label for="discussion" class="field_label">Was this discussed in a mailing list?</label>
  <div class="field_desc">
  </div>
  <select id="discussion" name="discussion">
    <option value="no" [%= "selected" IF discussion == 'no' %]>No</option>
    <option value="yes" [%= "selected" IF discussion == 'yes' %]>Yes</option>
  </select>
</div>

<div class="form_section thread hidden">
  <label for="bug_file_loc" class="field_label required">Mailing list thread</label>
  <div class="field_desc">
    The mailing list post where this was discussed.<br>
    e.g. https://groups.google.com/a/mozilla.com/forum/#!topic/foxfood-feedback/eCg6KaVD4FE
  </div>
  <input type="text" name="bug_file_loc" id="bug_file_loc" size="80"
         value="[% bug_file_loc FILTER html %]" disabled>
</div>

<div class="form_section thread hidden">
  <label for="cc" class="field_label">Stakeholder email addresses</label>
  <div class="field_desc">
    Anyone you think would like to follow this request. You may include people
    who discussed this in the mailing list thread, if there was one.
  </div>
  [% INCLUDE global/userselect.html.tmpl
     id       => "cc"
     name     => "cc"
     value    => cc
     size     => 80
     classes  => ["bz_userfield"]
     multiple => 5
  %]
</div>

<div class="head_desc">
  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!
</div>

<input type="submit" id="commit" value="Submit">

<p>
  [ <span class="required_star">*</span> <span class="required_explanation">Required Field</span> ]
</p>

</form>

[% PROCESS global/footer.html.tmpl %]