Skip to content

Commit

Permalink
Merge pull request joomla#47 from zero-24/patch-12
Browse files Browse the repository at this point in the history
a bit more cs
  • Loading branch information
andrepereiradasilva committed May 10, 2016
2 parents 15cacf1 + 9bd3912 commit 7a6bbfa
Showing 1 changed file with 14 additions and 22 deletions.
36 changes: 14 additions & 22 deletions administrator/components/com_users/views/user/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,9 @@
?>

<form action="<?php echo JRoute::_('index.php?option=com_users&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="user-form" class="form-validate form-horizontal" enctype="multipart/form-data">

<?php echo JLayoutHelper::render('joomla.edit.item_title', $this); ?>

<fieldset>
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'details')); ?>

<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'details', JText::_('COM_USERS_USER_ACCOUNT_DETAILS', true)); ?>
<?php foreach ($this->form->getFieldset('user_details') as $field) : ?>
<div class="control-group">
Expand All @@ -67,28 +64,25 @@
</div>
<?php endforeach; ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>

<?php if ($this->grouplist) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'groups', JText::_('COM_USERS_ASSIGNED_GROUPS', true)); ?>
<?php echo $this->loadTemplate('groups'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>

<?php
foreach ($fieldsets as $fieldset) :
if ($fieldset->name == 'user_details') :
continue;
endif;
?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', $fieldset->name, JText::_($fieldset->label, true)); ?>
<?php foreach ($fieldsets as $fieldset) : ?>
<?php if ($fieldset->name == 'user_details') : ?>
<?php continue; ?>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', $fieldset->name, JText::_($fieldset->label, true)); ?>
<?php foreach ($this->form->getFieldset($fieldset->name) as $field) : ?>
<?php if ($field->hidden) : ?>
<div class="control-group">
<div class="controls">
<?php echo $field->input; ?>
</div>
</div>
<?php else: ?>
<?php else : ?>
<div class="control-group">
<div class="control-label">
<?php echo $field->label; ?>
Expand All @@ -99,8 +93,8 @@
</div>
<?php endif; ?>
<?php endforeach; ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endforeach; ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endforeach; ?>
<?php if (!empty($this->tfaform) && $this->item->id) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'twofactorauth', JText::_('COM_USERS_USER_TWO_FACTOR_AUTH', true)); ?>
<?php if (extension_loaded('mcrypt')) : ?>
Expand All @@ -126,19 +120,19 @@

<fieldset>
<legend>
<?php echo JText::_('COM_USERS_USER_OTEPS') ?>
<?php echo JText::_('COM_USERS_USER_OTEPS'); ?>
</legend>
<div class="alert alert-info">
<?php echo JText::_('COM_USERS_USER_OTEPS_DESC') ?>
<?php echo JText::_('COM_USERS_USER_OTEPS_DESC'); ?>
</div>
<?php if (empty($this->otpConfig->otep)) : ?>
<div class="alert alert-warning">
<?php echo JText::_('COM_USERS_USER_OTEPS_WAIT_DESC') ?>
<?php echo JText::_('COM_USERS_USER_OTEPS_WAIT_DESC'); ?>
</div>
<?php else : ?>
<?php foreach ($this->otpConfig->otep as $otep) : ?>
<span class="span3">
<?php echo substr($otep, 0, 4) ?>-<?php echo substr($otep, 4, 4) ?>-<?php echo substr($otep, 8, 4) ?>-<?php echo substr($otep, 12, 4) ?>
<?php echo substr($otep, 0, 4) ?>-<?php echo substr($otep, 4, 4) ?>-<?php echo substr($otep, 8, 4) ?>-<?php echo substr($otep, 12, 4); ?>
</span>
<?php endforeach; ?>
<div class="clearfix"></div>
Expand All @@ -148,17 +142,15 @@
<div>
<button type="button" class="close" data-dismiss="alert">×</button>
<div class="alert alert-error">
<h4 class="alert-heading"><?php echo JText::_('ERROR') ?></h4>
<div class="alert-message"><?php echo JText::_('COM_USERS_WARNING_MCRYPT_NEEDED') ?></div>
<h4 class="alert-heading"><?php echo JText::_('ERROR'); ?></h4>
<div class="alert-message"><?php echo JText::_('COM_USERS_WARNING_MCRYPT_NEEDED'); ?></div>
</div>
</div>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>

<?php echo JHtml::_('bootstrap.endTabSet'); ?>
</fieldset>

<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>

0 comments on commit 7a6bbfa

Please sign in to comment.