芝麻web文件管理V1.00
编辑当前文件:/home/asmplong/www/ancien-site-2019/site/libraries/joomla/form/fields/user.php
getGroups(); $excluded = $this->getExcluded(); $link = 'index.php?option=com_users&view=users&layout=modal&tmpl=component&field='.$this->id.(isset($groups) ? ('&groups='.base64_encode(json_encode($groups))) : '').(isset($excluded) ? ('&excluded='.base64_encode(json_encode($excluded))) : ''); // Initialize some field attributes. $attr = $this->element['class'] ? ' class="'.(string) $this->element['class'].'"' : ''; $attr .= $this->element['size'] ? ' size="'.(int) $this->element['size'].'"' : ''; // Initialize JavaScript field attributes. $onchange = (string) $this->element['onchange']; // Load the modal behavior script. JHtml::_('behavior.modal', 'a.modal_'.$this->id); // Build the script. $script = array(); $script[] = ' function jSelectUser_'.$this->id.'(id, title) {'; $script[] = ' var old_id = document.getElementById("'.$this->id.'_id").value;'; $script[] = ' if (old_id != id) {'; $script[] = ' document.getElementById("'.$this->id.'_id").value = id;'; $script[] = ' document.getElementById("'.$this->id.'_name").value = title;'; $script[] = ' '.$onchange; $script[] = ' }'; $script[] = ' SqueezeBox.close();'; $script[] = ' }'; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); // Load the current username if available. $table = JTable::getInstance('user'); if ($this->value) { $table->load($this->value); } else { $table->username = JText::_('JLIB_FORM_SELECT_USER'); } // Create a dummy text field with the user name. $html[] = '
'; $html[] = '
'; $html[] = '
'; // Create the user select button. $html[] = '
'; $html[] = '
'; if ($this->element['readonly'] != 'true') { $html[] = '
'; $html[] = ' '.JText::_('JLIB_FORM_CHANGE_USER').'
'; } $html[] = '
'; $html[] = '
'; // Create the real field, hidden, that stored the user id. $html[] = '
'; return implode("\n", $html); } /** * Method to get the filtering groups (null means no filtering) * * @return mixed array of filtering groups or null. * @since 11.1 */ protected function getGroups() { return null; } /** * Method to get the users to exclude from the list of users * * @return mixed Array of users to exclude or null to to not exclude them * * @since 11.1 */ protected function getExcluded() { return null; } }