forked from pack-it-forms/pack-it-forms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
form-oa-shelter-status.html
425 lines (424 loc) · 18.1 KB
/
form-oa-shelter-status.html
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
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<link rel="stylesheet" type="text/css" href="resources/css/loading.css"/>
<link rel="stylesheet" type="text/css" href="resources/css/pack-it-forms.css"/>
<style>
table.shelter-status td:nth-child(1) {
border-right: none;
white-space: nowrap;
width: 1px;
vertical-align: middle;
}
table.shelter-status td:nth-child(2) {
border-left: none;
}
.annotation {
font-size: 80%;
}
table.shelter-status label {
font-weight: normal;
}
</style>
<script type="text/javascript" src="resources/js/pack-it-forms.js"></script>
<script type="text/javascript" src="resources/integration/integration.js"></script>
<meta name="pack-it-forms-pdf-URL" content="pdf/XSC_SheltStat_v190619b_Fillable.pdf">
<meta name="pack-it-forms-subject-suffix" content="_SheltStat_{{field:32.shelter-name}}">
<script type="text/javascript">
var managerText = null;
var managerOther = null;
var managerOptions = [
"", // nothing selected
"American Red Cross",
"Private",
"Community",
"Government"];
integration.after("load_configuration", function() {
var cityOptions = [
"Campbell",
"Cupertino",
"Gilroy",
"Los Altos",
"Los Altos Hills",
"Los Gatos",
"Milpitas",
"Monte Sereno",
"Morgan Hill",
"Mountain View",
"Palo Alto",
"San Jose",
"Santa Clara",
"Saratoga",
"Sunnyvale"];
ComboBox.getByName("7a.to-ics-position").setOptions(
["Mass Care and Shelter Unit", "Care and Shelter Branch", "Operations Section"]);
ComboBox.getByName("34b.shelter-city").setOptions(cityOptions);
compatible_values("34b.shelter-city", cityOptions, "33b.shelter-city", "Unincorporated");
compatible_values("49a.managed-by", managerOptions, "50a.managed-by", "Other")
managerText = document.querySelector('input[name="49a.managed-by"][type="text"]');
managerOther = document.querySelector('input[name="49a.managed-by"][type="radio"][value=""]');
function addChangeListener(input, onChange) {
input.addEventListener('change', onChange);
input.addEventListener('input', onChange);
}
function onManagerRadio(event) {
if (this.value) {
managerText.value = "";
managerText.disabled = true;
} else {
managerText.disabled = false;
managerText.focus();
}
}
array_for_each(
document.querySelectorAll('input[name="49a.managed-by"][type="radio"]'),
function(radioButton) {
addChangeListener(radioButton, onManagerRadio);
});
function onManagerOther(event) {
if (managerOther.checked && !managerText.value) {
set_properties({"50a.managed-by": {value: "Other"}});
}
}
addChangeListener(managerOther, onManagerOther);
addChangeListener(managerText, onManagerOther);
});
integration.after("late_startup", function() {
if (managerText.value) {
if (managerOptions.indexOf(managerText.value) < 0) {
// There's no radio button to represent this value.
// Select the 'Other' button.
managerOther.checked = true;
if (managerText.value == "Other") {
managerText.value = "";
}
} else {
// The radio button for this value is checked.
// Don't show the same value in the text field:
managerText.value = "";
}
}
});
function compute_availability() {
var valid_int_value = function(id) {
var element = document.getElementById(id);
return (element.value && element.validity && element.validity.valid)
? parseInt(element.value) : null;
};
var capacity = valid_int_value("shelter-capacity");
var occupancy = valid_int_value("shelter-occupancy");
var newValue = (capacity != null && occupancy != null) ? (capacity - occupancy) : "";
var availability = document.getElementById("shelter-availability");
availability.value = newValue;
if (newValue != "" && newValue < 0) {
availability.style.setProperty("background-color", "#f8ecec");
} else {
availability.style.removeProperty("background-color");
}
}
function copyShelterName(input) {
document.getElementById('shelter-name-copy').innerHTML = text_to_HTML(input.value);
}
</script>
<title>Shelter Status</title>
</head>
<body>
<div class="version">2.3</div>
<%#include%>resources/html/loading.html<%/include%>
<form id="the-form" name="the-form">
<%#run%>include("resources/html/scco-header.html", {
"title": "Santa Clara OA Shelter Status",
"version": "WebEOC: 20130814<br/>PIF: {{version}}",
"handling": "PRIORITY",
"to-ics-position": "Mass Care and Shelter Unit"
})
<%/run%>
<table class="shelter-status" style="page-break-inside:avoid;">
<tr>
<td colspan="2" style="border-right:1px solid #aaaaaa;">
<table class="same-line-label-layout">
<tr>
<th>Report Type:</th>
<td class="label-sameline" style="width:1px;">
<div class="required-group" style="padding-right:0.5em;">
<label>
<input name="19.report-type" type="radio" value="Update" required tabindex="19"
onchange="if (this.checked) on_report_type(false)">Update
</label>
<label style="margin-left:1em;">
<input name="19.report-type" type="radio" value="Complete" required tabindex="19"
onchange="if (this.checked) on_report_type(true)">Complete
</label>
</div>
</td>
<th style="padding-left:2em;">Shelter Name:</th>
<td class="label-sameline">
<input name="32.shelter-name" type="text" required tabindex="29"
onchange="copyShelterName(this)" oninput="copyShelterName(this)"/>
</td>
</tr>
</table>
</td>
</tr><tr>
<td colspan="2" class="block-caption">Shelter</td>
</tr><tr>
<td>Shelter Type:</td>
<td class="label-sameline">
<span class="annotation">(Pick One)</span>
<div class="required-group">
<label style="width:8em;">
<input class="required-for-complete"
name="30.shelter-type" type="radio" value="Type 1" tabindex="30"/>Type 1
</label>
<label style="width:8em;">
<input name="30.shelter-type" type="radio" value="Type 2" tabindex="30"/>Type 2
</label>
<label style="width:8em;">
<input name="30.shelter-type" type="radio" value="Type 3" tabindex="30"/>Type 3
</label>
<label style="width:8em;">
<input name="30.shelter-type" type="radio" value="Type 4" tabindex="30"/>Type 4
</label>
</div>
</td>
</tr><tr>
<td>Status:</td>
<td class="label-sameline">
<span class="annotation">(Pick One)</span>
<div class="required-group">
<label style="width:8em;">
<input class="required-for-complete"
name="31.shelter-status" type="radio" value="Open" tabindex="31"/>Open
<span class="annotation">(Green)</span>
</label>
<label style="width:8em;">
<input name="31.shelter-status" type="radio" value="Closed" tabindex="31"/>Closed
<span class="annotation">(Red)</span>
</label>
<label style="width:8em;">
<input name="31.shelter-status" type="radio" value="Full" tabindex="31"/>Full
<span class="annotation">(Yellow)</span>
</label>
</div>
</td>
</tr><tr>
<td>Name:</td>
<td><span id="shelter-name-copy" class="instead-of-input"></span>
</tr><tr>
<td>Address:</td>
<td><input type="text" name="33a.shelter-address" class="required-for-complete" tabindex="33"/></td>
</tr><tr>
<td>City:</td>
<td>
<input type="text" name="33b.shelter-city" style="display:none;"/>
<%#run%>include('resources/html/combobox.html', {
name: "34b.shelter-city",
width: "20em",
tabindex: "34",
attributes: 'class="required-for-complete" placeholder="Select one..."',
})<%/run%>
</td>
</tr><tr>
<td>State:</td>
<td>
<input name="33c.shelter-state" type="text" style="width:8em;" tabindex="35"
class="required-for-complete"/>
</td>
</tr><tr>
<td>Zip:</td>
<td><input name="33d.shelter-zip" type="text" style="width:8em;" tabindex="36"/></td>
</tr><tr>
<td>Latitude:</td>
<td>
<input type="text" name="37a.latitude" class="real-number" tabindex="37"
placeholder="d.ddd°"/>
Longitude:
<input type="text" name="37b.longitude" class="real-number" tabindex="38"
placeholder="d.ddd°"/>
</td>
</tr>
</table><table class="shelter-status" style="page-break-inside:avoid;">
<tr>
<td colspan="2" class="block-caption">Shelter Information</td>
</tr><tr>
<td>Capacity:</td>
<td>
<input name="40a.capacity" type="text" class="cardinal-number required-for-complete"
id="shelter-capacity" onchange="compute_availability(this)" tabindex="40"/>
</td>
</tr><tr>
<td>Occupancy:</td>
<td>
<input name="40b.occupancy" type="text" class="cardinal-number required-for-complete"
id="shelter-occupancy" onchange="compute_availability(this)" tabindex="41"/>
Availability:
<input type="text" class="cardinal-number" id="shelter-availability" tabindex="-1"
disabled/>
</td>
</tr><tr>
<td>Meals Served (last 24 hours):</td>
<td><input type="text" name="41.meals" tabindex="42"/></td>
</tr><tr>
<td>NSS Number:</td>
<td><input type="text" name="42.NSS" tabindex="43"/></td>
</tr><tr>
<td>Pet Friendly:</td>
<td class="label-sameline">
<label><input name="43a.pet-friendly" type="radio" value="checked" tabindex="44"/>Yes</label>
<label><input name="43a.pet-friendly" type="radio" value="false" tabindex="44"/>No</label>
</td>
</tr><tr>
<td>Basic Safety Inspection:</td>
<td class="label-sameline">
<label><input name="43b.basic-safety" type="radio" value="checked" tabindex="45"/>Yes</label>
<label><input name="43b.basic-safety" type="radio" value="false" tabindex="45"/>No</label>
</td>
</tr><tr>
<td>ATC 20 Inspection:</td>
<td>
<label><input name="43c.ATC-20" type="radio" value="checked" tabindex="46"/>Yes</label>
<label><input name="43c.ATC-20" type="radio" value="false" tabindex="46"/>No</label>
</td>
</tr><tr>
<td style="vertical-align:top;">Available Services:</td>
<td><textarea name="44.available-services" rows="4" tabindex="47"></textarea></td>
</tr><tr>
<td>MOU:</td>
<td><input type="text" name="45.MOU" tabindex="48"
placeholder="where/how sent"/></td>
</tr><tr>
<td>Floor Plan:</td>
<td><input type="text" name="46.floor-plan" tabindex="49"
placeholder="where/how sent"/></td>
</tr>
</table><table class="shelter-status" style="page-break-inside:avoid;">
<tr>
<td colspan="2" class="block-caption">Contact Information</td>
</tr><tr>
<td style="padding-top:0.5em;vertical-align:top;">
Managed By: <span class="annotation">(Pick One)</span>
</td>
<td>
<input type="text" name="50a.managed-by" style="display:none;"/>
<div class="required-group">
<table class="same-line-label-layout">
<tr>
<td class="label-sameline" style="padding-bottom:0.5em;">
<label>
<input class="required-for-complete"
name="49a.managed-by" type="radio"
value="American Red Cross" tabindex="50"/>American Red Cross
</label>
</td><td class="label-sameline" style="padding-bottom:0.5em;width:1px;padding-right:0.5em;">
<label>
<input name="49a.managed-by" type="radio" value="Private" tabindex="50"/>Private
</label>
</td><td class="label-sameline" style="padding-bottom:0.5em;padding-left:1em;">
<label>
<input name="49a.managed-by" type="radio" value="Community" tabindex="50"/>Community
</label>
</td>
</tr><tr>
<td class="label-sameline">
<label>
<input name="49a.managed-by" type="radio" value="Government" tabindex="50"/>Government
</label>
</td><td class="label-sameline" style="width:1px;padding-right:0px;">
<label>
<input name="49a.managed-by" type="radio" value="" tabindex="50"/>Other:
</label>
</td><td class="label-sameline" style="padding-left:0px;vertical-align:bottom;">
<input name="49a.managed-by" type="text" disabled tabindex="50"/>
</td>
</tr>
</table>
</div>
</td>
</tr><tr>
<td>Managed By Detail:</td>
<td><input type="text" name="50b.managed-by-detail" tabindex="51"/></td>
</tr><tr>
<td>Primary Contact:</td>
<td>
<input type="text" name="51a.primary-contact" class="required-for-complete"
tabindex="52"/>
</td>
</tr><tr>
<td>Primary Contact Phone:</td>
<td>
<input type="text" name="51b.primary-phone" class="phone-number required-for-complete"
tabindex="53"/>
</td>
</tr><tr>
<td>Secondary Contact:</td>
<td>
<input type="text" name="52a.secondary-contact"
tabindex="54"/>
</td>
</tr><tr>
<td>Secondary Contact Phone:</td>
<td>
<input type="text" name="52b.secondary-phone" class="phone-number clearable"
tabindex="55"/>
</td>
</tr>
</table><table class="shelter-status" style="page-break-inside:avoid;">
<tr>
<td colspan="3" class="block-caption">Amateur Radio Information</td>
</tr><tr>
<td>Tactical Call Sign:</td>
<td colspan="2"><input name="60.tactical-call" type="text" tabindex="60"/></td>
</tr><tr>
<td>Repeater Call Sign:</td>
<td colspan="2">
<input name="61.repeater-call" type="text" class="call-sign" tabindex="61"/>
</td>
</tr><tr>
<td>Repeater Input:</td>
<td style="padding-right:1em;width:1px;">
<input type="text" name="62a.repeater-input" tabindex="62"
class="frequency"/> MHz
</td><td class="label-sameline">
Tone or Code:
<input type="text" name="62b.repeater-input-tone" tabindex="63"
style="width:16em;"/>
</td>
</tr><tr>
<td>Repeater Output:</td>
<td class="label-sameline" style="padding-right:1em;">
<input type="text" name="63a.repeater-output" tabindex="64"
class="frequency"/> MHz
</td><td class="label-sameline">
Tone or Code:
<input type="text" name="63b.repeater-output-tone" tabindex="65"
style="width:16em;"/>
</td>
</tr><tr>
<td>Repeater Offset:</td>
<td colspan="2">
<input type="text" name="62c.repeater-offset" tabindex="66"
class="frequency-offset"/>
MHz (or "+" or "-" for standard)
</td>
</tr>
</table><table class="shelter-status" style="page-break-inside:avoid;">
<tr>
<td colspan="2" class="block-caption">Comments</td>
</tr><tr>
<td style="vertical-align:top;">Comments:</td>
<td><textarea name="70.comments" rows="4" tabindex="70"></textarea></td>
</tr><tr>
<td colspan="2" style="border-right:1px solid #aaaaaa;">
Remove from List:
<label><input name="71.remove-from-active-list" type="radio" value="checked" tabindex="71"/>Yes</label>
<label><input name="71.remove-from-active-list" type="radio" value="false" tabindex="71"/>No</label>
</td>
</tr>
</table>
<br/>
<%#include%>resources/html/scco-footer.html<%/include%>
</form>
<%#include%>resources/html/submit-buttons.html<%/include%>
</body>
</html>