You've already forked joomla_test
first commit
This commit is contained in:
1
administrator/components/com_users/views/user/index.html
Normal file
1
administrator/components/com_users/views/user/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
93
administrator/components/com_users/views/user/tmpl/edit.php
Normal file
93
administrator/components/com_users/views/user/tmpl/edit.php
Normal file
@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Include the component HTML helpers.
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
$canDo = UsersHelper::getActions();
|
||||
|
||||
// Get the form fieldsets.
|
||||
$fieldsets = $this->form->getFieldsets();
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == 'user.cancel' || document.formvalidator.isValid(document.id('user-form')))
|
||||
{
|
||||
Joomla.submitform(task, document.getElementById('user-form'));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<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">
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</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 ($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: ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
</fieldset>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Include the component HTML helpers.
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
?>
|
||||
<?php echo JHtml::_('access.usergroups', 'jform[groups]', $this->groups, true); ?>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
91
administrator/components/com_users/views/user/view.html.php
Normal file
91
administrator/components/com_users/views/user/view.html.php
Normal file
@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_users
|
||||
* @since 1.5
|
||||
*/
|
||||
class UsersViewUser extends JViewLegacy
|
||||
{
|
||||
protected $form;
|
||||
|
||||
protected $item;
|
||||
|
||||
protected $grouplist;
|
||||
|
||||
protected $groups;
|
||||
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->grouplist = $this->get('Groups');
|
||||
$this->groups = $this->get('AssignedGroups');
|
||||
$this->state = $this->get('State');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->form->setValue('password', null);
|
||||
$this->form->setValue('password2', null);
|
||||
|
||||
parent::display($tpl);
|
||||
$this->addToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
JFactory::getApplication()->input->set('hidemainmenu', true);
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$canDo = UsersHelper::getActions();
|
||||
$isNew = ($this->item->id == 0);
|
||||
$isProfile = $this->item->id == $user->id;
|
||||
|
||||
JToolbarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_USER_TITLE' : ($isProfile ? 'COM_USERS_VIEW_EDIT_PROFILE_TITLE' : 'COM_USERS_VIEW_EDIT_USER_TITLE')), $isNew ? 'user-add' : ($isProfile ? 'user-profile' : 'user-edit'));
|
||||
if ($canDo->get('core.edit')||$canDo->get('core.create'))
|
||||
{
|
||||
JToolbarHelper::apply('user.apply');
|
||||
JToolbarHelper::save('user.save');
|
||||
}
|
||||
if ($canDo->get('core.create')&&$canDo->get('core.manage'))
|
||||
{
|
||||
JToolbarHelper::save2new('user.save2new');
|
||||
}
|
||||
if (empty($this->item->id))
|
||||
{
|
||||
JToolbarHelper::cancel('user.cancel');
|
||||
}
|
||||
else
|
||||
{
|
||||
JToolbarHelper::cancel('user.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::help('JHELP_USERS_USER_MANAGER_EDIT');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user