Browse code

Update

Benjamin Roth authored on31/08/2023 14:16:35
Showing5 changed files
... ...
@@ -138,7 +138,7 @@ $GLOBALS['TL_DCA']['tl_vr_wa_reservation'] = array
138 138
         (
139 139
             'exclude'                 => true,
140 140
             'inputType'               => 'checkbox',
141
-            'eval'  => array('multiple'=>true, 'csv'=>',','tl_class'=>'w50'),
141
+            'eval'  => array('mandatory'=>true,'multiple'=>true, 'csv'=>',','tl_class'=>'w50'),
142 142
             'sql'       => "blob NULL",
143 143
             'relation'   => array('type' => 'hasMany', 'load' => 'lazy', 'table'=>'tl_vr_wa_lage')
144 144
         ),
... ...
@@ -142,7 +142,7 @@ $GLOBALS['TL_DCA']['tl_vr_wa_slot'] = array
142 142
             'exclude'   => true,
143 143
             'inputType' => 'checkbox',
144 144
             'foreignKey'   => 'tl_vr_wa_lage.title',
145
-            'eval'      => array('mandatory' => false, 'multiple' => true, 'csv'=>',','tl_class' => 'w50'),
145
+            'eval'      => array('mandatory' => true, 'multiple' => true, 'csv'=>',','tl_class' => 'w50'),
146 146
             'sql'       => "blob NULL",
147 147
             'relation'   => array('type' => 'hasMany', 'load' => 'lazy')
148 148
         ),
... ...
@@ -63,7 +63,7 @@
63 63
                     {% endfor %}
64 64
                 </fieldset>
65 65
                 <fieldset>
66
-                    <legend>Lage(n)</legend>
66
+                    <legend>Lage(n)<sup class="text-danger">*</sup></legend>
67 67
                     {% for value,label in buchen.lage %}
68 68
                         <label><input type="checkbox" name="lage[]" value="{{ value }}"{{ value in buchung.lage ? ' checked' : '' }}> <span class="checkable">{{ label }}</span></label><br>
69 69
                     {% endfor %}
... ...
@@ -126,7 +126,7 @@
126 126
                             {% endfor %}
127 127
                         </fieldset>
128 128
                         <fieldset>
129
-                            <legend>Lage(n)</legend>
129
+                            <legend>Lage(n)<sup class="text-danger">*</sup></legend>
130 130
                             {% for value,label in buchen.lage %}
131 131
                                 <label><input type="checkbox" name="lage[]" value="{{ value }}"> <span class="checkable">{{ label }}</span></label><br>
132 132
                             {% endfor %}
... ...
@@ -439,7 +439,7 @@ class SlotAjaxController extends AbstractController
439 439
             }
440 440
         }
441 441
         $arrError = [];
442
-        foreach (['behaelter','sorten','ernteart'] as $field)
442
+        foreach (['behaelter','sorten','ernteart','lage'] as $field)
443 443
         {
444 444
             if (empty(Input::post($field)))
445 445
             {
... ...
@@ -538,7 +538,7 @@ class SlotAjaxController extends AbstractController
538 538
             }
539 539
         }
540 540
         $arrError = [];
541
-        foreach (['behaelter','sorten','ernteart'] as $field)
541
+        foreach (['behaelter','sorten','ernteart','lage'] as $field)
542 542
         {
543 543
             if (empty(Input::post($field)))
544 544
             {