Browse code

Initial commit

Benjamin Roth authored on16/03/2023 20:22:35
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,97 @@
1
+<?php
2
+if (TL_MODE == 'FE') {
3
+    $GLOBALS['TL_CSS'][] = 'files/base/layout/css/elements/custom-elements/ce_rsce_form_imageselect.min.css|static';
4
+}
5
+?>
6
+
7
+
8
+<div <?php echo $this->cssID; ?>
9
+        class="<?= $this->class; ?> form--image-select widget widget-<?php echo($this->input_type); ?>  form-group">
10
+    <?php if ($this->headline || $this->subline || $this->topline) : ?>
11
+    <div class="ce--headline"
12
+         data-aos="<?php if ($this->animation_type) : ?><?php echo $this->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>">
13
+        <?php if ($this->topline) : ?>
14
+            <span class="ce--topline"><?php echo $this->topline; ?></span>
15
+        <?php endif; ?>
16
+        <?php if ($this->headline) : ?>
17
+        <<?php echo($this->headline_type); ?>>
18
+        <?php echo($this->headline); ?>
19
+    </<?php echo($this->headline_type); ?>>
20
+<?php endif; ?>
21
+    <?php if ($this->subline) : ?>
22
+        <span class="ce--subline"
23
+              data-aos="<?php if ($this->animation_type) : ?><?php echo $this->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>"><?php echo $this->subline; ?></span>
24
+    <?php endif; ?>
25
+</div>
26
+<?php endif; ?>
27
+<?php if ($this->text_right) : ?>
28
+<div class="row align-items-center">
29
+    <div class="col-12 col-xl-6">
30
+        <?php endif; ?>
31
+        <div class="row">
32
+            <?php
33
+            $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
34
+            $charactersLength = strlen($characters);
35
+            $inputId = '';
36
+            for ($i = 0; $i < 3; $i++) {
37
+                $inputId .= $characters[rand(0, $charactersLength - 1)];
38
+            }
39
+            ?>
40
+            <?php foreach ($this->inputs as $index => $input) : ?>
41
+            <div class="col-12 <?php if ($this->text_right) : ?>col-md-6 col-lg-4 col-xl-6 <?php else : ?>col-md-6 col-lg-4 col-xl-3<?php endif; ?>">
42
+                <label class="image-select--item" for="opt_<?php echo $inputId; ?>_<?php echo $index; ?>"
43
+                       data-aos="<?php if ($input->animation_type) : ?><?php echo $input->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>">
44
+                    <?php if ($input->headline) : ?>
45
+                    <div class="item--headline">
46
+                        <?php if ($input->headline) : ?>
47
+                        <<?php echo($input->headline_type); ?>>
48
+                        <?php echo($input->headline); ?>
49
+                    </<?php echo($input->headline_type); ?>>
50
+                <?php endif; ?>
51
+            </div>
52
+            <?php endif; ?>
53
+            <?php if ($input->text_top) : ?>
54
+            <div class="item--text-top">
55
+                <?php echo($input->text_top); ?>
56
+            </div>
57
+            <?php endif; ?>
58
+            <div class="item--image">
59
+                <img src="<?= Image::get(FilesModel::findByUuid($input->image)->path, null, null, null); ?>">
60
+            </div>
61
+            <?php if ($input->text_bottom) : ?>
62
+            <div class="item--text-bottom">
63
+                <?php echo($input->text_bottom); ?>
64
+            </div>
65
+            <?php endif; ?>
66
+            <div class="item--input price-relevant">
67
+                <div class="form-check">
68
+                    <input type="<?php echo($this->input_type); ?>" name="<?= $this->name ?>[]"
69
+                           id="opt_<?php echo $inputId; ?>_<?php echo $index; ?>"
70
+                           class="<?php echo($this->input_type); ?> form-check-input"
71
+                           value="<?php echo($input->input_value); ?>">
72
+                    <label id="lbl_<?php echo $inputId; ?>_<?php echo $index; ?>"
73
+                           for="opt_<?php echo $inputId; ?>_<?php echo $index; ?>" class="form-check-label">
74
+                        <span class="item--price"><?php echo($input->price); ?></span> €
75
+                    </label>
76
+                </div>
77
+            </div>
78
+            <?php if ($input->preview_links) : ?>
79
+            <div class="item--preview-links">
80
+                <?php echo($input->preview_links); ?>
81
+            </div>
82
+            <?php endif; ?>
83
+            </label>
84
+        </div>
85
+        <?php endforeach; ?>
86
+    </div>
87
+    <?php if ($this->text_right) : ?>
88
+</div>
89
+    <div class="col-12 col-xl-6">
90
+        <div class="col-right"
91
+             data-aos="<?php if ($this->animation_type) : ?><?php echo $this->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>">
92
+            <?php echo $this->text_right; ?>
93
+        </div>
94
+    </div>
95
+    </div>
96
+<?php endif; ?>
97
+</div>
0 98
\ No newline at end of file