default_options.php
1.13 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
<?php
/**
* @package Joomla.Site
* @subpackage com_config
*
* @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;
// Load chosen.css
JHtml::_('formbehavior.chosen', 'select');
?>
<?php
$fieldSets = $this->form->getFieldsets('params');
?>
<legend><?php echo JText::_('COM_CONFIG_TEMPLATE_SETTINGS'); ?></legend>
<?php
// Search for com_config field set
if (!empty($fieldSets['com_config'])) : ?>
<fieldset class="form-horizontal">
<?php echo $this->form->renderFieldset('com_config'); ?>
</fieldset>
<?php else :
// Fall-back to display all in params
foreach ($fieldSets as $name => $fieldSet) :
$label = !empty($fieldSet->label) ? $fieldSet->label : 'COM_CONFIG_' . $name . '_FIELDSET_LABEL';
if (isset($fieldSet->description) && trim($fieldSet->description)) :
echo '<p class="tip">' . $this->escape(JText::_($fieldSet->description)) . '</p>';
endif;
?>
<fieldset class="form-horizontal">
<?php echo $this->form->renderFieldset($name); ?>
</fieldset>
<?php endforeach;
endif;