Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion components/com_users/tmpl/registration/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

<form id="member-registration" action="<?php echo Route::_('index.php?option=com_users&task=registration.register'); ?>" method="post" class="com-users-registration__form form-validate" enctype="multipart/form-data">
<?php // Iterate through the form fieldsets and display each one. ?>
<?php $captcha = ''; ?>
<?php foreach ($this->form->getFieldsets() as $fieldset) : ?>
<?php $fields = $this->form->getFieldset($fieldset->name); ?>
<?php if (count($fields)) : ?>
Expand All @@ -35,10 +36,19 @@
<?php if (isset($fieldset->label)) : ?>
<legend><?php echo Text::_($fieldset->label); ?></legend>
<?php endif; ?>
<?php echo $this->form->renderFieldset($fieldset->name); ?>
<?php foreach ($fields as $field) : ?>
<?php if ($field->name === 'jform[captcha]') : ?>
<?php $captcha = $field; ?>
<?php else : ?>
<?php echo $field->renderField(); ?>
<?php endif; ?>
<?php endforeach; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($captcha) : ?>
<?php echo $captcha->renderField(); ?>
<?php endif; ?>
<div class="com-users-registration__submit control-group">
<div class="controls">
<button type="submit" class="com-users-registration__register btn btn-primary validate">
Expand Down