-
Notifications
You must be signed in to change notification settings - Fork 1
/
upload.html
323 lines (319 loc) · 17.3 KB
/
upload.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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- favicon -->
<link rel="icon" type="image/png" href="https://turnthebus.org//images/favicon.png">
<!-- custom styles -->
<link rel="stylesheet" href="styles.css">
<!-- bootstrap -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
crossorigin="anonymous"></script>
<title>Turn the Bus | Video Upload</title>
</head>
<body>
<nav class="navbar justify-content-between">
<a class="navbar-brand">
<img src="https://turnthebus.org/images/turn-the-bus-logo.png" />
</a>
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link active start-pill" href="upload.html">Upload</a>
</li>
<li class="nav-item">
<a class="nav-link end-pill" href="history.html">History</a>
</li>
</ul>
<button id="signOut" class="btn btn-link" type="submit">Sign Out</button>
</nav>
<div class="modal fade" id="uploadProgressModal" data-backdrop="static" tabindex="-1" role="dialog"
aria-labelledby="uploadProgressModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h2 class="modal-title" id="uploadProgressModalLabel">Uploading</h2>
<div class="round">
<div id="cta">
<span class="arrow primera next bounceAlpha"></span>
<span class="arrow segunda next bounceAlpha"></span>
</div>
</div>
</div>
<div class="modal-body">
<span id="uploadDataDone"></span>
<span id="uploadDataTotal"></span>
<br>
<small id="remainingTime"></small>
<div id="uploadProgressBarCtr" class="progress">
<span id="uploadProgressValue">0%</span>
<div id="uploadProgressBar" class="progress-bar" style="width: 0px" role="progressbar"
aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"> </div>
</div>
<small id="uploadFileName"></small>
</div>
<div class="modal-footer">
<button id="cancelUpload" type="button" class="btn btn-danger">cancel upload</button>
</div>
</div>
</div>
</div>
<div class="jumbotron">
<div class="row">
<div class="col col-md"></div>
<div class="col-12 col-md-4 col-">
<h1 class="display-4">स्वागत है</h1>
<p class="lead">Namaste, friends. Thank you for teaching online with Turn the Bus! Please use this form to submit the details of your video.</p>
<p class="lead">नमस्ते दोस्तों। टर्न द बस के साथ ऑनलाइन पढ़ाने के लिए धन्यवाद! कृपया इस फॉर्म का उपयोग अपने वीडियो का विवरण प्रस्तुत करने के लिए करें।</p>
<p class="lead">
<a class="btn btn-primary btn-lg" target="_blank" href="https://www.turnthebus.org/">Learn more on turnthebus.org</a>
</p>
</div>
<div class="col col-md"></div>
</div>
</div>
<section class="row">
<div class="col col-md"></div>
<div class="col-12 col-md-6 col-">
<div class="contentLoaderCtr" id="formLoader">
<div class="contentLoader"></div>
Loading form...
</div>
<form id="ttbVideoUploadForm" hidden>
<h1>Video Upload</h1>
<br>
<p>Fields marked with a red asterisk (<span class="red">*</span>) are required fields. Please provide a valid value for these.<p>
<p>तारांकन चिह्न (<span class="red">*</span>) के साथ चिह्नित प्रश्न अनिवार्य हैं।</p>
<h2>Tutor Information</h2>
<div class="form-group">
<label for="tutorName">Tutor Name</label><span class="red">*</span>
<input name="tutorName" type="text" class="form-control" id="tutorName" required placeholder="E.g. Shobha Singh">
<small class="form-text text-muted">
Your name or a teaching alias or a screen name
</small>
<div class="invalid-feedback">
Please enter a tutor name.
</div>
</div>
<div class="form-group">
<label for="tutorProfile">Tutor Profile</label>
<textarea class="form-control" id="tutorProfile" rows="3" name="tutorProfile"
placeholder="E.g. Shobha Singh has an MA in History and a BEd from Lucknow University. She loves sharing her passion for History with young people through storytelling and teaching."
></textarea>
<small id="tutorProfileHelpBlock" class="form-text text-muted">
About yourself
</small>
</div>
<br>
<br><br>
<h2>Class Information</h2>
<br>
<div class="form-group">
<label for="class">Class</label><span class="red">*</span>
<select required class="form-control" id="class" name="class"
onchange="updateTitlePreview()">
<option></option>
<option value="Class X">Class X</option>
<option value="Class XII">Class XII</option>
</select>
<div class="invalid-feedback">
Please select a class.
</div>
</div>
<div class="form-group">
<label for="stream">Stream</label>
<select class="form-control" id="stream" name="stream">
<option></option>
<option>Arts</option>
<option>Commerce</option>
<option>Science</option>
</select>
</div>
<div class="form-group">
<label for="board">Board of examination</label><span class="red">*</span>
<select required class="form-control" id="board" name="board">
<option></option>
<option>CBSE</option>
<option>ICSE</option>
<option>State</option>
</select>
<div class="invalid-feedback">
Please select a Board.
</div>
</div>
<br><br>
<h2>Book Information</h2>
<br>
<div class="form-group">
<label for="subject">Subject</label><span class="red">*</span>
<select required class="form-control" id="subject" name="subject">
<option>Choose Subject</option>
</select>
<div class="invalid-feedback">
Please select a subject.
</div>
</div>
<div class="form-group">
<label for="bookLanguage">Book Language</label><span class="red">*</span>
<select required class="form-control" id="bookLanguage" name="bookLanguage">
<option>Choose Book Language</option>
</select>
<div class="invalid-feedback">
Please select a book langauge.
</div>
</div>
<div class="form-group">
<label for="bookName">Book Name</label><span class="red">*</span>
<select required class="form-control" id="bookName" name="bookName"
onchange="updateTitlePreview()">
<option>Choose Book Name</option>
</select>
<div class="invalid-feedback">
Please select a book name.
</div>
</div>
<div class="form-group">
<label for="bookPartName">Book Part number</label>
<input name="bookPartName" type="text" class="form-control" id="bookPartName" placeholder="">
</div>
<div class="form-group">
<label for="chapterName">Chapter name</label><span class="red">*</span>
<input name="chapterName" type="text" class="form-control" id="chapterName"
placeholder="E.g. Daffodils" required
onkeyup="updateTitlePreview()"
onchange="updateTitlePreview()">
<div class="invalid-feedback">
Please enter a chapter name.
</div>
</div>
<div class="form-group">
<label for="chapterNumber">Chapter number</label><span class="red">*</span>
<input name="chapterNumber"
type="text" class="form-control" id="chapterNumber" placeholder="E.g. 1"
required
onkeyup="updateTitlePreview()"
onchange="updateTitlePreview()">
<small class="form-text text-muted">
Chapter number as mentioned in the book
</small>
<div class="invalid-feedback">
Please enter a chapter number.
</div>
</div>
<div class="form-group">
<label for="chapterPart">Chapter Part</label><span class="red">*</span>
<input name="chapterPart" type="text" class="form-control" id="chapterPart"
placeholder="E.g. Part 1 of 5" required
onkeyup="updateTitlePreview()"
onchange="updateTitlePreview()">
<div class="invalid-feedback">
Please enter a chapter part.
</div>
</div>
<div class="form-group">
<label for="section">Section</label>
<input name="section" type="text" class="form-control" id="section" placeholder="E.g. Prose/Poetry">
</div>
<br><br>
<h2>Video Details</h2>
<br>
<div class="form-group">
<label for="title">Title</label><span class="red">*</span>
<input name="title" type="text" class="form-control" id="title"
placeholder="E.g. Alternatives centers of Power" required
onkeyup="updateTitlePreview()"
onchange="updateTitlePreview()">
<div class="invalid-feedback">
Please enter a video title.
</div>
<small id="titleHelpBlock" class="form-text text-muted">
This will appear as part of the video title on YouTube and EdX.
</small>
</div>
<div class="form-group">
<label for="titlePreview">Final Title Preview</label>
<input name="titlePreview" id="titlePreview" type="text" class="form-control" readOnly>
<small id="titleHelpBlock" class="form-text text-muted">
This will be the final video title on YouTube and EdX.
It is a combination of form fields on this page.
A catchy title can help you hook
viewers. When you create video
titles, it’s a good idea to include keywords your audience is likely to use when looking for
videos like yours. <a target="_blank"
href="https://creatoracademy.youtube.com/page/lesson/titles">Learn more</a>
</small>
</div>
<div class="form-group">
<label for="description">Description</label>
<textarea class="form-control" id="description" rows="3" name="description"></textarea>
<small id="descriptionHelpBlock" class="form-text text-muted">
This will appear as the video description on YouTube. Writing descriptions with keywords can
help
viewers find your videos more easily through search. You can give an overview of your video and
place keywords in the beginning of the description. <a target="_blank"
href="https://creatoracademy.youtube.com/page/lesson/descriptions">Learn more</a>
</small>
</div>
<div class="form-group">
<label for="tags">Tags</label>
<textarea class="form-control" id="tags" rows="3" name="tags"
placeholder="Turn the bus, educational, tutorial, tutor, education"></textarea>
<small id="tagsHelpBlock" class="form-text text-muted">
Enter comma-separated values.
<a target="_blank" href="https://support.google.com/youtube/answer/146402?hl=en">Learn more</a>
</small>
</div>
<div class="form-group">
<label for="videoLanguage">Video Language</label><span class="red">*</span>
<select required class="form-control" id="videoLanguage" name="videoLanguage">
<option></option>
<option>Hindi</option>
<option>English</option>
</select>
<div class="invalid-feedback">
Please select a language.
</div>
</div>
<div class="form-group" style="margin-bottom: 4em;">
<label for="file">Video file</label><span class="red">*</span>
<div class="custom-file">
<input required type="file" class="custom-file-input" id="file">
<label id="fileName" class="custom-file-label">Choose file</label>
<small class="form-text text-muted">
Please upload videos in .mp4 format. You may use a free tool like <a href="http://www.pcfreetime.com/" target="_blank">Format Factory</a> to convert video files to MP4 format.
</small>
<div class="invalid-feedback">
Please upload a file.
</div>
</div>
</div>
<div hidden id="uploadError" class="alert alert-danger" role="alert">
Some error ocurred! Please try again.
</div>
<div hidden id="uploadWarning" class="alert alert-warning" role="alert">
</div>
<div hidden id="uploadSucc" class="alert alert-success" role="alert">
File uploaded successfully!
</div>
<button id="submitUploadForm" class="btn btn-primary">Upload</button>
<button id="resetUploadForm" type="reset" class="btn">Clear All</button>
</form>
<button hidden id="debugSubmit" class="btn btn-primary">Debug</button>
</div>
<div class="col col-md"></div>
</div>
<!-- custom js -->
<script src="js/vendor/aws-cognito-sdk.min.js"></script>
<script src="js/vendor/amazon-cognito-identity.min.js"></script>
<script src="js/config.js"></script>
<script src="js/cognito-auth.js"></script>
<script src="js/upload.js"></script>
</body>
</html>