You've already forked joomla_test
							
							first commit
This commit is contained in:
		| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
							
								
								
									
										114
									
								
								administrator/components/com_users/views/level/tmpl/edit.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										114
									
								
								administrator/components/com_users/views/level/tmpl/edit.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,114 @@ | ||||
| <?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'); | ||||
| $canDo = UsersHelper::getActions(); | ||||
| ?> | ||||
|  | ||||
| <script type="text/javascript"> | ||||
| Joomla.submitbutton = function(task) | ||||
| { | ||||
| 	if (task == 'level.cancel' || document.formvalidator.isValid(document.id('level-form'))) | ||||
| 	{ | ||||
| 		Joomla.submitform(task, document.id('level-form')); | ||||
| 	} | ||||
| } | ||||
| /* | ||||
| window.addEvent('domready', function(){ | ||||
| 	document.id('user-groups').getElements('input').each(function(i){ | ||||
| 		// Event to check all child groups. | ||||
| 		i.addEvent('check', function(e){ | ||||
| 			// Check the child groups. | ||||
| 			document.id('user-groups').getElements('input').each(function(c){ | ||||
| 				if (this.getProperty('rel') == c.id) | ||||
| 				{ | ||||
| 					c.setProperty('checked', true); | ||||
| 					c.setProperty('disabled', true); | ||||
| 					c.fireEvent('check'); | ||||
| 				} | ||||
| 			}.bind(this)); | ||||
| 		}.bind(i)); | ||||
|  | ||||
| 		// Event to uncheck all the parent groups. | ||||
| 		i.addEvent('uncheck', function(e){ | ||||
| 			// Uncheck the parent groups. | ||||
| 			document.id('user-groups').getElements('input').each(function(c){ | ||||
| 				if (c.getProperty('rel') == this.id) | ||||
| 				{ | ||||
| 					c.setProperty('checked', false); | ||||
| 					c.setProperty('disabled', false); | ||||
| 					c.fireEvent('uncheck'); | ||||
| 				} | ||||
| 			}.bind(this)); | ||||
| 		}.bind(i)); | ||||
|  | ||||
| 		// Bind to the click event to check/uncheck child/parent groups. | ||||
| 		i.addEvent('click', function(e){ | ||||
| 			// Check the child groups. | ||||
| 			document.id('user-groups').getElements('input').each(function(c){ | ||||
| 				if (this.getProperty('rel') == c.id) | ||||
| 				{ | ||||
| 					c.setProperty('checked', true); | ||||
| 					if (this.getProperty('checked')) | ||||
| 					{ | ||||
| 						c.setProperty('disabled', true); | ||||
| 					} else { | ||||
| 						c.setProperty('disabled', false); | ||||
| 					} | ||||
| 					c.fireEvent('check'); | ||||
| 				} | ||||
| 			}.bind(this)); | ||||
|  | ||||
| 			// Uncheck the parent groups. | ||||
| 			document.id('user-groups').getElements('input').each(function(c){ | ||||
| 				if (c.getProperty('rel') == this.id) | ||||
| 				{ | ||||
| 					c.setProperty('checked', false); | ||||
| 					c.setProperty('disabled', false); | ||||
| 					c.fireEvent('uncheck'); | ||||
| 				} | ||||
| 			}.bind(this)); | ||||
| 		}.bind(i)); | ||||
|  | ||||
| 		// Initialise the widget. | ||||
| 		if (i.getProperty('checked')) | ||||
| 		{ | ||||
| 			i.fireEvent('click'); | ||||
| 		} | ||||
| 	}); | ||||
| }); | ||||
| */ | ||||
| </script> | ||||
|  | ||||
|  | ||||
| <form action="<?php echo JRoute::_('index.php?option=com_users&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="level-form" class="form-validate form-horizontal"> | ||||
| 	<fieldset> | ||||
| 		<legend><?php echo JText::_('COM_USERS_LEVEL_DETAILS');?></legend> | ||||
| 		<div class="control-group"> | ||||
| 			<div class="control-label"> | ||||
| 				<?php echo $this->form->getLabel('title'); ?> | ||||
| 			</div> | ||||
| 			<div class="controls"> | ||||
| 				<?php echo $this->form->getInput('title'); ?> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</fieldset> | ||||
|  | ||||
| 	<fieldset> | ||||
| 		<legend><?php echo JText::_('COM_USERS_USER_GROUPS_HAVING_ACCESS');?></legend> | ||||
| 		<?php echo JHtml::_('access.usergroups', 'jform[rules]', $this->item->rules); ?> | ||||
| 	</fieldset> | ||||
| 	<input type="hidden" name="task" value="" /> | ||||
| 	<?php echo JHtml::_('form.token'); ?> | ||||
| </form> | ||||
| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
							
								
								
									
										85
									
								
								administrator/components/com_users/views/level/view.html.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										85
									
								
								administrator/components/com_users/views/level/view.html.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,85 @@ | ||||
