-
Notifications
You must be signed in to change notification settings - Fork 2
/
spc-submission.php
221 lines (200 loc) · 8.17 KB
/
spc-submission.php
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
<style type="text/css">
#slivkan-entry-tab-buttons{
margin: 10px 0;
display: block;
}
.slivkan-entry-control, .fellow-entry-control{
width: 100%;
margin: auto 0 10px;
}
.fellow-entry-control:first-child{
margin-top: 10px;
}
.input-group-addon{
padding: 6px 8px;
width: 35px;
}
.nav.nav-tabs{
margin: 0 15px;
}
.well{
margin-bottom: -15px;
}
</style>
<form autocomplete="off" onsubmit="return false;" role="form">
<div class="row">
<div class="col-lg-5 col-lg-offset-1 col-sm-6">
<div class="form-group filled-by-control col-md-12">
<label class="control-label" for="filled-by">Points filled out by:</label>
<input type="text" name="filled-by" id="filled-by" class="form-control">
</div>
<div class="form-group col-md-12">
<label class="control-label" for="type">Type:</label>
<div class="btn-group btn-group-justified" id="type" data-toggle="buttons" style="table-layout: auto;"><!--style="display: block;"-->
<label class="btn btn-default btn-sm type-btn">
<input type="radio" name="type" value="P2P"> P2P
</label>
<label class="btn btn-default btn-sm type-btn">
<input type="radio" name="type" value="IM"> IM
</label>
<label class="btn btn-default btn-sm type-btn">
<input type="radio" name="type" value="House Meeting">
<span class="hidden-xs"> House Meeting</span>
<span class="visible-xs"> Hse Mtg</span>
</label>
<label class="btn btn-default btn-sm type-btn">
<input type="radio" name="type" value="Committee Only">
<span class="hidden-xs"> Committee Only</span>
<span class="visible-xs"> Cmte Only</span>
</label>
<label class="btn btn-default btn-sm type-btn active">
<input type="radio" name="type" value="Other"> Other
</label>
</div>
</div>
<div class="form-group im-team-control col-md-6" style="display: none">
<label class="control-label" for="im-team">Team:</label>
<select id="im-team" class="form-control"></select>
</div>
<div class="clearfix"></div>
<div class="form-group event-control col-md-12">
<label class="control-label" for="event">Event name:</label>
<input type="text" name="event" id="event" class="form-control">
<div class="help-block" id="event-name-error" style="display:none;">Event name + date combination taken</div>
<div class="help-block" id="event-name-length-error" style="display:none;">Event name must be between 8 and 32 characters.<br/><span id="event-name-length-error-count"></span></div>
</div>
<div class="form-group col-md-4 col-sm-6">
<label for="date">Date:</label>
<select id="date" class="form-control"></select>
</div>
<div class="clearfix"></div>
<div class="form-group committee-control col-md-4 col-sm-6">
<label class="control-label">Committee:</label>
<select id="committee" class="form-control">
<option class="not-standing-committee">Select One</option>
<option class="not-standing-committee">Exec</option>
<option>Academic</option>
<option>Facilities</option>
<option>Faculty</option>
<option>IT</option>
<option>Philanthropy</option>
<option>Publications</option>
<option>Social</option>
<option class="not-standing-committee" value="CA">RA</option>
<option class="not-standing-committee">Other</option>
</select>
</div>
<div class="clearfix"></div>
<div class="form-group description-control col-md-12">
<label class="control-label" for="description">Description:</label>
<textarea rows="3" name="description" id="description" class="form-control"></textarea>
<div class="help-block" id="description-length-error" style="display: none;">Be enthusiastic and descriptive!</div>
</div>
<div class="form-group col-md-12">
<label class="control-label" for="comments">Comments:</label>
<small class="help-block">No-shows, issues with form, etc.</small>
<textarea name="comments" id="comments" class="form-control" rows="3"></textarea>
</div>
</div>
<div class="col-lg-5 col-sm-6">
<ul class="nav nav-tabs" id="tabs">
<li class="active"><a href="#slivkan-entry-tab" data-toggle="tab"><span>Attendees</span></a></li>
<li><a href="#fellow-entry-tab" data-toggle="tab"><span>Fellows</span></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active col-md-12" id="slivkan-entry-tab" >
<div class="alert alert-success" id="sort-alert" style="display: none;">
<button type="button" class="close" id="close-sort-alert">×</button>
<small>Sorted names!</small>
</div>
<div class="alert alert-warning" id="duplicate-alert" style="display: none;">
<button type="button" class="close" id="close-dupe-alert">×</button>
<small>Duplicate name!</small>
</div>
<div id="slivkan-entry-tab-buttons">
<div class="btn btn-default" role="button" data-toggle="modal" data-target="#QR-entry" title="add QR Codes / Wildcards"><i class="glyphicon glyphicon-qrcode"></i> Bulk Entry <i class="glyphicon glyphicon-barcode"></i></div>
<div class="btn btn-default" id="sort-entries"><i class="glyphicon glyphicon-sort-by-alphabet" title="Sort"></i></div>
</div>
<div class="form-group input-group slivkan-entry-control">
<div class="input-group-addon">1</div>
<input type="text" class="slivkan-entry form-control" name="slivkan-entry" placeholder="Slivkan">
</div>
</div>
<div class="tab-pane col-md-12" id="fellow-entry-tab">
<div class="form-group input-group fellow-entry-control">
<div class="input-group-addon">1</div>
<input type="text" class="fellow-entry form-control" name="fellow-entry" placeholder="Fellow">
</div>
</div>
</div><!--tab-content-->
<div class="help-block col-md-12"><small>Additional inputs appear automatically.</small></div>
</div>
</div>
<div class="row">
<div class="well col-md-12">
<div class="help-block alert alert-danger col-md-6 pull-left" id="submit-error" style="display: none;"></div>
<div class="pull-right">
<button type="submit" class="btn btn-primary btn-lg" id="submit">Validate</button>
<button type="button" class="btn btn-default btn-lg" id="reset">Reset</button>
</div>
<div class="clearfix"></div>
<?php include('credits.html'); ?>
</div>
</div>
</form>
<div class="clearfix"></div>
<div id="QR-entry" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4>Paste Names / Wildcard Barcodes</h4>
</div>
<div class="modal-body">
<textarea name="bulk-names" id="bulk-names" rows="12" class="form-control"></textarea>
</div>
<div class="modal-footer">
<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>
<a href="#" class="btn btn-primary" id="add-bulk-names" data-dismiss="modal" >Add Names</a>
</div>
</div>
</div>
</div>
<div id="submit-results" class="modal fade" role="dialog" >
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>Form Receipt</h3>
</div>
<div class="modal-body">
<table class="table table-bordered table-condensed">
<tbody id="receipt"></tbody>
</table>
</div>
<div class="modal-footer">
<div id="unconfirmed">
<button type="button" class="btn btn-primary" id="real-submit" data-loading-text="Sending...">Submit</button>
<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>
</div>
<div id="confirmed" style="display: none;">
<span>If an error occurs, email the receipt to the VP.</span>
<a href="../table/" class="btn btn-primary">View Points</a>
</div>
</div>
</div>
</div>
</div>
<script id="resultsTemplate" type="text/template">
<% forEach(data, function(val, key) { %>
<tr class="results-row">
<td class="results-label">
<%= key %>
</td>
<td class="results">
<% if (val.join) { print(val.join(', ')) } else { print(val) } %>
</td>
</tr>
<% }) %>
<tr class="warning"><td>Status</td><td id="results-status">Unsubmitted</td></tr>
</script>