Skip to content

Commit

Permalink
Use built in JForm method to render fields
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Dec 22, 2014
1 parent 0989fbe commit abc407d
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions components/com_config/view/templates/tmpl/default_options.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,7 @@
if (!empty($fieldSets['com_config'])):?>

<fieldset class="form-horizontal">

<?php foreach ($this->form->getFieldset('com_config') as $field) : ?>
<div class="control-group">
<div class="control-label">
<?php echo $field->label; ?>
</div>
<div class="controls">
<?php echo $field->input; ?>
</div>
</div>

<?php endforeach; ?>

<?php echo $this->form->renderFieldset('com_config'); ?>
</fieldset>

<?php else:
Expand All @@ -53,17 +41,7 @@
?>

<fieldset class="form-horizontal">

<?php foreach ($this->form->getFieldset($name) as $field) : ?>
<div class="control-group">
<div class="control-label">
<?php echo $field->label; ?>
</div>
<div class="controls">
<?php echo $field->input; ?>
</div>
</div>
<?php endforeach; ?>
<?php echo $this->form->renderFieldset($name); ?>
</fieldset>
<?php endforeach;
endif;

0 comments on commit abc407d

Please sign in to comment.