-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvendor.html
307 lines (297 loc) · 12.5 KB
/
vendor.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Apply to be a Vendor</title>
<meta name="description" content="Vendor Application for the Castleton Art & Craft Fair">
<meta name="author" content="CCantrell">
<link rel="shortcut icon" type="image/png" href="http://www.castletonumc-artandcraftfair.org/images/circle_favicon.png" />
<link rel="stylesheet" type="text/css" href="css/CUMCAandCstyles.css">
<script>
function _(el){
return document.getElementById(el);
}
function uploadFile(){
// Validate fields.
var OK2Submit = true;
if (_('fname').value.length == 0) {
_('fname').value = "Please enter your first name.";
OK2Submit = false;
}
if (_('lname').value.length == 0) {
_('lname').value = "Please enter your last name.";
OK2Submit = false;
}
if (_('street1').value.length == 0) {
_('streetError').innerHTML = "Please enter your street address.";
OK2Submit = false;
}
if (_('city').value.length == 0) {
_('city').value = "Please enter your city.";
OK2Submit = false;
}
if (!(_('state').selectedIndex > 0)) {
_('errors').innerHTML = "Please select your state.";
OK2Submit = false;
}
if (_('zip').value.length == 0) {
_('zip').value = "Please enter your ZIP code.";
OK2Submit = false;
}
if (_('phone1').value.length == 0) {
_('phone1').value = "Please enter a phone number.";
OK2Submit = false;
}
if (_('email').value.length == 0) {
_('emailError').innerHTML = "Please enter your email address.";
OK2Submit = false;
}
if (_('addlinfo').value.length == 0) {
_('addlinfo').value = "Please give us a short description of your art or craft.";
OK2Submit = false;
}
if (!(_('category').selectedIndex > 0)) {
_('categoryError').innerHTML = "Please select a category.";
OK2Submit = false;
}
if (!(_('outside').selectedIndex > 0)) {
_('outsideError').innerHTML = "Please indicate your willingness to be outside.";
OK2Submit = false;
}
if (!OK2Submit) {
return;
}
var form = _('upload_form');
var formdata = new FormData(form);
var ajax = new XMLHttpRequest();
var file1 = _("FileInput1").files[0];
var file2 = _("FileInput2").files[0];
var file3 = _("FileInput3").files[0];
var file4 = _("FileInput4").files[0];
if (file1 != null)
ajax.upload.addEventListener("progress", progressHandler1, false);
if (file2 != null)
ajax.upload.addEventListener("progress", progressHandler2, false);
if (file3 != null)
ajax.upload.addEventListener("progress", progressHandler3, false);
if (file4 != null)
ajax.upload.addEventListener("progress", progressHandler4, false);
ajax.addEventListener("load", completeHandler, false);
ajax.addEventListener("error", errorHandler, false);
ajax.addEventListener("abort", abortHandler, false);
ajax.open("POST", "upload_files_parser.php");
ajax.send(formdata);
}
function progressHandler1(event){
var percent = (event.loaded / event.total) * 100;
_("progress1").value = Math.round(percent);
if (percent < 100) {
_("status1").innerHTML = Math.round(percent)+"% uploaded... please wait";
} else {
_("status1").innerHTML = Math.round(percent)+"% ";
}
}
function progressHandler2(event){
var percent = (event.loaded / event.total) * 100;
_("progress2").value = Math.round(percent);
if (percent < 100) {
_("status2").innerHTML = Math.round(percent)+"% uploaded... please wait";
} else {
_("status2").innerHTML = Math.round(percent)+"% ";
}
}
function progressHandler3(event){
var percent = (event.loaded / event.total) * 100;
_("progress3").value = Math.round(percent);
if (percent < 100) {
_("status3").innerHTML = Math.round(percent)+"% uploaded... please wait";
} else {
_("status3").innerHTML = Math.round(percent)+"% ";
}
}
function progressHandler4(event){
var percent = (event.loaded / event.total) * 100;
_("progress4").value = Math.round(percent);
if (percent < 100) {
_("status4").innerHTML = Math.round(percent)+"% uploaded... please wait";
} else {
_("status4").innerHTML = Math.round(percent)+"% ";
}
}
function completeHandler(event){
_("progress1").value = 0;
document.title = "Thank You";
document.getElementById("Contents").innerHTML = event.target.responseText;
}
function errorHandler(event){
_("status1").innerHTML = "Upload Failed";
}
function abortHandler(event){
_("status1").innerHTML = "Upload Aborted";
}
</script>
</head>
<body>
<div class="heading">
<a href="index.html"><img srcset="images/WebsiteHEADING_sm.png 550w, images/WebsiteHEADING_sm.png 1125w, images/WebsiteHEADING.png 2250w" src="images/WebsiteHEADING.png" alt="CUMC Art and Craft Web Header" />
</a>
</div>
<div class="content">
<ul class="header">
<li class="header"><a class="header" href="mission.html">Our Mission</a></li>
<li class="header"><a class="header" href="attend.html">Attend</a></li>
<li class="header"><a class="header" href="">Participate</a></li>
<li class="header"><a class="header" href="contact.html">Contact</a></li>
</ul>
<div id="Contents">
<h1>Apply to be a Fair Vendor</h1>
<p>Our vendors' surveys consistently rate this fair as one of their favorite fairs to attend. We maintain a good mix of craft categories and work to ensure that our vendors have a good experience. If you would like to participate, you can fill out the application form below.</p>
<p>The Fair is a juried fair, so your application is not guaranteed. But, we work to include a high-quality, diverse selection of arts and crafts. Once you apply, a coordinator will review your application, and get back with you to discuss your particpation.</p>
<p>Please be sure to read the <a href="VendorRules.html">Vendor rules</a> and make sure that they are such that you can follow them.</p>
<div class="center">
<div id="uploadCompleted"></div>
<form id="upload_form" name="upload_form" method="POST" enctype="multipart/form-data">
<input type="hidden" name="check_submit" value="1" />
<table>
<tr><td>Name:</td><td><input type="text" name="fname" id="fname"> <input type="text" name="lname" id="lname"></td></tr>
<tr><td>Company Name:</td><td><input type="text" name="company" id="company" size="40"></td></tr>
<tr><td>Street:</td><td><input type="text" name="street1" id="street1"><span id="streetError"></span></td></tr>
<tr><td>Street 2:</td><td><input type="text" name="street2" id="street2"></td></tr>
<tr><td>City, State, Zip:</td><td><input type="text" name="city" id="city">,
<select name="state" id="state">
<option></option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District Of Columbia</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN" selected>Indiana</option>
<option value="IA">Iowa</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="ME">Maine</option>
<option value="MD">Maryland</option>
<option value="MA">Massachusetts</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MS">Mississippi</option>
<option value="MO">Missouri</option>
<option value="MT">Montana</option>
<option value="NE">Nebraska</option>
<option value="NV">Nevada</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NY">New York</option>
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VT">Vermont</option>
<option value="VA">Virginia</option>
<option value="WA">Washington</option>
<option value="WV">West Virginia</option>
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
</select>
<input type="text" name="zip" id="zip"></td></tr>
<tr><td>Phone 1:</td><td><input type="text" name="phone1" id="phone1"> (Mobile?) <input type="checkbox" name="mobile1" id="mobile1"></td></tr>
<tr><td>Phone 2:</td><td><input type="text" name="phone2" id="phone2"> (Mobile?) <input type="checkbox" name="mobile2" id="mobile2"></td></tr>
<tr><td>Email:</td><td><input type="text" name="email" id="email"><span id="emailError"></span></td></tr>
<tr><td>Craft Category</td>
<td><select name="category" id="category">
<option></option>
<option value="textiles">Textiles</option>
<option value="jewelry">Jewelry</option>
<option value="woodwork">Woodwork</option>
<option value="leatherwork">Leather Work</option>
<option value="ceramic">Ceramics and Pottery</option>
<option value="paper">Paper</option>
<option value="personalcare">Personal Care</option>
<option value="homedecor">Home Decor</option>
<option value="food">Food</option>
<option value="misc">Miscellaneous</option>
</select>
<span id="categoryError"></span>
</td>
</tr>
<tr>
<td>Product Description/Additional Comments:</td>
<td><textarea name="addlinfo" id="addlinfo" rows="3" cols="40"></textarea>
</td>
</tr>
<tr>
<td>Facebook ID or Page:</td><td><input type="text" name="facebook" id="facebook"></td>
</tr>
<tr>
<td>Web Site:</td><td><input type="text" name="website" id="website"></td>
</tr>
<tr>
<td>Willing to be Outside:</td>
<td>
<select name="outside" id="outside">
<option></option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<span id="outsideError" style="color: red"></span>
</td>
</tr>
<tr>
<td>Electric Needed:</td><td><input type="checkbox" name="electric" id="electric"></td>
</tr>
<tr>
<td>Table Needed:</td>
<td><select name="tabletype" id="tabletype">
<option value="none">None</option>
<option value="8">8 foot</option>
<option value="6">6 foot</option>
</select>
</td>
</tr>
<tr>
<td>Wall Needed:</td><td><input type="checkbox" name="wall" id="wall"></td>
</tr>
<tr>
<td>I agree that the fair may use <br/>pictures and images of me,<br/> my booth, and products for the <br/>purposes of promoting the fair.</td><td><input type="checkbox" name="imagerelease" id="imagerelease"></td>
</tr>
<tr><td>Upload four images of your <br />booth setup and products.</td>
<td>
<input name="FileInput1" id="FileInput1" type="file" /><progress id="progress1" value="0" max="100"></progress/> <span id="status1">0%</span><br />
<input name="FileInput2" id="FileInput2" type="file" /><progress id="progress2" value="0" max="100"></progress/> <span id="status2">0%</span><br />
<input name="FileInput3" id="FileInput3" type="file" /><progress id="progress3" value="0" max="100"></progress/> <span id="status3">0%</span><br />
<input name="FileInput4" id="FileInput4" type="file" /><progress id="progress4" value="0" max="100"></progress/> <span id="status4">0%</span><br />
</td>
</tr>
<tr>
<td>
<span id="errors"></span>
<input type="button" value="Submit Application" onclick="uploadFile()">
</td>
<td><input type="reset" value="Reset"></td>
</tr>
</table>
</form>
</div>
</div>
</div>
</body>
</html>