summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en/default/bug/create/create-automative.html.tmpl
blob: d1ed4b4b54aa4808811bdaecb5a730fbeeb7a900 (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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
[%# 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 %]
#automative_form {
  padding: 10px;
}
#automative_form .required:after {
  content: " *";
  color: red;
}
#automative_form .field_label {
  font-weight: bold;
}
#automative_form .field_desc {
  padding-bottom: 3px;
}
#automative_form .field_desc,
#automative_form .head_desc {
  width: 600px;
  word-wrap: normal;
}
#automative_form .head_desc {
  padding-top: 5px;
  padding-bottom: 12px;
}
#automative_form .form_section {
  margin-bottom: 10px;
}
#automative_form textarea {
  font-family: inherit;
  font-size: inherit;
}
#automative_form em {
  font-size: 1em;
}
.yui-calcontainer {
  z-index: 2;
}
[% END %]

[% inline_javascript = BLOCK %]
function validateAndSubmit() {
  'use strict';
  var alert_text = '';
  var requiredLabels = YAHOO.util.Selector.query('label.required');
  if (requiredLabels) {
    requiredLabels.forEach(function (label) {
      var name = label.getAttribute('for');
      var ids = YAHOO.util.Selector.query(
        '#automative_form *[name="' + name + '"]'
      ).map(function (e) {
        return e.id
      });

      if (ids && ids[0]) {
        if (!isFilledOut(ids[0])) {
          var desc = label.textContent || name;
          alert_text +=
            "Please enter a value for " +
            desc.replace(/[\r\n]+/, "").replace(/\s+/g, " ") +
            "\n";
        }
      }
    });
  }

  if (alert_text != '') {
    alert(alert_text);
    return false;
  }
  return true;
}
[% END %]

[% PROCESS global/header.html.tmpl
   title = "Automation Request Form"
   generate_api_token = 1
   style = inline_style
   javascript = inline_javascript
   javascript_urls = [ 'extensions/BMO/web/js/form_validate.js',
                       'js/field.js', 'js/util.js' ]
%]

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

<form id="automative_form" method="post" action="post_bug.cgi"
  enctype="multipart/form-data" onSubmit="return validateAndSubmit();">
  <input type="hidden" name="format" value="automative">
  <input type="hidden" name="product" value="Testing">
  <input type="hidden" name="component" value="General">
  <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 %]">
  <input type="hidden" name="assigned_to" value="jgriffin@mozilla.com">

  <div class="head_desc">
    Welcome to the Automation Request Form!
  </div>

  <div class="form_section">
    <label for="short_desc" class="field_label required">Summary</label>
    <div class="field_desc">
      One-line summary of the problem you'd like automation to help solve
    </div>
    <input type="text" name="short_desc" id="short_desc" size="80">
  </div>

  <div class="form_section">
    <label for="desc_problem" class="field_label required">Problem</label>
    <div class="field_desc">
      Detailed description of the problem
    </div>
    <textarea id="desc_problem" name="desc_problem"
      cols="80" rows="5"></textarea>
  </div>

  <div class="form_section">
    <label for="desc_solution" class="field_label required">Solution</label>
    <div class="field_desc">
      Detailed description of the proposed automation solution
    </div>
    <textarea id="desc_solution" name="desc_solution"
      cols="80" rows="5"></textarea>
  </div>

  <div class="form_section">
    <label for="desc_top_level_goal" class="field_label required">Top Level
      Goal</label>
    <div class="field_desc">Describe the top-level project goal which this is
      supporting</div>
    <textarea id="desc_top_level_goal" name="desc_top_level_goal" cols="80"
      rows="5"></textarea>
  </div>

  <div class="form_section">
    <label for="existing_bug" class="field_label">Existing [% terms.Bug %]
      number </label>
    <div class="field_desc"> Existing [% terms.bug %] (if any) </div>
    <input type="text" name="existing_bug" id="existing_bug" size="80">
  </div>

  <div class="form_section">
    <label for="per_commit" class="field_label">Run per-commit?</label>
    <div class="field_desc">
      Does this automation need to be run per-commit and report to TBPL?  Can it
      be run less frequently?
    </div>
    <input type="text" name="per_commit" id="per_commit" size="80">
  </div>

  <div class="form_section">
    <label for="desc_data_produce" class="field_label">Data capture?</label>
    <div class="field_desc">If this automation will report data other than
      pass/fail (e.g. some sort of performance metric), describe the data that
      you'd like to have the automation produce.  Do we already have a method of
      capturing this kind of data, or do we need to develop one?</div>
    <textarea id="desc_data_produce" name="desc_data_produce" cols="80"
      rows="5"></textarea>
  </div>

  <div class="form_section">
    <label for="prototype_date" class="field_label">Prototype Date</label>
    <div class="field_desc">
      When is a prototype needed?
    </div>
    <input name="prototype_date" size="20" id="prototype_date" value=""
      onchange="updateCalendarFromField(this)">
    <button type="button" class="calendar_button"
      id="button_calendar_prototype_date"
      onclick="showCalendar('prototype_date')">
      <span>Calendar</span>
    </button>
    <div id="con_calendar_prototype_date"></div>
    <script [% script_nonce FILTER none %]>
      createCalendar('prototype_date')
    </script>
  </div>

  <div class="form_section">
    <label for="production_date" class="field_label">Production Date</label>
    <div class="field_desc">
      When is a finished project running in production needed?
    </div>
    <input name="production_date" size="20" id="production_date" value=""
      onchange="updateCalendarFromField(this)">
    <button type="button" class="calendar_button"
      id="button_calendar_production_date"
      onclick="showCalendar('production_date')">
      <span>Calendar</span>
    </button>
    <div id="con_calendar_production_date"></div>
    <script [% script_nonce FILTER none %]>
      createCalendar('production_date')
    </script>
  </div>

  <div class="form_section">
    <label for="most_valuable_piece" class="field_label">Most Valuable
      Piece?</label>
    <div class="field_desc">If there are multiple pieces, tests, or features in
      the proposed automation, what is the single most valuable piece?</div>
    <input type="text" name="most_valuable_piece" id="most_valuable_piece"
      size="80">
  </div>

  <div class="form_section">
    <label for="responsible_engineer" class="field_label">Responsible
      Engineer</label>
    <div class="field_desc">
      Which engineer is responsible for working with the automation engineer for
      information, support, and troubleshooting?
    </div>
    [% INCLUDE global/userselect.html.tmpl
      id       => "responsible_engineer"
      name     => "responsible_engineer"
      value    => ""
      size     => 80
      classes  => ["bz_userfield"]
    %]
  </div>

  <div class="form_section">
    <label for="manager" class="field_label">Manager</label>
    <div class="field_desc">
      Which manager/project manager is responsible for issues related to
      milestones and priorities?
    </div>
    [% INCLUDE global/userselect.html.tmpl
      id       => "manager"
      name     => "manager"
      value    => ""
      size     => 80
      classes  => ["bz_userfield"]
    %]
  </div>

  <div class="form_section">
    <label for="other_teams" class="field_label">Other Teams</label>
    <div class="field_desc">
      What other teams are involved and are there any other external
      dependencies?
    </div>
    <textarea id="other_teams" name="other_teams" cols="80"
      rows="5"></textarea>
  </div>

  <div class="form_section">
    <label for="additional_info" class="field_label">Additional
    Information</label>
    <div class="field_desc">
      Additional information
    </div>
    <textarea id="additional_info" name="additional_info" cols="80"
      rows="5"></textarea>
  </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 %]