Browse code

Templates now use php short open tags

Benjamin Roth authored on17/08/2015 17:19:47
Showing1 changed files
... ...
@@ -2,29 +2,29 @@
2 2
 
3 3
 <?php $this->block('label'); ?>
4 4
   <?php if ($this->hasErrors()): ?>
5
-    <span class="errortip" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error; contentAsHTML: true;">?</span>
5
+    <span class="errortip" title="<?= htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error; contentAsHTML: true;">?</span>
6 6
   <?php endif; ?>
7 7
 
8 8
   <?php if ($this->label): ?>
9
-    <label for="ctrl_<?php echo $this->id; ?>"<?php if ($this->class): ?> class="<?php echo $this->class; ?>"<?php endif; ?>>
9
+    <label for="ctrl_<?= $this->id; ?>"<?php if ($this->class): ?> class="<?php echo $this->class; ?>"<?php endif; ?>>
10 10
       <?php if ($this->mandatory): ?>
11
-        <span class="invisible"><?php echo $this->mandatoryField; ?></span> <?php echo $this->label; ?><span class="mandatory">*</span>
11
+        <span class="invisible"><?= $this->mandatoryField; ?></span> <?php echo $this->label; ?><span class="mandatory">*</span>
12 12
       <?php else: ?>
13
-        <?php echo $this->label; ?>
13
+        <?= $this->label; ?>
14 14
       <?php endif; ?>
15 15
     </label>
16 16
   <?php endif; ?>
17 17
 <?php $this->endblock(); ?>
18 18
 
19 19
 <?php $this->block('field'); ?>
20
-  <select name="<?php echo $this->name; ?>" id="ctrl_<?php echo $this->id; ?>" class="<?php echo $this->class; ?>"<?php echo $this->getAttributes(); ?>>
20
+  <select name="<?= $this->name; ?>" id="ctrl_<?php echo $this->id; ?>" class="<?php echo $this->class; ?>"<?php echo $this->getAttributes(); ?>>
21 21
     <?php foreach ($this->getOptions() as $option): ?>
22 22
       <?php if ($option['type'] == 'group_start'): ?>
23
-        <optgroup label="<?php echo $option['label']; ?>">
23
+        <optgroup label="<?= $option['label']; ?>">
24 24
       <?php endif; ?>
25 25
 
26 26
       <?php if ($option['type'] == 'option'): ?>
27
-        <option value="<?php echo $option['value']; ?>"<?php echo $option['selected']; ?>><?php echo $option['label']; ?></option>
27
+        <option value="<?= $option['value']; ?>"<?php echo $option['selected']; ?>><?php echo $option['label']; ?></option>
28 28
       <?php endif; ?>
29 29
 
30 30
       <?php if ($option['type'] == 'group_end'): ?>
Browse code

Initial commit

Benjamin Roth authored on27/03/2015 10:45:40
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,35 @@
1
+<?php $this->extend('form_row'); ?>
2
+
3
+<?php $this->block('label'); ?>
4
+  <?php if ($this->hasErrors()): ?>
5
+    <span class="errortip" title="<?php echo htmlspecialchars($this->getErrorsAsString()); ?>" data-tooltip="position: top; offsetY: 10; theme: tooltipster-error; contentAsHTML: true;">?</span>
6
+  <?php endif; ?>
7
+
8
+  <?php if ($this->label): ?>
9
+    <label for="ctrl_<?php echo $this->id; ?>"<?php if ($this->class): ?> class="<?php echo $this->class; ?>"<?php endif; ?>>
10
+      <?php if ($this->mandatory): ?>
11
+        <span class="invisible"><?php echo $this->mandatoryField; ?></span> <?php echo $this->label; ?><span class="mandatory">*</span>
12
+      <?php else: ?>
13
+        <?php echo $this->label; ?>
14
+      <?php endif; ?>
15
+    </label>
16
+  <?php endif; ?>
17
+<?php $this->endblock(); ?>
18
+
19
+<?php $this->block('field'); ?>
20
+  <select name="<?php echo $this->name; ?>" id="ctrl_<?php echo $this->id; ?>" class="<?php echo $this->class; ?>"<?php echo $this->getAttributes(); ?>>
21
+    <?php foreach ($this->getOptions() as $option): ?>
22
+      <?php if ($option['type'] == 'group_start'): ?>
23
+        <optgroup label="<?php echo $option['label']; ?>">
24
+      <?php endif; ?>
25
+
26
+      <?php if ($option['type'] == 'option'): ?>
27
+        <option value="<?php echo $option['value']; ?>"<?php echo $option['selected']; ?>><?php echo $option['label']; ?></option>
28
+      <?php endif; ?>
29
+
30
+      <?php if ($option['type'] == 'group_end'): ?>
31
+        </optgroup>
32
+      <?php endif; ?>
33
+    <?php endforeach; ?>
34
+  </select>
35
+<?php $this->endblock(); ?>