-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
432 lines (421 loc) · 12.6 KB
/
index.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
426
427
428
429
430
431
432
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="index.css" />
<link rel="stylesheet" href="dist/h5p-hub-sharing.css">
<link rel="stylesheet" href="dist/h5p-hub-registration.css">
<script type="text/javascript" src="dist/h5p-hub-registration.js"></script>
<script type="text/javascript" src="dist/h5p-hub-sharing.js"></script>
<style>
#hub-client {
max-width: 1090px;
margin: 0 auto;
}
body > h1 {
text-align: center;
}
</style>
<title>H5P Hub Client</title>
</head>
<body>
<div id="registration"></div>
<div id="sharing"></div>
<script>
const l10n = {
"mainTitle": "Sharing <strong>:title</strong>",
"cancel": "Cancel",
"back": "Back",
"next": "Next",
"reviewInfo": "Review info",
"share": "Share",
"close": "Close",
"registerOnHub": "Register on the Hub",
"updateRegistrationOnHub": "Save account settings",
"requiredInfo": "Required Info",
"optionalInfo": "Optional Info",
"reviewAndShare": "Review & Share",
"shared": "Shared",
"currentStep": "Step :step of :total",
"sharingNote": "All content details can be edited after sharing",
"licenseDescription": "Select a license for your content",
"licenseVersion": "License Version",
"licenseVersionDescription": "Select a license version",
"disciplineLabel": "Disciplines",
"disciplineDescription": "You can select multiple disciplines",
"discipline": {
"searchPlaceholder": "Type to search for disciplines",
"in": "in",
"dropdownButton": "Dropdown button"
},
"disciplineLimitReachedMessage": "You can select up to :numDisciplines disciplines",
"removeChip": "Remove :chip from the list",
"keywordsPlaceholder": "Add keywords",
"keywords": "Keywords",
"keywordsDescription": "You can add multiple keywords separated by commas. Press \"Enter\" or \"Add\" to confirm keywords",
"altText": "Alt text",
"reviewMessage": "Please review the info below before you share",
"subContentWarning": "Sub-content (images, questions etc.) will be shared under :license unless otherwise specified in the authoring tool",
"title": "Title",
"license": "License",
"disciplines": "Disciplines",
"shortDescription": "Short description",
"longDescription": "Long description",
"icon": "Icon",
"screenshots": "Screenshots",
"licenseDetails": "License details",
"shareFailed": "Share failed.",
"shareTryAgain": "Couldn't communicate with the H5P Hub. Please try again later.",
"pleaseWait": "Please wait...",
"language": "Language",
"level": "Level",
"shortDescriptionPlaceholder": "Short description of your content",
"longDescriptionPlaceholder": "Long description of your content",
"description": "Description",
"iconDescription": "640x480px. If not selected content will use category icon",
"screenshotsDescription": "Add up to five screenshots of your content",
"submitted": "Submitted!",
"isNowSubmitted": "Is now submitted to H5P Hub",
"contentAvailable": "Your content will normally be available in the Hub within one business day.",
"contentLicenseTitle": "Content License Info",
"licenseDialogDescription": "Click on a specific license to get info about proper usage",
"publisherFieldTitle": "Publisher",
"publisherFieldDescription": "This will display as the \"Publisher name\" on shared content",
"emailAddress": "Email Address",
"emailAddressDescription": "The email address will be used by H5P to reach out to the publisher in case of any issues with the content or in case the publisher needs to recover their account. It will not be published or shared with any third parties",
"publisherDescription": "Publisher description",
"publisherDescriptionText": "This will be displayed under \"Publisher info\" on shared content",
"contactPerson": "Contact Person",
"contactPersonDescription": "H5P will reach out to the contact person in case there are any issues with the content shared by the publisher. The contact person's name or other information will not be published or shared with third parties",
"phone": "Phone",
"address": "Address",
"city": "City",
"zip": "Zip",
"country": "Country",
"logoUploadText": "Organization logo or avatar",
"acceptTerms": "I approve the",
"licenseLinkText": "H5P Hub terms of use",
"successfullyRegistred": "You have successfully registered an account on the H5P Hub",
"successfullyRegistredDescription": "You account details can be changed",
"successfullyUpdated": "Your H5P Hub account settings have successfully been changed",
"accountDetailsLinkText": "here",
"registrationTitle": "H5P Hub Registration",
"registrationFailed": "An error occured",
"registrationFailedDescription": "We were not able to create an account at this point. Something went wrong. Try again later.",
"maxLength": ":length is the maximum number of characters",
"keywordExists": "Keyword already exists!",
"remove": "Remove",
"removeImage": "Remove image",
"cancelPublishConfirmationDialogTitle": "Cancel sharing",
"cancelPublishConfirmationDialogDescription": "Are you sure you want to cancel the sharing process?",
"cancelPublishConfirmationDialogCancelButtonText": "No",
"cancelPublishConfirmationDialogConfirmButtonText": "Yes",
"add": "Add",
"age": "Typical age",
"ageDescription": "The target audience of this content. Possible input formats separated by commas: \"1,34-45,-50,59-\".",
"invalidAge": "Invalid input format for Typical age. Possible input formats separated by commas: \"1, 34-45, -50, -59-\".",
"copyrightWarning": "Copyrighted material cannot be shared in the H5P Content Hub. If the content is licensed with a OER friendly license like Creative Commons, please choose the appropriate license. If not this content cannot be shared.",
"keywordsExists": "Keywords already exists!",
"someKeywordsExits": "Some of these keywords already exist"
};
const licenses = [
{
"name": "U",
"versions": [],
"translation": null
},
{
"name": "GNU GPL",
"versions": [],
"translation": null
},
{
"name": "PD",
"versions": [],
"translation": null
},
{
"name": "ODC PDDL",
"versions": [],
"translation": null
},
{
"name": "C",
"versions": [],
"translation": null
},
{
"name": "CC BY",
"versions": [
{
"name": "1.0",
"license": "CC BY",
"translation": null
},
{
"name": "2.0",
"license": "CC BY",
"translation": null
},
{
"name": "2.5",
"license": "CC BY",
"translation": null
},
{
"name": "3.0",
"license": "CC BY",
"translation": null
},
{
"name": "4.0",
"license": "CC BY",
"translation": null
}
],
"translation": null
},
{
"name": "CC BY-SA",
"versions": [
{
"name": "1.0",
"license": "CC BY-SA",
"translation": null
},
{
"name": "2.0",
"license": "CC BY-SA",
"translation": null
},
{
"name": "2.5",
"license": "CC BY-SA",
"translation": null
},
{
"name": "3.0",
"license": "CC BY-SA",
"translation": null
},
{
"name": "4.0",
"license": "CC BY-SA",
"translation": null
}
],
"translation": null
},
];
const disciplines = [
{
"name": "arts-and-humanities",
"parent": null,
"translation": null
},
{
"name": "business",
"parent": null,
"translation": null
},
{
"name": "engineering",
"parent": null,
"translation": null
},
{
"name": "law",
"parent": null,
"translation": null
},
{
"name": "life-sciences",
"parent": null,
"translation": null
},
{
"name": "medicine-and-health-sciences",
"parent": null,
"translation": null
},
{
"name": "education",
"parent": null,
"translation": null
},
{
"name": "bilingual-multilingual-and-multicultural-education",
"parent": "education",
"translation": null
},
{
"name": "community-college-leadership",
"parent": "education",
"translation": null
},
{
"name": "curriculum-and-instruction",
"parent": "education",
"translation": null
},
{
"name": "curriculum-and-social-inquiry",
"parent": "education",
"translation": null
},
{
"name": "disability-and-equity-in-education",
"parent": "education",
"translation": null
},
{
"name": "early-childhood-education",
"parent": "education",
"translation": null
},
{
"name": "economics",
"parent": "education",
"translation": null
},
{
"name": "architecture",
"parent": null,
"translation": "Architecture"
}
];
const languages = [
{
"name": "aa",
"translation": null
},
{
"name": "ab",
"translation": null
},
{
"name": "ae",
"translation": null
},
{
"name": "af",
"translation": null
},
{
"name": "ak",
"translation": null
},
{
"name": "am",
"translation": null
},
{
"name": "ar",
"translation": null
},
{
"name": "as",
"translation": null
},
{
"name": "ast",
"translation": null
},
{
"name": "av",
"translation": null
},
{
"name": "ay",
"translation": null
},
{
"name": "az",
"translation": null
},
{
"name": "ba",
"translation": null
},
{
"name": "be",
"translation": null
},
{
"name": "bg",
"translation": "Bulgarian"
},
{
"name": "en",
"translation": "English"
},
{
"name": "nb",
"translation": "Norwegian bokmål"
},
{
"name": "da",
"translation": "Danish"
},
{
"name": "nl",
"translation": "Dutch"
},
{
"name": "fr",
"translation": "French"
},
{
"name": "it",
"translation": "Italian"
}
];
const levels = [
{
"name": "beginner",
"translation": null
},
{
"name": "intermediate",
"translation": null
},
{
"name": "advanced",
"translation": null
}
];
// Publish
const publishURL = 'http://localhost/d7/post.php';
const contentType = 'Interactive video';
const language = 'en';
const title = 'My fantastic H5P';
// Registration
const registrationURL = 'http://localhost/d7/post.php';
const licenseLink = 'https://h5p.org/hub-terms';
const accountSettingsUrl = '';
document.addEventListener("DOMContentLoaded", function () {
H5PHub.createRegistrationUI({
container: document.getElementById('registration'),
l10n: l10n,
licenseLink: licenseLink,
registrationURL: registrationURL,
accountSettingsUrl: accountSettingsUrl
});
H5PHub.createSharingUI(document.getElementById('sharing'), {
l10n: l10n,
metadata: {
licenses: licenses,
disciplines: disciplines,
languages: languages,
levels: levels
},
title: title,
publishURL: publishURL,
contentType: contentType,
language: language
});
});
</script>
</body>
</html>