summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en/default/bug/create/create-costume.html.tmpl
blob: 0d83471779c5a675e133c9211d7f91b8248d0b99 (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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
[%# 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 %]
#custom_form .field_name {
  margin-bottom: 2px;
}

#custom_form .field_input {
  margin-bottom: 0.5em;
}


#custom_form th {
  text-align: right;
  font-weight: normal;
  white-space: nowrap;
}

#custom_form .heading {
  text-align: left;
  font-weight: bold;
  border-top: 2px dotted #969696;
}

#custom_form input[type="text"], #custom_form textarea {
  width: 300px;
  font-family: "Fira Sans","Open Sans","Helvetica Neue",Arial,Helvetica,sans-serif;
  font-size: 1em;
}

#custom_form input.short {
  width: 100px;
}

#custom_form .field_input p {
  margin: 2px 0;
}

.mandatory:after {
  content: " *";
  color: red;
}
[% END %]

[% inline_javascript = BLOCK %]
function validateAndSubmit() {
  var Dom = YAHOO.util.Dom;
  var alert_text = '';

  if (!isFilledOut('requester_name'))
    alert_text += "Please enter your name\n";
  if (!isFilledOut('requester_email'))
    alert_text += "Please enter your Email address\n";
  if (!isFilledOut('requester_profile'))
    alert_text += "Please provide your Mozillian Profile\n";
  if (!isFilledOut('responsible')) {
    alert_text += "Please provide your Mozillian Profile\n";
  } else {
    if (Dom.get('responsible').value == 'No' && !isFilledOut('responsible_other')) {
      alert_text += "Please provide the person responsible for the costume\n";
    }
  }

  if (!isFilledOut('event_count'))
    alert_text += "Please enter the number of events\n";
  if (!isFilledOut('event_dates'))
    alert_text += "Please enter date(s) of the event\n";
  if (!isFilledOut('event_type'))
    alert_text += "Please enter the type of event and attendance\n";
  if (!isFilledOut('goal'))
    alert_text += "Please select the Mozilla Goal\n";
  if (!isFilledOut('event_audience'))
    alert_text += "Please enter event's main audience\n";

  if (!isFilledOut('ship_firstname'))
    alert_text += "Please enter the shipping First name\n";
  if (!isFilledOut('ship_lastname'))
    alert_text += "Please enter the shipping Last name\n";
  if (!isFilledOut('ship_address1'))
    alert_text += "Please enter the shipping Address 1\n";
  if (!isFilledOut('ship_city'))
    alert_text += "Please enter the shipping City\n";
  if (!isFilledOut('ship_country'))
    alert_text += "Please enter the shipping Country\n";
  if (!isFilledOut('ship_phone'))
    alert_text += "Please enter the shipping Phone number\n";
  if (!isFilledOut('ship_email'))
    alert_text += "Please enter the shipping Email address\n";

  if (isFilledOut('requester_email') && !isValidEmail(Dom.get('requester_email').value))
    alert_text += "Please enter a valid Email address.\n";
  if (isFilledOut('ship_email') && !isValidEmail(Dom.get('ship_email').value))
    alert_text += "Please enter a valid shipping Email address.\n";

  if (alert_text != '') {
    alert(alert_text);
    return false;
  }

  Dom.get('short_desc').value = 'Firefox Costume Request - ' + YAHOO.util.Dom.get('requester_name').value;
  return true;
}

function on_responsible_change() {
  if (YAHOO.util.Dom.get('responsible').value == 'No') {
    YAHOO.util.Dom.removeClass('responsible_who', 'bz_default_hidden');
  }
  else {
    YAHOO.util.Dom.addClass('responsible_who', 'bz_default_hidden');
  }
}

YAHOO.util.Event.onDOMReady(function() {
  YAHOO.util.Event.addListener('responsible', 'change', on_responsible_change);
  on_responsible_change();
});
[% END %]

[% PROCESS global/header.html.tmpl
   title = "Firefox Costume 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' ]
%]

<h1>Firefox Costume Request Form</h1>

<p>
  Looking to get a Firefox Costume for your upcoming event(s)? Please use this
  form to tell us about your event(s). Filling out this form does not guarantee
  that you will receive the Fox costume. Requests are reviewed weekly. We will
  get back to you with next steps after we have reviewed.
</p>

<p>
  Before submitting your request, please make sure to review the
  <a href="https://wiki.mozilla.org/FirefoxCostume" target="_blank">Firefox Costume wiki pages</a>.
  You’ll find all the information you ever imagined needing, including details
  about what we’re looking for in your request, how it’s decided where a
  costume will be sent, and details about the actual costumes.
</p>

<form method="post" action="post_bug.cgi" enctype="multipart/form-data"
      onSubmit="return validateAndSubmit();">
  <input type="hidden" name="format" value="costume">
  <input type="hidden" name="product" value="Marketing">
  <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="priority" value="--">
  <input type="hidden" name="version" value="unspecified">
  <input type="hidden" name="bug_severity" id="bug_severity" value="normal">
  <input type="hidden" name="short_desc" id="short_desc" value="">
  <input type="hidden" name="groups" value="mozilla-engagement">
  <input type="hidden" name="token" value="[% token FILTER html %]">

