-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvertical-helper.js
64 lines (60 loc) · 1.95 KB
/
vertical-helper.js
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
const selectCropType = async () => {
let selection = 'cam-top';
changeSelection = (val) => {
selection = val;
}
let popup = SafeSwal.fire({
title: 'Select crop type',
html: /*html*/`
<div style='margin-top: 10px' width="100%" id="cropTypeDiv">
<input
type="radio" name="cropType" checked
id="cam-top" class="input-hidden" onclick="changeSelection('cam-top')" />
<label for="cam-top" class='radio-label'>
<p>Cam Top</p>
<img
src="images/camTop.png"
/>
</label>
<input
type="radio" name="cropType"
id="no-cam" class="input-hidden"
onclick="changeSelection('no-cam')"/>
<label for="no-cam" class='radio-label'>
<p>No Cam</p>
<img
src="images/noCam.png"
/>
</label>
<input
type="radio" name="cropType"
id="freeform" class="input-hidden"
onclick="changeSelection('freeform')"/>
<label for="freeform" class='radio-label'>
<p>Freeform</p>
<img
src="images/freeform.png"
/>
</label>
<input
type="radio" name="cropType"
id="cam-freeform" class="input-hidden"
onclick="changeSelection('cam-freeform')"/>
<label for="cam-freeform" class='radio-label'>
<p>Cam + Freeform</p>
<img
src="images/camFreeform.png"
/>
</label>
</div>
`,
showCancelButton: true,
}).then((result) => {
if(result.dismiss == 'cancel') {
return null;
}
console.log("Selection: " + selection);
return selection;
});
return popup;
}