-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
section-byfieldsets.php
45 lines (42 loc) · 1.6 KB
/
section-byfieldsets.php
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
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2015 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 - Form for render section
* @var string $basegroup - base group name
* @var string $group - current group name
* @var array $buttons Buttons that will be enabled
*/
extract($displayData);
?>
<div class="subform-repeatable-group" data-base-name="<?php echo $basegroup; ?>" data-group="<?php echo $group; ?>">
<?php if(!empty($buttons)):?>
<div class="btn-toolbar text-right">
<div class="btn-group">
<?php if(!empty($buttons['add'])):?><a class="group-add btn btn-mini button btn-success"><span class="icon-plus"></span> </a><?php endif;?>
<?php if(!empty($buttons['remove'])):?><a class="group-remove btn btn-mini button btn-danger"><span class="icon-minus"></span> </a><?php endif;?>
<?php if(!empty($buttons['move'])):?><a class="group-move btn btn-mini button btn-primary"><span class="icon-move"></span> </a><?php endif;?>
</div>
</div>
<?php endif; ?>
<div class="row-fluid">
<?php foreach($form->getFieldsets() as $fieldset): ?>
<fieldset class="<?php if(!empty($fieldset->class)){ echo $fieldset->class; } ?>">
<?php if(!empty($fieldset->label)):?>
<legend><?php echo JText::_($fieldset->label); ?></legend>
<?php endif; ?>
<?php foreach($form->getFieldset($fieldset->name) as $field): ?>
<?php echo $field->renderField(); ?>
<?php endforeach; ?>
</fieldset>
<?php endforeach; ?>
</div>
</div>