-
Notifications
You must be signed in to change notification settings - Fork 2
/
beestmodal.html
554 lines (487 loc) · 27 KB
/
beestmodal.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
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
<!DOCTYPE html>
<!--
==========================================
Title: BEEST Modal
Creator: @phillipabramson
Last Update: 15 June 2022
==========================================
-->
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-152392632-3"></script>
<script src="js/pageHistory.js"></script>
<script src="js/helperFunctions.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="A simple element creator to generate responsive code that can be easily embbedded into Moodle">
<meta name="author" content="T&M">
<title>BEEST Modal</title>
<link rel="icon" href="img/black favicon-16x16.png" type="image/gif">
<!-- external link to css file -->
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Arts CSS -->
<link rel="stylesheet" href="https://mon-arts-ed-des.github.io/artsmoodlecode/adminPlusSetuBlockStyle.css" />
<link rel="stylesheet" href="https://mon-arts-ed-des.github.io/BEEST/css/monashElements.css" />
<!-- external link to js file -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src=" https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<!-- Bootstrap js file -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- FontAwesome js file -->
<script src="https://kit.fontawesome.com/3817feae52.js"></script>
<!-- Tinymce js file -->
<script src="https://beest.monash.edu/tinymce/tinymce.min.js"></script>
<script src="js/advancedModeLocalStorage.js"></script>
<!-- TinyMCE placeholder plugin file -->
<script src="js/placeholder.js"></script>
<script src="js/setupPage.js"></script>
<script type="text/javascript">
const START_ELEMENT = "<!--Begin BEEST modal-->"
const END_ELEMENT = "<!--End BEEST modal-->"
var iconNames = {
"1": "exclamation-circle",
"2": "info-circle",
"3": "question-circle",
"EdStem": "https://edstem.org/favicon.png"
}
var colourNames = {
"1": "mu",
"2": "danger",
"3": "warning",
"4": "success",
"5": "dark"
};
const PLACEHOLDER = "[Placeholder for modal link text. The text you entered in step 1 will appear here.]"
/*REQUIRED FOR HISTORY*/
const MODAL_HIST = "history_modal"
localStorageHistory = MODAL_HIST
var classModal = null
$(document).ready(function(){
setupToolTips(10000)
initHistory()
setupNav()
setupGoogleAnalytics()
//default_XRadio_onEmpty_Y("alertHeading","headSize","noH","headSize1",generateElementCode);
})
class beestmodal{
constructor(linkText,contentUrl,icon,colour,buttonExit,buttonOpen,iconURLifAny){
this.linkText = linkText
this.contentUrl = contentUrl
this.icon = icon
this.iconUrl = iconURLifAny
this.colour = colour
this.buttonExit = buttonExit
this.buttonOpen = buttonOpen
this.mainHead = this.linkText
}
toPDO(){
var result = {}
result.mainHead = this.linkText
result.contentUrl = this.contentUrl
result.icon = this.icon
result.iconUrl = this.iconUrl
result.colour = this.colour
result.buttonExit = this.buttonExit
result.buttonOpen = this.buttonOpen
return result
}
toString(){
return JSON.stringify(this.toPDO())
}
fromObj(PDO){
this.linkText = PDO.mainHead
this.mainHead = PDO.mainHead
this.contentUrl = PDO.contentUrl
this.icon = PDO.icon
this.iconUrl = PDO.iconUrl
this.colour = PDO.colour
this.buttonExit = PDO.buttonExit
this.buttonOpen = PDO.buttonOpen
}
}
/*END REQUIRED FOR HISTORY*/
function copyCode() {
/*REQUIRED FOR HISTORY*/
addToHistory(classModal)
/*END REQUIRED FOR HISTORY*/
SelectAll("monModalCode");
}
function storePageToClass(linkText,contentUrl,faIcon,bsColour,buttonExit,buttonOpen,iconURLifKnown){
var iconStorage = faIcon;
if (!isNaN(faIcon)){
iconStorage = faIcon*1
}
if (linkText == PLACEHOLDER) {
linkText = ""
}
classModal = new beestmodal(linkText,contentUrl,iconStorage,bsColour,buttonExit,buttonOpen,iconURLifKnown)
return classModal
}
/*END helper functions for generate element code*/
function iconTagFromCode(faIcon,iconURL){
var icon_tag = ""
var fontawesome_start = '<i class="fa fa-'
var fontawesome_end = ' fa-lg"></i> '
var external_start = '<img src="'
var external_end = '" max-width=23 width=20 class="iconlarge activityicon" alt="" role="presentation" aria-hidden="true"/> '
if(faIcon != "noI"){
if (isNaN(faIcon)){
iconURLinUse = ''
if (faIcon in iconNames){
iconURLinUse=iconNames[faIcon]
}
if (faIcon=="EXTERNAL"){
if (iconURL == ""){
iconURL = "https://www.freeiconspng.com/uploads/error-icon-32.png"
}
iconURLinUse=iconURL
}
icon_tag= external_start+iconURLinUse+external_end
}
else{
icon_tag = fontawesome_start + iconNames[faIcon] + fontawesome_end
}
}
return icon_tag
}
function generateElementCode() {
var modalName = "beest_modal_"+randomString(6)
const MODAL_DIALOG_CLASS_NAME = 'modal-mu-Dialog'+modalName
const MODAL_BG_MU_CLASS_NAME = 'bg-mu-m'+modalName
STYLE_ADDER = ''//'<STYL'+'E> .'+MODAL_BG_MU_CLASS_NAME+'{background:#006dae;}.'+MODAL_DIALOG_CLASS_NAME+'{max-width: 80% !important;}</STY'+'LE>' //removed because doable just by sharing the same class but not using that class for opening
//namely the modal-base-outer and modal-base-in
var buttons = [getCheckBox("buttonOpen"),getCheckBox("buttonClose")]
buttons = {'open':buttons[0], 'close':buttons[1]}
var bsColour = getRadioOption("modalColour");
var faIcon = getRadioOption("faCode")
///something for custom icon
var linkText_base = getId("linkText").value;
var contentURL_base = getId("modalURL").value;
var iconURL = getId("iconURL").value;
contentURL = contentURL_base
if (contentURL_base == ""){
contentURL = "https://www.lipsum.com/"
}
linkText = linkText_base
if (linkText_base == ""){
linkText = PLACEHOLDER
}
var icon_tag = iconTagFromCode(faIcon,iconURL)
var open_button_colour = "dark"
var colourName = colourNames[bsColour];
if (colourName == open_button_colour){
open_button_colour = "btn-mu"
}
else{
open_button_colour = "btn-dark"
}
var modal_bg_colour_code = 'bg-'+colourName
if (colourName == "mu") {
modal_bg_colour_code = MODAL_BG_MU_CLASS_NAME
}
var modal_html_start = '<div><a data-toggle="modal" data-target=".'+modalName+'" href="#">'
var link_text_html = '<span id="beest_modal_link_text">'+linkText+'</span></a></div>'
var outer_modal_layer = '<div class="modal fade '+modalName+'" tabindex="-1" role="dialog" aria-labelledby="btn-modal" aria-hidden="true"><div class="modal-dialog modal-l '+MODAL_DIALOG_CLASS_NAME+' modal-base-outer"><div class="modal-content p-2 '+modal_bg_colour_code+' modal-base-in"><div class="modal-header"><h5 class="modal-title text-white">Click close or click outside this box to return to Moodle.</h5>'
var modal_close_button = '<button type="button" class="btn btn-danger btn-lg ml-2" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">Close ×</span> </button>'
var modal_open_button = '<a id="beest_modal_content_link" class="btn '+open_button_colour+' btn-lg m-1" role="button" href="'+contentURL+'" target="_blank">Open <i class="fa fa-external-link"></i> </a>'
var modal_top_buttons = '<span>'
if (buttons.open){
modal_top_buttons+=modal_open_button+' '
}
if (buttons.close){
modal_top_buttons+=modal_close_button
}
modal_top_buttons+='</span></div>'
var modal_inner_frame = '<div class="embed-responsive embed-responsive-16by9" style="background:White;"><iframe id="beest_modal_content_frame" class="embed-responsive-item" frameborder="0" allowfullscreen="allowfullscreen" src="'+contentURL+'"></iframe></div>'
var modal_text_opener = modal_html_start+icon_tag+link_text_html
var modal_popup_html = outer_modal_layer+modal_top_buttons+modal_inner_frame + '</div></div></div>'
var textOutput = modal_text_opener
classModal = storePageToClass(linkText_base,contentURL_base,faIcon,bsColour,buttons["close"],buttons["open"],iconURL)
modalDataJSON = (JSON.stringify(classModal)).replaceAll('"',"'")
modalDataTag = '<!'+'-- <data id="modaldata" value="'+modalDataJSON+'"></data> --'+'>'
document.getElementById("monModalCode").innerHTML = START_ELEMENT+STYLE_ADDER+modalDataTag+textOutput+modal_popup_html+END_ELEMENT;
//SelectAll("monModalCode");
$("#demo").html(STYLE_ADDER+textOutput);
$("#modaldemo").html(modal_popup_html)
}
function SelectAll(id) {
document.getElementById(id).focus();
document.getElementById(id).select();
document.execCommand("copy");
/***this is triggering an error -- no myPopup exists ***/
var popup = document.getElementById("myPopup");
popup.classList.toggle("showPopup");
//window.alert('test');
}
function submitform() {
document.forms["myform"].submit();
}
$(function () {
$('[data-toggle="tooltip"]').tooltip();
});
function recoverCode(){
var pastedCode = $("#retrieveCode").val()
processedCode = pastedCode.replaceAll("<!--","").replaceAll("-"+"->","")
processedCode = $.parseHTML(processedCode)
classModal = new beestmodal()
var vals = null
for (var i=0;i<processedCode.length;i++){
if (processedCode[i].id=="modaldata"){
vals = processedCode[i].value.replaceAll("'",'"')
break;
}
}
JSON_data = JSON.parse(vals)
classModal.fromObj(JSON_data)
setTextAreas(classModal)
generateElementCode()
}
/*REQUIRED FOR HISTORY*/
function setTextAreas(classData){
setCheckBox("buttonOpen",classData.buttonOpen)
setCheckBox("buttonClose",classData.buttonExit)
setRadios("modalColour",classData.colour)
setRadios("faCode",classData.icon)
getId("linkText").value = classData.linkText
getId("modalURL").value = classData.contentUrl
getId("iconURL").value = classData.iconUrl
}
function getHistoryI(index,history){
if (history.length>0){
var selectedItem = history[index]
classModal = new beestmodal()
classModal.fromObj(selectedItem)
refToclassModal = classModal
setTextAreas(refToclassModal)
generateElementCode()
}
}
/*END REQUIRED FOR HISTORY*/
</script>
<style>
.mce-notification-inner, .mce-close, .mce-notification-warning {
display:none !important;
}
.tooltip-inner {
text-align: left;
padding: 15px;
font-size: 1.05rem;
max-width: 400px;
}
.nav-item:hover {
background: #004dae;
}
</style>
</head>
<body onload=generateElementCode()>
<div id="beestNav"></div>
<div class="py-5"></div>
<div class="container-fluid">
<h3 class="text-center font-weight-bold">Modal<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Modals are used as popups to allow a separate page to be displayed on top of other content and dismissed later as needed without ever having to leave the original site. BEEST itself makes use of modals for example with video instructions." class="hideableinstruct text-success font-weight-normal small"> <i class="fa fa-question-circle"></i></span></h3>
<h5 class="text-center"><a class="hideableinstruct" data-toggle="modal" data-target=".respVidWalkthrough" href="">Create a modal walkthrough (2:58)</a></h5>
<!--Begin modal content for this page-->
<!--Alert walkthrough modal-->
<div class="modal fade respVidWalkthrough" tabindex="-1" role="dialog" aria-labelledby="panopto-modal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content p-2 bg-dark">
<div class="modal-header">
<h5 class="modal-title text-white" id="exampleModalLabel">Click close or click outside this box to return to the BEEST.</h5>
<button type="button" class="btn btn-outline-light btn-lg ml-2" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Close ×</span>
</button>
</div>
<div class="embed-responsive embed-responsive-16by9"><iframe class="embed-responsive-item" frameborder="0" allowfullscreen="allowfullscreen" src="https://monash-panopto.aarnet.edu.au/Panopto/Pages/Embed.aspx?id=83a5ea53-f77f-477e-a864-aec20049c469"></iframe></div>
</div>
</div>
</div>
<div id="modaldemo"></div>
<!--How to paste HTML in Moodle modal-->
<div class="modal fade html-paste-modal" tabindex="-1" role="dialog" aria-labelledby="html-paste-modal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content p-2 bg-dark">
<div class="modal-header">
<h5 class="modal-title text-white">Click close or click outside this box to return to the BEEST.</h5>
<button type="button" class="btn btn-outline-light btn-lg ml-2" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Close ×</span>
</button>
</div>
<div class="embed-responsive embed-responsive-16by9"><iframe class="embed-responsive-item" frameborder="0" allowfullscreen="allowfullscreen" src="https://monash-panopto.aarnet.edu.au/Panopto/Pages/Embed.aspx?id=d1c0ffaa-23a4-4d38-bb49-abda00b7805a"></iframe>
</div>
</div>
</div>
</div>
<!--End of modal content for this page-->
<div class="row w-50 mx-auto text-center mt-3">
<div class="col-lg">
<a data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Click to clear the page and start again." href="javascript:window.location.reload()" class="btn btn-danger btn-lg btn-block" role="button">Clear the page <i class="fa fa-fw fa-refresh"></i></a>
</div>
<div class="col-lg">
<button id="toggleHelp" data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus click" title="Click to toggle the help instructions on/off. Only do this if you are completely familiar with how to use the page" onclick="flipTooltip()" class="btn btn-success btn-lg btn-block">Turn <span class="onoffswapinstr">off</span> help <i class="fa fa-fw fa-power-off"></i></a>
</div></div>
<hr class="hr-3">
<form id="monashModal">
<div class="row w-100 mx-auto">
<div class="col-lg-6">
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Recover<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Recover recently created items. This will only become operational once you have created at least one modal. If you change browsers or clear your browser history, you will lose this history as well." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg-8">
<select class="custom-select border border-dark" size="1" id="recoveryDate" onchange="idSelectedRecData()">
<option selected value=0>please wait</option>
</select>
</div>
<div class="col-lg-1 text-center">
<button id="delHist" onclick="delHistI()" type="button" class="btn btn-danger mr-2" data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Delete the currently selected historical data."><i class="fa fa-fw fa-trash"></i></button>
<button id="loadHist" onclick="getHistoryI(histIndex,historicalData)" class="btn btn-mu">Recover <i class="fa fa-fw fa-undo"></i></button>
</div>
</div>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Paste code from Moodle<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Paste in the code you previously generated from BEEST and pasted into Moodle to recover and redesign the element." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg">
<textarea class="rounded p-2 w-100 mt-2" rows="2" name="retrieveCode" type="text" id="retrieveCode" placeholder="Or recover it by pasting existing code from Moodle" onchange=recoverCode()></textarea>
</div>
</div>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Link text<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Type in the clickable text you would like to appear on moodle." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg">
<textarea maxlength="75" class="rounded p-2 w-100 border border-dark" rows="1" name="linkText" type="text" id="linkText" placeholder="Text to appear in moodle." onchange=generateElementCode()></textarea>
</div>
</div>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Content URL<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Enter the url linking to the content to display in the modal." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg">
<textarea class="rounded p-2 w-100 border border-dark" rows="1" name="modalURL" type="text" id="modalURL" placeholder="Your URL to the internal content goes here." onchange=generateElementCode()></textarea>
<span class="text-danger">Content not loading? <span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="If the page says 'refused to connect', make sure you've found the embeddable link, otherwise your browser may block the link out of an abundance of caution." > <i class="fa fa-question-circle"></i></span></span>
</div>
</div>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Select icon<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Select an icon to go with your link text." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg">
<div class="form-check form-check-inline" id="faCode" onchange=generateElementCode()>
<input class="form-check-input" name="faCode" id="faCodeNone" type="radio" value="noI" checked>
<label class="form-check-label" for="faCodeNone">No icon</label>
</div>
<div class="form-check form-check-inline" id="faCode" onchange=generateElementCode()>
<input class="form-check-input" name="faCode" id="faCode1" type="radio" value="1">
<label class="form-check-label" for="faCode1"><i class="fa fa-exclamation-circle fa-2x"></i></label>
</div>
<div class="form-check form-check-inline ml-3" id="faCode" onchange=generateElementCode()>
<input class="form-check-input" name="faCode" id="faCode2" type="radio" value="2">
<label class="form-check-label" for="faCode2"><i class="fa fa-info-circle fa-2x"></i></label>
</div>
<div class="form-check form-check-inline ml-3" id="faCode" onchange=generateElementCode()>
<input class="form-check-input" name="faCode" id="faCode3" type="radio" value="3">
<label class="form-check-label" for="faCode3"><i class="fa fa-question-circle fa-2x"></i></label>
</div>
<div class="form-check form-check-inline ml-3" id="faCode" onchange=generateElementCode()>
<input class="form-check-input" name="faCode" id="faCode4" type="radio" value="EdStem">
<label class="form-check-label" for="faCode4"><img width="30" src="https://edstem.org/favicon.png"/></label>
</div>
<div class="form-check form-check-inline ml-3" id="faCode" onchange=generateElementCode()>
<input class="form-check-input" name="faCode" id="faCode5" type="radio" value="EXTERNAL">
<label class="form-check-label" for="faCode5">External (use field below)</label>
</div>
</div>
</div>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">icon URL<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Enter the url linking to the icon to display next to the link text." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg">
<textarea maxlength="75" class="rounded p-2 w-100 border border-dark" rows="1" name="iconURL" type="text" id="iconURL" placeholder="if you want a custom icon, enter the url here." onchange=generateElementCode()></textarea>
</div>
</div>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Modal colour<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Select the background colour of your modal." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg">
<div class="row w-100">
<div class="col-lg">
<div class="form-check form-check-inline mb-3" id="modalColour" onchange=generateElementCode()>
<input class="form-check-input" name="modalColour" id="modalColour1" type="radio" value="1" checked>
<label class="form-check-label" for="modalColour1"><span id="monashBlue" class="btn btn-mu">Monash blue</span></label>
</div>
<!---
<div class="form-check form-check-inline mb-3" id="modalColour" onchange=generateElementCode()>
<input class="form-check-input" name="modalColour" id="modalColour2" type="radio" value="2">
<label class="form-check-label" for="modalColour2"><span id="red" class="btn btn-danger">Red</span></label>
</div>
<div class="form-check form-check-inline mb-3" id="modalColour" onchange=generateElementCode()>
<input class="form-check-input" name="modalColour" id="modalColour3" type="radio" value="3">
<label class="form-check-label" for="modalColour3"><span id="yellow" class="btn btn-warning">Yellow</span></label>
</div>
<div class="form-check form-check-inline mb-3" id="modalColour" onchange=generateElementCode()>
<input class="form-check-input" name="modalColour" id="modalColour4" type="radio" value="4">
<label class="form-check-label" for="modalColour4"><span id="green" class="btn btn-success">Green</span></label>
</div>
--->
<div class="form-check form-check-inline mb-3" id="modalColour" onchange=generateElementCode()>
<input class="form-check-input" name="modalColour" id="modalColour5" type="radio" value="5">
<label class="form-check-label" for="modalColour5"><span id="dark" class="btn btn-dark">Dark</span></label>
</div>
</div>
</div>
</div>
</div>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Additional buttons<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Additional buttons to live atop the main content." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<!--<select class="custom-select w-50 border border-dark" id="dmoption" name="dmoption" onchange=generateElementCode()>
<option value="dismissable" selected>Dismissable</option>
<option value="permanent">Permanent</option>
</select>-->
<div class="col-lg">
<div class="form-check form-check-inline" id="buttons" onchange=generateElementCode()>
<input class="form-check-input" name="buttons" id="buttonClose" type="checkbox" value="close" checked>
<label class="form-check-label" for="buttonClose">Close</label>
</div>
<div class="form-check form-check-inline" id="buttons" onchange=generateElementCode()>
<input class="form-check-input" name="buttons" id="buttonOpen" type="checkbox" value="openTab">
<label class="form-check-label" for="buttonOpen">Open in new tab</label>
</div>
</div>
</div>
</div>
<div class="col-lg">
<div class="sticky-top" style="top:100px;">
<h5 class="font-weight-bold">Preview<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="A live preview of your element will appear below as you update your preferences for your alert." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
<div id="demo">
<style> .bg-mu-m{background:#006dae;}.modal-mu-Dialog{max-width: 80% !important;}</style><div><a data-toggle="modal" data-target=".beest_modal_mFhxjw" href="#"><span id="beest_modal_link_text">[Placeholder for modal link text. The text you entered in step 1 will appear here.]</span></a></div>
</div>
<p class="my-3"></p>
<hr>
<h5 class="font-weight-bold">Copy code<span data-toggle="tooltip" data-placement="top" data-trigger="hover focus" title="Click the copy code button below once you have finished creating your alert, ready for pasting into Moodle." class="hideableinstruct text-success font-weight-normal small"> <i class="fa fa-question-circle"></i></h5>
<textarea readonly class="border border-dark rounded p-2 w-100" id="monModalCode" cols="70" rows="4" name="Result" placeholder="Code for your element will appear here."></textarea>
<input type="button" class="btn btn-success btn-block btn-lg my-2 text-center" name="GenerateWrap" value="Copy code </>" onClick=copyCode() id="copyCodeBtn" data-toggle="tooltip" data-placement="left" data-trigger="click focus" title="Your code has been copied." />
<div class="text-center h5 mt-4">
<a data-toggle="modal" data-target=".html-paste-modal" href="#">How do I paste this into Moodle?</a>
</div></div>
</div>
</div>
</form>
</div>
<div id="beestFooter"></div>
</body>
</html>