| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,41 @@ |
| 1 |
+<?php $this->extend('form_row'); ?>
|
|
| 2 |
+ |
|
| 3 |
+<?php $this->block('field'); ?>
|
|
| 4 |
+<fieldset id="ctrl_<?= $this->id ?>" class="checkbox_container<?php if ($this->class) : ?> <?= $this->class ?><?php endif; ?>"> |
|
| 5 |
+ |
|
| 6 |
+ <?php if ($this->label) : ?> |
|
| 7 |
+ <legend> |
|
| 8 |
+ <?php if ($this->mandatory) : ?> |
|
| 9 |
+ <span class="invisible"><?= $this->mandatoryField ?> </span><?= $this->label ?><span class="mandatory">*</span> |
|
| 10 |
+ <?php else : ?> |
|
| 11 |
+ <?= $this->label ?> |
|
| 12 |
+ <?php endif; ?> |
|
| 13 |
+ </legend> |
|
| 14 |
+ <?php endif; ?> |
|
| 15 |
+ |
|
| 16 |
+ |
|
| 17 |
+ <input type="hidden" name="<?= $this->name ?>" value=""> |
|
| 18 |
+ |
|
| 19 |
+ <?php foreach ($this->getOptions() as $option) : ?> |
|
| 20 |
+ <?php if ('group_start' == $option['type']) : ?>
|
|
| 21 |
+ <fieldset> |
|
| 22 |
+ <legend><?= $option['label'] ?></legend> |
|
| 23 |
+ <?php endif; ?> |
|
| 24 |
+ |
|
| 25 |
+ <?php if ('option' == $option['type']) : ?>
|
|
| 26 |
+ <div class="form-check"><input type="checkbox" class="form-check-input" name="<?= $option['name'] ?>" id="opt_<?= $option['id'] ?>" class="checkbox" value="<?= $option['value'] ?>" <?= $option['checked'] ?><?= $option['attributes'] ?>> <label class="form-check-label" id="lbl_<?= $option['id'] ?>" for="opt_<?= $option['id'] ?>"><?= $option['label'] ?></label></div> |
|
| 27 |
+ <?php endif; ?> |
|
| 28 |
+ |
|
| 29 |
+ <?php if ('group_end' == $option['type']) : ?>
|
|
| 30 |
+ </fieldset> |
|
| 31 |
+ <?php endif; ?> |
|
| 32 |
+ <?php endforeach; ?> |
|
| 33 |
+ |
|
| 34 |
+ |
|
| 35 |
+ <?php if ($this->hasErrors()) : ?> |
|
| 36 |
+ <p class="error"><?= $this->getErrorAsString() ?></p> |
|
| 37 |
+ <?php endif; ?> |
|
| 38 |
+ |
|
| 39 |
+ |
|
| 40 |
+</fieldset> |
|
| 41 |
+<?php $this->endblock(); ?> |
|
| 0 | 42 |
\ No newline at end of file |