| <?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; | ||||
|  | ||||
| /** | ||||
|  * View to edit a user view level. | ||||
|  * | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_users | ||||
|  * @since       1.6 | ||||
|  */ | ||||
| class UsersViewLevel extends JViewLegacy | ||||
| { | ||||
| 	protected $form; | ||||
|  | ||||
| 	protected $item; | ||||
|  | ||||
| 	protected $state; | ||||
|  | ||||
| 	/** | ||||
| 	 * Display the view | ||||
| 	 */ | ||||
| 	public function display($tpl = null) | ||||
| 	{ | ||||
| 		$this->form		= $this->get('Form'); | ||||
| 		$this->item		= $this->get('Item'); | ||||
| 		$this->state	= $this->get('State'); | ||||
|  | ||||
| 		// Check for errors. | ||||
| 		if (count($errors = $this->get('Errors'))) | ||||
| 		{ | ||||
| 			JError::raiseError(500, implode("\n", $errors)); | ||||
| 			return false; | ||||
| 		} | ||||
|  | ||||
| 		$this->addToolbar(); | ||||
| 		parent::display($tpl); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Add the page title and toolbar. | ||||
| 	 * | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function addToolbar() | ||||
| 	{ | ||||
| 		JFactory::getApplication()->input->set('hidemainmenu', true); | ||||
|  | ||||
| 		$isNew	= ($this->item->id == 0); | ||||
| 		$canDo  = UsersHelper::getActions(); | ||||
|  | ||||
| 		JToolbarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_LEVEL_TITLE' : 'COM_USERS_VIEW_EDIT_LEVEL_TITLE'), 'levels-add'); | ||||
|  | ||||
| 		if ($canDo->get('core.edit')||$canDo->get('core.create')) | ||||
| 		{ | ||||
| 			JToolbarHelper::apply('level.apply'); | ||||
| 			JToolbarHelper::save('level.save'); | ||||
| 		} | ||||
| 		if ($canDo->get('core.create')) | ||||
| 		{ | ||||
| 			JToolbarHelper::save2new('level.save2new'); | ||||
| 		} | ||||
| 		// If an existing item, can save to a copy. | ||||
| 		if (!$isNew && $canDo->get('core.create')){ | ||||
| 				JToolbarHelper::save2copy('level.save2copy'); | ||||
| 			} | ||||
| 		if (empty($this->item->id)){ | ||||
| 				JToolbarHelper::cancel('level.cancel'); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 				JToolbarHelper::cancel('level.cancel', 'JTOOLBAR_CLOSE'); | ||||
| 		} | ||||
|  | ||||
| 			JToolbarHelper::divider(); | ||||
| 			JToolbarHelper::help('JHELP_USERS_ACCESS_LEVELS_EDIT'); | ||||
| 	} | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 alazhar
					alazhar