section-byfieldsets.php
2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Make thing clear
*
* @var JForm $form The form instance for render the section
* @var string $basegroup The base group name
* @var string $group Current group name
* @var array $buttons Array of the buttons that will be rendered
*/
extract($displayData);
?>
<tr
class="subform-repeatable-group subform-repeatable-group-<?php echo $unique_subform_id; ?>"
data-base-name="<?php echo $basegroup; ?>"
data-group="<?php echo $group; ?>"
>
<?php foreach ($form->getFieldsets() as $fieldset) : ?>
<td class="<?php if (!empty($fieldset->class)){ echo $fieldset->class; } ?>" data-column="<?php echo $fieldset->name; ?>">
<?php foreach ($form->getFieldset($fieldset->name) as $field) : ?>
<?php echo $field->renderField(); ?>
<?php endforeach; ?>
</td>
<?php endforeach; ?>
<?php if (!empty($buttons)) : ?>
<td>
<div class="btn-group">
<?php if (!empty($buttons['add'])) : ?>
<a class="btn btn-mini button btn-success group-add group-add-<?php echo $unique_subform_id; ?>" aria-label="<?php echo JText::_('JGLOBAL_FIELD_ADD'); ?>">
<span class="icon-plus" aria-hidden="true"></span>
</a>
<?php endif; ?>
<?php if (!empty($buttons['remove'])) : ?>
<a class="btn btn-mini button btn-danger group-remove group-remove-<?php echo $unique_subform_id; ?>" aria-label="<?php echo JText::_('JGLOBAL_FIELD_REMOVE'); ?>">
<span class="icon-minus" aria-hidden="true"></span>
</a>
<?php endif; ?>
<?php if (!empty($buttons['move'])) : ?>
<a class="btn btn-mini button btn-primary group-move group-move-<?php echo $unique_subform_id; ?>" aria-label="<?php echo JText::_('JGLOBAL_FIELD_MOVE'); ?>">
<span class="icon-move" aria-hidden="true"></span>
</a>
<?php endif; ?>
</div>
</td>
<?php endif; ?>
</tr>