Browse code

Alter row templates to new Contao 4.4 format

Benjamin Roth authored on06/07/2017 20:27:03
Showing2 changed files
... ...
@@ -1,34 +1,8 @@
1 1
 
2
-<?php if ($this->tableless): ?>
2
+<div class="<?= $this->prefix; ?><?php if ($this->class) echo ' ' . $this->class; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_clear): ?> clr<?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?>">
3
+  <?php $this->block('label'); ?>
4
+  <?php $this->endblock(); ?>
3 5
 
4
-  <div class="<?= $this->prefix; ?><?php if ($this->class) echo ' ' . $this->class; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_clear): ?> clr<?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?>">
5
-    <?php $this->block('label'); ?>
6
-    <?php $this->endblock(); ?>
7
-
8
-    <?php $this->block('field'); ?>
9
-    <?php $this->endblock(); ?>
10
-
11
-    <?php if ($this->addSubmit): ?>
12
-      <?php $this->insert('_form_addsubmit', array('id'=>$this->id,'slabel'=>$this->slabel)); ?>
13
-    <?php endif; ?>
14
-  </div>
15
-
16
-<?php else: ?>
17
-
18
-  <tr class="<?= $this->rowClass; ?>">
19
-    <td class="col_0 col_first">
20
-      <?php $this->block('label'); ?>
21
-        &nbsp;
22
-      <?php $this->endblock(); ?>
23
-    </td>
24
-    <td class="col_1 col_last">
25
-      <?php $this->block('field'); ?>
26
-        &nbsp;
27
-      <?php $this->endblock(); ?>
28
-      <?php if ($this->addSubmit): ?>
29
-        <?php $this->insert('_form_addsubmit', array('id'=>$this->id,'slabel'=>$this->slabel)); ?>
30
-      <?php endif; ?>
31
-    </td>
32
-  </tr>
33
-
34
-<?php endif; ?>
6
+  <?php $this->block('field'); ?>
7
+  <?php $this->endblock(); ?>
8
+</div>
... ...
@@ -1,47 +1,16 @@
1 1
 
2
-<?php if ($this->tableless): ?>
2
+<div class="<?= $this->prefix; ?><?php if ($this->class) echo ' ' . $this->class; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_clear): ?> clr<?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?>">
3
+  <?php $this->block('label'); ?>
4
+  <?php $this->endblock(); ?>
3 5
 
4
-  <div class="<?= $this->prefix; ?><?php if ($this->class) echo ' ' . $this->class; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_clear): ?> clr<?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?>">
5
-    <?php $this->block('label'); ?>
6
-    <?php $this->endblock(); ?>
6
+  <?php $this->block('field'); ?>
7
+  <?php $this->endblock(); ?>
8
+</div>
7 9
 
8
-    <?php $this->block('field'); ?>
9
-    <?php $this->endblock(); ?>
10
-  </div>
10
+<div class="<?= $this->prefix; ?> confirm<?php if ($this->class) echo ' ' . $this->class; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?>">
11
+  <?php $this->block('label2'); ?>
12
+  <?php $this->endblock(); ?>
11 13
 
12
-  <div class="<?= $this->prefix; ?> confirm<?php if ($this->class) echo ' ' . $this->class; ?><?php if ($this->eSM_fl_width): ?> w<?php echo $this->eSM_fl_width; ?><?php endif; ?><?php if ($this->eSM_fl_class): ?> <?php echo $this->eSM_fl_class; ?><?php endif; ?>">
13
-    <?php $this->block('label2'); ?>
14
-    <?php $this->endblock(); ?>
15
-
16
-    <?php $this->block('field2'); ?>
17
-    <?php $this->endblock(); ?>
18
-  </div>
19
-
20
-<?php else: ?>
21
-
22
-  <tr class="<?= $this->rowClass; ?>">
23
-    <td class="col_0 col_first">
24
-      <?php $this->block('label'); ?>
25
-      &nbsp;
26
-      <?php $this->endblock(); ?>
27
-    </td>
28
-    <td class="col_1 col_last">
29
-      <?php $this->block('field'); ?>
30
-      &nbsp;
31
-      <?php $this->endblock(); ?>
32
-    </td>
33
-  </tr>
34
-  <tr class="<?= $this->rowClassConfirm; ?>">
35
-    <td class="col_0 col_first">
36
-      <?php $this->block('label2'); ?>
37
-      &nbsp;
38
-      <?php $this->endblock(); ?>
39
-    </td>
40
-    <td class="col_1 col_last">
41
-      <?php $this->block('field2'); ?>
42
-      &nbsp;
43
-      <?php $this->endblock(); ?>
44
-    </td>
45
-  </tr>
46
-
47
-<?php endif; ?>
14
+  <?php $this->block('field2'); ?>
15
+  <?php $this->endblock(); ?>
16
+</div>