<div id="custom_form">

  <h2>Requester's Information</h2>

  <div class="field_name mandatory">
    Name
  </div>
  <div class="field_input">
    <input type="text" name="requester_name" id="requester_name">
  </div>

  <div class="field_name mandatory">
    Email
  </div>
  <div class="field_input">
    <input type="text" name="requester_email" id="requester_email">
  </div>

  <div class="field_name mandatory">
    Mozillian Profile
  </div>
  <div class="field_input">
    <input type="text" name="requester_profile" id="requester_profile">
  </div>

  <div class="field_name mandatory">
    Will you be responsible for the costume at its destination?
  </div>
  <div class="field_input">
    <select id="responsible" name="responsible">
      <option></option>
      <option>Yes</option>
      <option>No</option>
    </select>
    <div id="responsible_who" class="bz_default_hidden mandatory">
      Who will be responsible for the costume?<br>
      <input type="text" name="responsible_other" id="responsible_other">
    </div>
  </div>

  <h2>Event Information</h2>

  <div class="field_name mandatory">
    Number of events Foxy will support
  </div>
  <div class="field_input">
    <input type="text" name="event_count" id="event_count" class="short">
  </div>

  <div class="field_name mandatory">
    Event date(s)
  </div>
  <div class="field_input">
    <input type="text" name="event_dates" id="event_dates">
  </div>

  <div class="field_name mandatory">
    Type of event(s) and estimated attendance at each
  </div>
  <div class="field_input">
    <textarea name="event_type" id="event_type" rows="5" cols="50"
              placeholder="Examples: Firefox OS in store launch event, Mozilla
                           [%~ %] company event, Conference, Press Conference,
                           [%~ %] Hack-a-thon."></textarea>
  </div>

  <div class="field_name mandatory">
    Mozilla Goal
  </div>
  <div class="field_input">
    <select name="goal" id="goal">
      <option></option>
      <option>Firefox OS</option>
      <option>Firefox Browser</option>
      <option>Services</option>
      <option>Org Support</option>
      <option>Million Mozillians</option>
      <option>Other</option>
    </select>
  </div>

  <div class="field_name mandatory">
    Main audience at the event
  </div>
  <div class="field_input">
    <textarea name="event_audience" id="event_audience" rows="5" cols="50"
              placeholder="Examples: Developers, Students, Mozillians, General
                           [%~ %] Public, Other."></textarea>
  </div>

  <div class="field_name">
    Event name (if applicable)
  </div>
  <div class="field_input">
    <input type="text" name="event_name" id="event_name">
  </div>

  <div class="field_name">
    Event website/wiki page (if applicable)
  </div>
  <div class="field_input">
    <input type="text" name="event_page" id="event_page">
  </div>

  <h2>Shipping Information</h2>

  <div class="field_name mandatory">
    First name
  </div>
  <div class="field_input">
    <input type="text" name="ship_firstname" id="ship_firstname">
  </div>

  <div class="field_name mandatory">
    Last name
  </div>
  <div class="field_input">
    <input type="text" name="ship_lastname" id="ship_lastname">
  </div>

  <div class="field_name mandatory">
    Address 1
  </div>
  <div class="field_input">
    <input type="text" name="ship_address1" id="ship_address1">
  </div>

  <div class="field_name">
    Address 2
  </div>
  <div class="field_input">
    <input type="text" name="ship_address2" id="ship_address2">
  </div>

  <div class="field_name mandatory">
    City
  </div>
  <div class="field_input">
    <input type="text" name="ship_city" id="ship_city">
  </div>

  <div class="field_name">
    State
  </div>
  <div class="field_input">
    <input type="text" name="ship_state" id="ship_state">
  </div>

  <div class="field_name mandatory">
    Country
  </div>
  <div class="field_input">
    <input type="text" name="ship_country" id="ship_country">
  </div>

  <div class="field_name">
    Postal Code
  </div>
  <div class="field_input">
    <input type="text" name="ship_postcode" id="ship_postcode" class="short">
  </div>

  <div class="field_name">
    Personal tax ID (if required)
  </div>
  <div class="field_input">
    <input type="text" name="ship_taxid" id="ship_taxid">
  </div>

  <div class="field_name mandatory">
    Phone number
  </div>
  <div class="field_input">
    <input type="text" name="ship_phone" id="ship_phone">
  </div>

  <div class="field_name mandatory">
    Email
  </div>
  <div class="field_input">
    <input type="text" name="ship_email" id="ship_email">
  </div>

  <div class="field_name">
    More Information
  </div>
  <div class="field_input">
    <textarea name="notes" id="notes" rows="5" cols="50"
              placeholder="Additional notes, comments, etc."></textarea>
  </div>
  <h2></h2>

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

</div>
</form>

<p>
  <span class="mandatory"></span> Required Field
</p>

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