first commit

This commit is contained in:
alazhar
2020-01-02 22:20:31 +07:00
commit 10eb3340ad
5753 changed files with 631345 additions and 0 deletions

View File

@ -0,0 +1,749 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_contact
*
* @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;
JLoader::register('ContactHelper', JPATH_ADMINISTRATOR . '/components/com_contact/helpers/contact.php');
/**
* Item Model for a Contact.
*
* @package Joomla.Administrator
* @subpackage com_contact
* @since 1.6
*/
class ContactModelContact extends JModelAdmin
{
/**
* Method to perform batch operations on an item or a set of items.
*
* @param array $commands An array of commands to perform.
* @param array $pks An array of item ids.
* @param array $contexts An array of item contexts.
*
* @return boolean Returns true on success, false on failure.
*
* @since 2.5
*/
public function batch($commands, $pks, $contexts)
{
// Sanitize user ids.
$pks = array_unique($pks);
JArrayHelper::toInteger($pks);
// Remove any values of zero.
if (array_search(0, $pks, true))
{
unset($pks[array_search(0, $pks, true)]);
}
if (empty($pks))
{
$this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED'));
return false;
}
$done = false;
if (!empty($commands['category_id']))
{
$cmd = JArrayHelper::getValue($commands, 'move_copy', 'c');
if ($cmd == 'c')
{
$result = $this->batchCopy($commands['category_id'], $pks, $contexts);
if (is_array($result))
{
$pks = $result;
}
else
{
return false;
}
}
elseif ($cmd == 'm' && !$this->batchMove($commands['category_id'], $pks, $contexts))
{
return false;
}
$done = true;
}
if (!empty($commands['assetgroup_id']))
{
if (!$this->batchAccess($commands['assetgroup_id'], $pks, $contexts))
{
return false;
}
$done = true;
}
if (!empty($commands['language_id']))
{
if (!$this->batchLanguage($commands['language_id'], $pks, $contexts))
{
return false;
}
$done = true;
}
if (!empty($commands['tag']))
{
if (!$this->batchTag($commands['tag'], $pks, $contexts))
{
return false;
}
$done = true;
}
if (strlen($commands['user_id']) > 0)
{
if (!$this->batchUser($commands['user_id'], $pks, $contexts))
{
return false;
}
$done = true;
}
if (!$done)
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
// Clear the cache
$this->cleanCache();
return true;
}
/**
* Batch copy items to a new category or current.
*
* @param integer $value The new category.
* @param array $pks An array of row IDs.
* @param array $contexts An array of item contexts.
*
* @return mixed An array of new IDs on success, boolean false on failure.
*
* @since 11.1
*/
protected function batchCopy($value, $pks, $contexts)
{
$categoryId = (int) $value;
$table = $this->getTable();
$i = 0;
// Check that the category exists
if ($categoryId)
{
$categoryTable = JTable::getInstance('Category');
if (!$categoryTable->load($categoryId))
{
if ($error = $categoryTable->getError())
{
// Fatal error
$this->setError($error);
return false;
}
else
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_MOVE_CATEGORY_NOT_FOUND'));
return false;
}
}
}
if (empty($categoryId))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_MOVE_CATEGORY_NOT_FOUND'));
return false;
}
// Check that the user has create permission for the component
$user = JFactory::getUser();
if (!$user->authorise('core.create', 'com_contact.category.' . $categoryId))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_CREATE'));
return false;
}
// Parent exists so we let's proceed
while (!empty($pks))
{
// Pop the first ID off the stack
$pk = array_shift($pks);
$table->reset();
// Check that the row actually exists
if (!$table->load($pk))
{
if ($error = $table->getError())
{
// Fatal error
$this->setError($error);
return false;
}
else
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// Alter the title & alias
$data = $this->generateNewTitle($categoryId, $table->alias, $table->name);
$table->name = $data['0'];
$table->alias = $data['1'];
// Reset the ID because we are making a copy
$table->id = 0;
// New category ID
$table->catid = $categoryId;
// TODO: Deal with ordering?
//$table->ordering = 1;
// Check the row.
if (!$table->check())
{
$this->setError($table->getError());
return false;
}
// Store the row.
if (!$table->store())
{
$this->setError($table->getError());
return false;
}
// Get the new item ID
$newId = $table->get('id');
// Add the new ID to the array
$newIds[$i] = $newId;
$i++;
}
// Clean the cache
$this->cleanCache();
return $newIds;
}
/**
* Batch change a linked user.
*
* @param integer $value The new value matching a User ID.
* @param array $pks An array of row IDs.
* @param array $contexts An array of item contexts.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
protected function batchUser($value, $pks, $contexts)
{
// Set the variables
$user = JFactory::getUser();
$table = $this->getTable();
foreach ($pks as $pk)
{
if ($user->authorise('core.edit', $contexts[$pk]))
{
$table->reset();
$table->load($pk);
$table->user_id = (int) $value;
if (!$table->store())
{
$this->setError($table->getError());
return false;
}
}
else
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
}
// Clean the cache
$this->cleanCache();
return true;
}
/**
* Method to test whether a record can be deleted.
*
* @param object $record A record object.
*
* @return boolean True if allowed to delete the record. Defaults to the permission set in the component.
* @since 1.6
*/
protected function canDelete($record)
{
if (!empty($record->id))
{
if ($record->published != -2)
{
return;
}
$user = JFactory::getUser();
return $user->authorise('core.delete', 'com_contact.category.' . (int) $record->catid);
}
}
/**
* Method to test whether a record can have its state edited.
*
* @param object $record A record object.
*
* @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
* @since 1.6
*/
protected function canEditState($record)
{
$user = JFactory::getUser();
// Check against the category.
if (!empty($record->catid))
{
return $user->authorise('core.edit.state', 'com_contact.category.' . (int) $record->catid);
}
// Default to component settings if category not known.
else
{
return parent::canEditState($record);
}
}
/**
* Returns a Table object, always creating it
*
* @param type $type The table type to instantiate
* @param string $prefix A prefix for the table class name. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JTable A database object
* @since 1.6
*/
public function getTable($type = 'Contact', $prefix = 'ContactTable', $config = array())
{
return JTable::getInstance($type, $prefix, $config);
}
/**
* Method to get the row form.
*
* @param array $data Data for the form.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
*
* @return mixed A JForm object on success, false on failure
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{
JForm::addFieldPath('JPATH_ADMINISTRATOR/components/com_users/models/fields');
// Get the form.
$form = $this->loadForm('com_contact.contact', 'contact', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
{
return false;
}
// Modify the form based on access controls.
if (!$this->canEditState((object) $data))
{
// Disable fields for display.
$form->setFieldAttribute('featured', 'disabled', 'true');
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// Disable fields while saving.
// The controller has already verified this is a record you can edit.
$form->setFieldAttribute('featured', 'filter', 'unset');
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
return $form;
}
/**
* Method to get a single record.
*
* @param integer $pk The id of the primary key.
*
* @return mixed Object on success, false on failure.
* @since 1.6
*/
public function getItem($pk = null)
{
if ($item = parent::getItem($pk))
{
// Convert the metadata field to an array.
$registry = new JRegistry;
$registry->loadString($item->metadata);
$item->metadata = $registry->toArray();
}
// Load associated contact items
$app = JFactory::getApplication();
$assoc = isset($app->item_associations) ? $app->item_associations : 0;
if ($assoc)
{
$item->associations = array();
if ($item->id != null)
{
$associations = JLanguageAssociations::getAssociations('com_contact', '#__contact_details', 'com_contact.item', $item->id);
foreach ($associations as $tag => $association)
{
$item->associations[$tag] = $association->id;
}
}
}
// Load item tags
if (!empty($item->id))
{
$item->tags = new JHelperTags;
$item->tags->getTagIds($item->id, 'com_contact.contact');
}
return $item;
}
/**
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form.
* @since 1.6
*/
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState('com_contact.edit.contact.data', array());
if (empty($data))
{
$data = $this->getItem();
// Prime some default values.
if ($this->getState('contact.id') == 0)
{
$app = JFactory::getApplication();
$data->set('catid', $app->input->get('catid', $app->getUserState('com_contact.contacts.filter.category_id'), 'int'));
}
}
$this->preprocessData('com_contact.contact', $data);
return $data;
}
/**
* Method to save the form data.
*
* @param array The form data.
*
* @return boolean True on success.
* @since 3.0
*/
public function save($data)
{
$app = JFactory::getApplication();
// Alter the title for save as copy
if ($app->input->get('task') == 'save2copy')
{
list($name, $alias) = $this->generateNewTitle($data['catid'], $data['alias'], $data['name']);
$data['name'] = $name;
$data['alias'] = $alias;
$data['published'] = 0;
}
$links = array('linka', 'linkb', 'linkc', 'linkd', 'linke');
foreach ($links as $link)
{
if ($data['params'][$link])
{
$data['params'][$link] = JStringPunycode::urlToPunycode($data['params'][$link]);
}
}
if (parent::save($data))
{
$assoc = isset($app->item_associations) ? $app->item_associations : 0;
if ($assoc)
{
$id = (int) $this->getState($this->getName() . '.id');
$item = $this->getItem($id);
// Adding self to the association
$associations = $data['associations'];
foreach ($associations as $tag => $id)
{
if (empty($id))
{
unset($associations[$tag]);
}
}
// Detecting all item menus
$all_language = $item->language == '*';
if ($all_language && !empty($associations))
{
JError::raiseNotice(403, JText::_('COM_CONTACT_ERROR_ALL_LANGUAGE_ASSOCIATED'));
}
$associations[$item->language] = $item->id;
// Deleting old association for these items
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->delete('#__associations')
->where('context=' . $db->quote('com_contact.item'))
->where('id IN (' . implode(',', $associations) . ')');
$db->setQuery($query);
$db->execute();
if ($error = $db->getErrorMsg())
{
$this->setError($error);
return false;
}
if (!$all_language && count($associations))
{
// Adding new association for these items
$key = md5(json_encode($associations));
$query->clear()
->insert('#__associations');
foreach ($associations as $id)
{
$query->values($id . ',' . $db->quote('com_contact.item') . ',' . $db->quote($key));
}
$db->setQuery($query);
$db->execute();
if ($error = $db->getErrorMsg())
{
$this->setError($error);
return false;
}
}
}
return true;
}
return false;
}
/**
* Prepare and sanitise the table prior to saving.
*
* @param JTable $table
*
* @return void
* @since 1.6
*/
protected function prepareTable($table)
{
$date = JFactory::getDate();
$user = JFactory::getUser();
$table->name = htmlspecialchars_decode($table->name, ENT_QUOTES);
$table->alias = JApplication::stringURLSafe($table->alias);
if (empty($table->alias))
{
$table->alias = JApplication::stringURLSafe($table->name);
}
if (empty($table->id))
{
// Set the values
$table->created = $date->toSql();
// Set ordering to the last item if not set
if (empty($table->ordering))
{
$db = JFactory::getDbo();
$db->setQuery('SELECT MAX(ordering) FROM #__contact_details');
$max = $db->loadResult();
$table->ordering = $max + 1;
}
}
else
{
// Set the values
$table->modified = $date->toSql();
$table->modified_by = $user->get('id');
}
// Increment the content version number.
$table->version++;
}
/**
* A protected method to get a set of ordering conditions.
*
* @param JTable $table A record object.
*
* @return array An array of conditions to add to add to ordering queries.
* @since 1.6
*/
protected function getReorderConditions($table)
{
$condition = array();
$condition[] = 'catid = ' . (int) $table->catid;
return $condition;
}
protected function preprocessForm(JForm $form, $data, $group = 'content')
{
// Association content items
$app = JFactory::getApplication();
$assoc = isset($app->item_associations) ? $app->item_associations : 0;
if ($assoc)
{
$languages = JLanguageHelper::getLanguages('lang_code');
// force to array (perhaps move to $this->loadFormData())
$data = (array) $data;
$addform = new SimpleXMLElement('<form />');
$fields = $addform->addChild('fields');
$fields->addAttribute('name', 'associations');
$fieldset = $fields->addChild('fieldset');
$fieldset->addAttribute('name', 'item_associations');
$fieldset->addAttribute('description', 'COM_CONTACT_ITEM_ASSOCIATIONS_FIELDSET_DESC');
$add = false;
foreach ($languages as $tag => $language)
{
if (empty($data['language']) || $tag != $data['language'])
{
$add = true;
$field = $fieldset->addChild('field');
$field->addAttribute('name', $tag);
$field->addAttribute('type', 'modal_contact');
$field->addAttribute('language', $tag);
$field->addAttribute('label', $language->title);
$field->addAttribute('translate_label', 'false');
$field->addAttribute('edit', 'true');
$field->addAttribute('clear', 'true');
}
}
if ($add)
{
$form->load($addform, false);
}
}
parent::preprocessForm($form, $data, $group);
}
/**
* Method to toggle the featured setting of contacts.
*
* @param array $pks The ids of the items to toggle.
* @param integer $value The value to toggle to.
*
* @return boolean True on success.
* @since 1.6
*/
public function featured($pks, $value = 0)
{
// Sanitize the ids.
$pks = (array) $pks;
JArrayHelper::toInteger($pks);
if (empty($pks))
{
$this->setError(JText::_('COM_CONTACT_NO_ITEM_SELECTED'));
return false;
}
$table = $this->getTable();
try
{
$db = $this->getDbo();
$db->setQuery(
'UPDATE #__contact_details' .
' SET featured = ' . (int) $value .
' WHERE id IN (' . implode(',', $pks) . ')'
);
$db->execute();
}
catch (Exception $e)
{
$this->setError($e->getMessage());
return false;
}
$table->reorder();
// Clean component's cache
$this->cleanCache();
return true;
}
/**
* Method to change the title & alias.
*
* @param integer $parent_id The id of the parent.
* @param string $alias The alias.
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*
* @since 3.1
*/
protected function generateNewTitle($category_id, $alias, $name)
{
// Alter the title & alias
$table = $this->getTable();
while ($table->load(array('alias' => $alias, 'catid' => $category_id)))
{
if ($name == $table->name)
{
$name = JString::increment($name);
}
$alias = JString::increment($alias, 'dash');
}
return array($name, $alias);
}
}

View File

@ -0,0 +1,281 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_contact
*
* @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;
/**
* Methods supporting a list of contact records.
*
* @package Joomla.Administrator
* @subpackage com_contact
*/
class ContactModelContacts extends JModelList
{
/**
* Constructor.
*
* @param array $config An optional associative array of configuration settings.
*
* @see JController
* @since 1.6
*/
public function __construct($config = array())
{
if (empty($config['filter_fields']))
{
$config['filter_fields'] = array(
'id', 'a.id',
'name', 'a.name',
'alias', 'a.alias',
'checked_out', 'a.checked_out',
'checked_out_time', 'a.checked_out_time',
'catid', 'a.catid', 'category_title',
'user_id', 'a.user_id',
'published', 'a.published',
'access', 'a.access', 'access_level',
'created', 'a.created',
'created_by', 'a.created_by',
'ordering', 'a.ordering',
'featured', 'a.featured',
'language', 'a.language',
'publish_up', 'a.publish_up',
'publish_down', 'a.publish_down',
'ul.name', 'linked_user',
);
$app = JFactory::getApplication();
$assoc = isset($app->item_associations) ? $app->item_associations : 0;
if ($assoc)
{
$config['filter_fields'][] = 'association';
}
}
parent::__construct($config);
}
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @param string $ordering An optional ordering field.
* @param string $direction An optional direction (asc|desc).
*
* @return void
*
* @since 1.6
*/
protected function populateState($ordering = null, $direction = null)
{
$app = JFactory::getApplication();
// Adjust the context to support modal layouts.
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
}
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);
$categoryId = $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id');
$this->setState('filter.category_id', $categoryId);
$language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', '');
$this->setState('filter.language', $language);
// force a language
$forcedLanguage = $app->input->get('forcedLanguage');
if (!empty($forcedLanguage))
{
$this->setState('filter.language', $forcedLanguage);
$this->setState('filter.forcedLanguage', $forcedLanguage);
}
$tag = $this->getUserStateFromRequest($this->context . '.filter.tag', 'filter_tag', '');
$this->setState('filter.tag', $tag);
// List state information.
parent::populateState('a.name', 'asc');
}
/**
* Method to get a store id based on model configuration state.
*
* This is necessary because the model is used by the component and
* different modules that might need different sets of data or different
* ordering requirements.
*
* @param string $id A prefix for the store id.
*
* @return string A store id.
* @since 1.6
*/
protected function getStoreId($id = '')
{
// Compile the store id.
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.access');
$id .= ':' . $this->getState('filter.published');
$id .= ':' . $this->getState('filter.category_id');
$id .= ':' . $this->getState('filter.language');
return parent::getStoreId($id);
}
/**
* Build an SQL query to load the list data.
*
* @return JDatabaseQuery
* @since 1.6
*/
protected function getListQuery()
{
// Create a new query object.
$db = $this->getDbo();
$query = $db->getQuery(true);
$user = JFactory::getUser();
$app = JFactory::getApplication();
// Select the required fields from the table.
$query->select(
$this->getState(
'list.select',
'a.id, a.name, a.alias, a.checked_out, a.checked_out_time, a.catid, a.user_id' .
', a.published, a.access, a.created, a.created_by, a.ordering, a.featured, a.language' .
', a.publish_up, a.publish_down'
)
);
$query->from('#__contact_details AS a');
// Join over the users for the linked user.
$query->select('ul.name AS linked_user')
->join('LEFT', '#__users AS ul ON ul.id=a.user_id');
// Join over the language
$query->select('l.title AS language_title')
->join('LEFT', $db->quoteName('#__languages') . ' AS l ON l.lang_code = a.language');
// Join over the users for the checked out user.
$query->select('uc.name AS editor')
->join('LEFT', '#__users AS uc ON uc.id=a.checked_out');
// Join over the asset groups.
$query->select('ag.title AS access_level')
->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Join over the categories.
$query->select('c.title AS category_title')
->join('LEFT', '#__categories AS c ON c.id = a.catid');
// Join over the associations.
$assoc = isset($app->item_associations) ? $app->item_associations : 0;
if ($assoc)
{
$query->select('COUNT(asso2.id)>1 as association')
->join('LEFT', '#__associations AS asso ON asso.id = a.id AND asso.context=' . $db->quote('com_contact.item'))
->join('LEFT', '#__associations AS asso2 ON asso2.key = asso.key')
->group('a.id');
}
// Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// Implement View Level Access
if (!$user->authorise('core.admin'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
$query->where('a.published = ' . (int) $published);
}
elseif ($published === '')
{
$query->where('(a.published = 0 OR a.published = 1)');
}
// Filter by a single or group of categories.
$categoryId = $this->getState('filter.category_id');
if (is_numeric($categoryId))
{
$query->where('a.catid = ' . (int) $categoryId);
}
elseif (is_array($categoryId))
{
JArrayHelper::toInteger($categoryId);
$categoryId = implode(',', $categoryId);
$query->where('a.catid IN (' . $categoryId . ')');
}
// Filter by search in name.
$search = $this->getState('filter.search');
if (!empty($search))
{
if (stripos($search, 'id:') === 0)
{
$query->where('a.id = ' . (int) substr($search, 3));
}
elseif (stripos($search, 'author:') === 0)
{
$search = $db->quote('%' . $db->escape(substr($search, 7), true) . '%');
$query->where('(uc.name LIKE ' . $search . ' OR uc.username LIKE ' . $search . ')');
}
else
{
$search = $db->quote('%' . $db->escape($search, true) . '%');
$query->where('(a.name LIKE ' . $search . ' OR a.alias LIKE ' . $search . ')');
}
}
// Filter on the language.
if ($language = $this->getState('filter.language'))
{
$query->where('a.language = ' . $db->quote($language));
}
// Filter by a single tag.
$tagId = $this->getState('filter.tag');
if (is_numeric($tagId))
{
$query->where($db->quoteName('tagmap.tag_id') . ' = ' . (int) $tagId)
->join(
'LEFT', $db->quoteName('#__contentitem_tag_map', 'tagmap')
. ' ON ' . $db->quoteName('tagmap.content_item_id') . ' = ' . $db->quoteName('a.id')
. ' AND ' . $db->quoteName('tagmap.type_alias') . ' = ' . $db->quote('com_contact.contact')
);
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.name');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol == 'a.ordering' || $orderCol == 'category_title')
{
$orderCol = 'c.title ' . $orderDirn . ', a.ordering';
}
$query->order($db->escape($orderCol . ' ' . $orderDirn));
//echo nl2br(str_replace('#__','jos_',$query));
return $query;
}
}

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,162 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_contact
*
* @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('JPATH_BASE') or die;
/**
* Supports a modal contact picker.
*
* @package Joomla.Administrator
* @subpackage com_contact
* @since 1.6
*/
class JFormFieldModal_Contact extends JFormField
{
/**
* The form field type.
*
* @var string
* @since 1.6
*/
protected $type = 'Modal_Contact';
/**
* Method to get the field input markup.
*
* @return string The field input markup.
* @since 1.6
*/
protected function getInput()
{
$allowEdit = ((string) $this->element['edit'] == 'true') ? true : false;
$allowClear = ((string) $this->element['clear'] != 'false') ? true : false;
// Load language
JFactory::getLanguage()->load('com_contact', JPATH_ADMINISTRATOR);
// Load the javascript
JHtml::_('behavior.framework');
JHtml::_('behavior.modal', 'a.modal');
JHtml::_('bootstrap.tooltip');
// Build the script.
$script = array();
// Select button script
$script[] = ' function jSelectContact_'.$this->id.'(id, name, object) {';
$script[] = ' document.id("'.$this->id.'_id").value = id;';
$script[] = ' document.id("'.$this->id.'_name").value = name;';
if ($allowEdit)
{
$script[] = ' jQuery("#'.$this->id.'_edit").removeClass("hidden");';
}
if ($allowClear)
{
$script[] = ' jQuery("#'.$this->id.'_clear").removeClass("hidden");';
}
$script[] = ' SqueezeBox.close();';
$script[] = ' }';
// Clear button script
static $scriptClear;
if ($allowClear && !$scriptClear)
{
$scriptClear = true;
$script[] = ' function jClearContact(id) {';
$script[] = ' document.getElementById(id + "_id").value = "";';
$script[] = ' document.getElementById(id + "_name").value = "'.htmlspecialchars(JText::_('COM_CONTACT_SELECT_A_CONTACT', true), ENT_COMPAT, 'UTF-8').'";';
$script[] = ' jQuery("#"+id + "_clear").addClass("hidden");';
$script[] = ' if (document.getElementById(id + "_edit")) {';
$script[] = ' jQuery("#"+id + "_edit").addClass("hidden");';
$script[] = ' }';
$script[] = ' return false;';
$script[] = ' }';
}
// Add the script to the document head.
JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));
// Setup variables for display.
$html = array();
$link = 'index.php?option=com_contact&amp;view=contacts&amp;layout=modal&amp;tmpl=component&amp;function=jSelectContact_'.$this->id;
if (isset($this->element['language']))
{
$link .= '&amp;forcedLanguage='.$this->element['language'];
}
// Get the title of the linked chart
$db = JFactory::getDbo();
$db->setQuery(
'SELECT name' .
' FROM #__contact_details' .
' WHERE id = '.(int) $this->value
);
try
{
$title = $db->loadResult();
}
catch (RuntimeException $e)
{
JError::raiseWarning(500, $e->getMessage);
}
if (empty($title))
{
$title = JText::_('COM_CONTACT_SELECT_A_CONTACT');
}
$title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8');
// The active contact id field.
if (0 == (int) $this->value)
{
$value = '';
}
else
{
$value = (int) $this->value;
}
// The current contact display field.
$html[] = '<span class="input-append">';
$html[] = '<input type="text" class="input-medium" id="'.$this->id.'_name" value="'.$title.'" disabled="disabled" size="35" />';
$html[] = '<a class="modal btn hasTooltip" title="'.JHtml::tooltipText('COM_CONTACT_CHANGE_CONTACT').'" href="'.$link.'&amp;'.JSession::getFormToken().'=1" rel="{handler: \'iframe\', size: {x: 800, y: 450}}"><i class="icon-file"></i> '.JText::_('JSELECT').'</a>';
// Edit article button
if ($allowEdit)
{
$html[] = '<a class="btn hasTooltip'.($value ? '' : ' hidden').'" href="index.php?option=com_contact&layout=modal&tmpl=component&task=contact.edit&id=' . $value. '" target="_blank" title="'.JHtml::tooltipText('COM_CONTACT_EDIT_CONTACT').'" ><span class="icon-edit"></span> ' . JText::_('JACTION_EDIT') . '</a>';
}
// Clear contact button
if ($allowClear)
{
$html[] = '<button id="'.$this->id.'_clear" class="btn'.($value ? '' : ' hidden').'" onclick="return jClearContact(\''.$this->id.'\')"><span class="icon-remove"></span> ' . JText::_('JCLEAR') . '</button>';
}
$html[] = '</span>';
// class='required' for client side validation
$class = '';
if ($this->required)
{
$class = ' class="required modal-value"';
}
$html[] = '<input type="hidden" id="'.$this->id.'_id"'.$class.' name="'.$this->name.'" value="'.$value.'" />';
return implode("\n", $html);
}
}

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,71 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_contact
*
* @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('JPATH_BASE') or die;
/**
* Supports an HTML select list of contacts
*
* @package Joomla.Administrator
* @subpackage com_contact
* @since 1.6
*/
class JFormFieldOrdering extends JFormField
{
/**
* The form field type.
*
* @var string
* @since 1.6
*/
protected $type = 'Ordering';
/**
* Method to get the field input markup.
*
* @return string The field input markup.
* @since 1.6
*/
protected function getInput()
{
$html = array();
$attr = '';
// Initialize some field attributes.
$attr .= $this->element['class'] ? ' class="'.(string) $this->element['class'].'"' : '';
$attr .= ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
$attr .= $this->element['size'] ? ' size="'.(int) $this->element['size'].'"' : '';
// Initialize JavaScript field attributes.
$attr .= $this->element['onchange'] ? ' onchange="'.(string) $this->element['onchange'].'"' : '';
// Get some field values from the form.
$contactId = (int) $this->form->getValue('id');
$categoryId = (int) $this->form->getValue('catid');
// Build the query for the ordering list.
$query = 'SELECT ordering AS value, name AS text' .
' FROM #__contact_details' .
' WHERE catid = ' . (int) $categoryId .
' ORDER BY ordering';
// Create a read-only list (no name) with a hidden input to store the value.
if ((string) $this->element['readonly'] == 'true')
{
$html[] = JHtml::_('list.ordering', '', $query, trim($attr), $this->value, $contactId ? 0 : 1);
$html[] = '<input type="hidden" name="'.$this->name.'" value="'.$this->value.'"/>';
}
// Create a regular list.
else {
$html[] = JHtml::_('list.ordering', $this->name, $query, trim($attr), $this->value, $contactId ? 0 : 1);
}
return implode($html);
}
}

View File

@ -0,0 +1,736 @@
<?xml version="1.0" encoding="utf-8"?>
<form>
<fieldset addfieldpath="/administrator/components/com_categories/models/fields">
<field name="id"
type="text"
label="JGLOBAL_FIELD_ID_LABEL"
description="JGLOBAL_FIELD_ID_DESC"
size="10"
default="0"
readonly="true"
class="readonly"
/>
<field name="name"
type="text"
label="COM_CONTACT_FIELD_NAME_LABEL"
description="COM_CONTACT_FIELD_NAME_DESC"
class="inputbox"
size="30"
required="true"
/>
<field name="alias"
type="text"
label="JFIELD_ALIAS_LABEL"
description="JFIELD_ALIAS_DESC"
class="inputbox"
size="30"
/>
<field name="user_id"
type="user"
label="COM_CONTACT_FIELD_LINKED_USER_LABEL"
description="COM_CONTACT_FIELD_LINKED_USER_DESC"
/>
<field id="published"
name="published"
type="list"
label="JSTATUS"
description="JFIELD_PUBLISHED_DESC"
class="inputbox span12 small"
size="1"
default="1"
>
<option value="1">
JPUBLISHED</option>
<option value="0">
JUNPUBLISHED</option>
<option value="2">
JARCHIVED</option>
<option value="-2">
JTRASHED</option>
</field>
<field name="catid"
type="categoryedit"
extension="com_contact"
label="JCATEGORY"
description="JFIELD_CATEGORY_DESC"
class="inputbox"
required="true"
/>
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC"
class="inputbox span12 small"
size="1"
/>
<field name="sortname1" type="text"
label="COM_CONTACT_FIELD_SORTNAME1_LABEL"
description="COM_CONTACT_FIELD_SORTNAME1_DESC"
class="inputbox"
size="30"
/>
<field name="sortname2" type="text"
label="COM_CONTACT_FIELD_SORTNAME2_LABEL"
description="COM_CONTACT_FIELD_SORTNAME2_DESC"
class="inputbox" size="30" />
<field name="sortname3" type="text"
label="COM_CONTACT_FIELD_SORTNAME3_LABEL"
description="COM_CONTACT_FIELD_SORTNAME3_DESC"
class="inputbox"
size="30"
/>
<field name="con_position" type="text"
label="COM_CONTACT_FIELD_INFORMATION_POSITION_LABEL"
description="COM_CONTACT_FIELD_INFORMATION_POSITION_DESC"
class="inputbox"
size="30"
/>
<field name="email_to" type="email"
label="JGLOBAL_EMAIL"
description="COM_CONTACT_FIELD_INFORMATION_EMAIL_DESC"
class="inputbox"
size="30"
/>
<field name="address" type="textarea"
label="COM_CONTACT_FIELD_INFORMATION_ADDRESS_LABEL"
description="COM_CONTACT_FIELD_INFORMATION_ADDRESS_DESC"
class="inputbox"
rows="3"
cols="30"
/>
<field name="suburb" type="text"
label="COM_CONTACT_FIELD_INFORMATION_SUBURB_LABEL"
description="COM_CONTACT_FIELD_INFORMATION_SUBURB_DESC"
class="inputbox"
size="30"
/>
<field name="state" type="text"
label="COM_CONTACT_FIELD_INFORMATION_STATE_LABEL"
description="COM_CONTACT_FIELD_INFORMATION_STATE_DESC"
class="inputbox"
size="30"
/>
<field name="postcode" type="text"
label="COM_CONTACT_FIELD_INFORMATION_POSTCODE_LABEL"
description="COM_CONTACT_FIELD_INFORMATION_POSTCODE_DESC"
class="inputbox"
size="30"
/>
<field name="country" type="text"
label="COM_CONTACT_FIELD_INFORMATION_COUNTRY_LABEL"
description="COM_CONTACT_FIELD_INFORMATION_COUNTRY_DESC"
class="inputbox"
size="30"
/>
<field name="telephone" type="text"
label="COM_CONTACT_FIELD_INFORMATION_TELEPHONE_LABEL"
description="COM_CONTACT_FIELD_INFORMATION_TELEPHONE_DESC"
class="inputbox"
size="30"
/>
<field name="mobile" type="text"
label="COM_CONTACT_FIELD_INFORMATION_MOBILE_LABEL"
description="COM_CONTACT_FIELD_INFORMATION_MOBILE_DESC"
class="inputbox"
size="30"
/>
<field name="fax" type="text"
label="COM_CONTACT_FIELD_INFORMATION_FAX_LABEL"
description="COM_CONTACT_FIELD_INFORMATION_FAX_DESC"
class="inputbox"
size="30"
/>
<field name="webpage"
type="url"
filter="url"
label="COM_CONTACT_FIELD_INFORMATION_WEBPAGE_LABEL"
description="COM_CONTACT_FIELD_INFORMATION_WEBPAGE_DESC"
class="inputbox"
size="30"
/>
<field name="misc" type="editor"
label="COM_CONTACT_FIELD_INFORMATION_MISC_LABEL"
description="COM_CONTACT_FIELD_INFORMATION_MISC_DESC"
class="inputbox"
filter="JComponentHelper::filterText"
buttons="true"
hide="readmore,pagebreak"
/>
<field name="image"
type="media"
hide_none="1"
label="COM_CONTACT_FIELD_PARAMS_IMAGE_LABEL"
description="COM_CONTACT_FIELD_PARAMS_IMAGE_DESC"
/>
<field name="created_by" type="user"
label="JGLOBAL_FIELD_CREATED_BY_LABEL" description="COM_CONTACT_FIELD_CREATED_BY_DESC" />
<field name="created_by_alias" type="text"
label="COM_CONTACT_FIELD_CREATED_BY_ALIAS_LABEL" description="COM_CONTACT_FIELD_CREATED_BY_ALIAS_DESC"
class="inputbox" size="20" />
<field name="created" type="calendar" label="COM_CONTACT_FIELD_CREATED_LABEL"
description="COM_CONTACT_FIELD_CREATED_DESC" class="inputbox" size="22"
format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<field name="modified" type="calendar" class="readonly"
label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTACT_FIELD_MODIFIED_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<field name="modified_by" type="user"
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
class="readonly"
readonly="true"
filter="unset"/>
<field name="checked_out"
type="hidden"
filter="unset"
/>
<field name="checked_out_time"
type="hidden"
filter="unset"
/>
<field name="ordering"
type="ordering"
class="inputbox"
label="JFIELD_ORDERING_LABEL"
description="JFIELD_ORDERING_DESC"
/>
<field name="publish_up" type="calendar"
label="COM_CONTACT_FIELD_PUBLISH_UP_LABEL" description="COM_CONTACT_FIELD_PUBLISH_UP_DESC"
class="inputbox" format="%Y-%m-%d %H:%M:%S" size="22"
filter="user_utc"
/>
<field name="publish_down" type="calendar"
label="COM_CONTACT_FIELD_PUBLISH_DOWN_LABEL" description="COM_CONTACT_FIELD_PUBLISH_DOWN_DESC"
class="inputbox" format="%Y-%m-%d %H:%M:%S" size="22"
filter="user_utc"
/>
<field name="metakey"
type="textarea"
label="JFIELD_META_KEYWORDS_LABEL"
description="JFIELD_META_KEYWORDS_DESC"
class="inputbox"
rows="3"
cols="30"
/>
<field name="metadesc"
type="textarea"
label="JFIELD_META_DESCRIPTION_LABEL"
description="JFIELD_META_DESCRIPTION_DESC"
class="inputbox"
rows="3"
cols="30"
/>
<field name="language" type="contentlanguage" label="JFIELD_LANGUAGE_LABEL"
description="COM_CONTACT_FIELD_LANGUAGE_DESC" class="inputbox span12 small"
>
<option value="*">JALL</option>
</field>
<field name="featured"
type="list"
label="JFEATURED"
description="COM_CONTACT_FIELD_FEATURED_DESC"
default="0"
class="span12 small"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field name="tags"
type="tag"
label="JTAG"
description="JTAG_DESC"
class="inputbox span12 small"
multiple="true"
>
</field>
<field name="contact_icons"
type="list"
default="0"
label="COM_CONTACT_FIELD_ICONS_SETTINGS"
description="COM_CONTACT_FIELD_ICONS_SETTINGS_DESC"
>
<option value="0">COM_CONTACT_FIELD_VALUE_NONE
</option>
<option value="1">COM_CONTACT_FIELD_VALUE_TEXT
</option>
<option value="2">COM_CONTACT_FIELD_VALUE_ICONS
</option>
</field>
<field name="icon_address"
type="media"
hide_none="1"
label="COM_CONTACT_FIELD_ICONS_ADDRESS_LABEL"
description="COM_CONTACT_FIELD_ICONS_ADDRESS_DESC"
/>
<field name="icon_email"
type="media"
hide_none="1" label="COM_CONTACT_FIELD_ICONS_EMAIL_LABEL"
description="COM_CONTACT_FIELD_ICONS_EMAIL_DESC"
/>
<field name="icon_telephone"
type="media" hide_none="1"
label="COM_CONTACT_FIELD_ICONS_TELEPHONE_LABEL"
description="COM_CONTACT_FIELD_ICONS_TELEPHONE_DESC" />
<field name="icon_mobile"
type="media"
hide_none="1"
label="COM_CONTACT_FIELD_ICONS_MOBILE_LABEL"
description="COM_CONTACT_FIELD_ICONS_MOBILE_DESC"
/>
<field name="icon_fax"
type="media"
hide_none="1" label="COM_CONTACT_FIELD_ICONS_FAX_LABEL"
description="COM_CONTACT_FIELD_ICONS_FAX_DESC"
/>
<field name="icon_misc"
type="media"
hide_none="1" label="COM_CONTACT_FIELD_ICONS_MISC_LABEL"
description="COM_CONTACT_FIELD_ICONS_MISC_DESC"
/>
</fieldset>
<fields name="params">
<fieldset name="jbasic"
label="JGLOBAL_FIELDSET_DISPLAY_OPTIONS"
>
<field name="show_contact_category"
type="list"
label="JGLOBAL_SHOW_CATEGORY_LABEL"
description="COM_CONTACT_FIELD_SHOW_CATEGORY_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="hide">JHIDE</option>
<option value="show_no_link">COM_CONTACT_FIELD_VALUE_NO_LINK
</option>
<option value="show_with_link">COM_CONTACT_FIELD_VALUE_WITH_LINK
</option>
</field>
<field name="show_contact_list"
type="radio"
class="btn-group"
label="COM_CONTACT_FIELD_CONTACT_SHOW_LIST_LABEL"
description="COM_CONTACT_FIELD_CONTACT_SHOW_LIST_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="presentation_style" type="list"
description="COM_CONTACT_FIELD_PRESENTATION_DESC"
label="COM_CONTACT_FIELD_PRESENTATION_LABEL"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="sliders">COM_CONTACT_FIELD_VALUE_SLIDERS</option>
<option value="tabs">COM_CONTACT_FIELD_VALUE_TABS</option>
<option value="plain">COM_CONTACT_FIELD_VALUE_PLAIN</option>
</field>
<field name="show_tags" type="list"
label="COM_CONTACT_FIELD_SHOW_TAGS_LABEL"
description="COM_CONTACT_FIELD_SHOW_TAGS_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_name"
type="list"
label="COM_CONTACT_FIELD_PARAMS_NAME_LABEL" description="COM_CONTACT_FIELD_PARAMS_NAME_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_position" type="list"
label="COM_CONTACT_FIELD_PARAMS_CONTACT_POSITION_LABEL"
description="COM_CONTACT_FIELD_PARAMS_CONTACT_POSITION_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_email" type="list"
label="JGLOBAL_EMAIL"
description="COM_CONTACT_FIELD_PARAMS_CONTACT_E_MAIL_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_street_address" type="list"
label="COM_CONTACT_FIELD_PARAMS_STREET_ADDRESS_LABEL"
description="COM_CONTACT_FIELD_PARAMS_STREET_ADDRESS_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_suburb" type="list"
label="COM_CONTACT_FIELD_PARAMS_TOWN-SUBURB_LABEL"
description="COM_CONTACT_FIELD_PARAMS_TOWN-SUBURB_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_state" type="list"
label="COM_CONTACT_FIELD_PARAMS_STATE-COUNTY_LABEL"
description="COM_CONTACT_FIELD_PARAMS_STATE-COUNTY_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_postcode" type="list"
label="COM_CONTACT_FIELD_PARAMS_POST-ZIP_CODE_LABEL"
description="COM_CONTACT_FIELD_PARAMS_POST-ZIP_CODE_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_country"
type="list"
label="COM_CONTACT_FIELD_PARAMS_COUNTRY_LABEL"
description="COM_CONTACT_FIELD_PARAMS_COUNTRY_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_telephone"
type="list"
label="COM_CONTACT_FIELD_PARAMS_TELEPHONE_LABEL"
description="COM_CONTACT_FIELD_PARAMS_TELEPHONE_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_mobile"
type="list"
label="COM_CONTACT_FIELD_PARAMS_MOBILE_LABEL"
description="COM_CONTACT_FIELD_PARAMS_MOBILE_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_fax" type="list"
label="COM_CONTACT_FIELD_PARAMS_FAX_LABEL"
description="COM_CONTACT_FIELD_PARAMS_FAX_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_webpage" type="list"
label="COM_CONTACT_FIELD_PARAMS_WEBPAGE_LABEL"
description="COM_CONTACT_FIELD_PARAMS_WEBPAGE_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_misc" type="list"
label="COM_CONTACT_FIELD_PARAMS_MISC_INFO_LABEL"
description="COM_CONTACT_FIELD_PARAMS_MISC_INFO_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_image" type="list"
label="COM_CONTACT_FIELD_PARAMS_SHOW_IMAGE_LABEL"
description="COM_CONTACT_FIELD_PARAMS_SHOW_IMAGE_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="allow_vcard" type="list"
label="COM_CONTACT_FIELD_PARAMS_VCARD_LABEL"
description="COM_CONTACT_FIELD_PARAMS_VCARD_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_articles" label="COM_CONTACT_FIELD_ARTICLES_SHOW_LABEL"
description="COM_CONTACT_FIELD_ARTICLES_SHOW_DESC" type="list"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_profile" type="list"
label="COM_CONTACT_FIELD_PROFILE_SHOW_LABEL"
description="COM_CONTACT_FIELD_PROFILE_SHOW_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_links"
label="COM_CONTACT_FIELD_SHOW_LINKS_LABEL"
description="COM_CONTACT_FIELD_SHOW_LINKS_DESC"
type="list"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="linka_name" type="text"
label="COM_CONTACT_FIELD_LINKA_NAME_LABEL"
description="COM_CONTACT_FIELD_LINK_NAME_DESC"
class="inputbox"
size="30"
/>
<field name="linka" type="url" filter="url"
label="COM_CONTACT_FIELD_LINKA_LABEL"
description="COM_CONTACT_FIELD_LINKA_DESC"
class="inputbox"
size="30"
/>
<field name="linkb_name" type="text"
label="COM_CONTACT_FIELD_LINKB_NAME_LABEL"
description="COM_CONTACT_FIELD_LINK_NAME_DESC"
class="inputbox"
size="30"
/>
<field name="linkb" type="url" filter="url"
label="COM_CONTACT_FIELD_LINKB_LABEL"
description="COM_CONTACT_FIELD_LINKB_DESC"
class="inputbox"
size="30"
/>
<field name="linkc_name"
type="text"
label="COM_CONTACT_FIELD_LINKC_NAME_LABEL"
description="COM_CONTACT_FIELD_LINK_NAME_DESC"
class="inputbox"
size="30"
/>
<field name="linkc"
type="url" filter="url"
label="COM_CONTACT_FIELD_LINKC_LABEL"
description="COM_CONTACT_FIELD_LINKC_DESC"
class="inputbox"
size="30"
/>
<field name="linkd_name"
type="text"
label="COM_CONTACT_FIELD_LINKD_NAME_LABEL"
description="COM_CONTACT_FIELD_LINK_NAME_DESC"
class="inputbox"
size="30"
/>
<field name="linkd"
type="url" filter="url"
label="COM_CONTACT_FIELD_LINKD_LABEL"
description="COM_CONTACT_FIELD_LINKD_DESC"
class="inputbox"
size="30"
/>
<field name="linke_name"
type="text"
label="COM_CONTACT_FIELD_LINKE_NAME_LABEL"
description="COM_CONTACT_FIELD_LINK_NAME_DESC"
class="inputbox"
size="30"
/>
<field name="linke"
type="text"
label="COM_CONTACT_FIELD_LINKE_LABEL"
description="COM_CONTACT_FIELD_LINKE_DESC"
class="inputbox"
size="30"
/>
<field
name="contact_layout"
type="componentlayout"
label="JFIELD_ALT_LAYOUT_LABEL"
description="JFIELD_ALT_COMPONENT_LAYOUT_DESC"
extension="com_contact"
view="contact"
useglobal="true"
/>
</fieldset>
<fieldset name="email"
label="COM_CONTACT_FIELDSET_CONTACT_FORM"
>
<field name="show_email_form" type="list"
label="COM_CONTACT_FIELD_EMAIL_SHOW_FORM_LABEL"
description="COM_CONTACT_FIELD_EMAIL_SHOW_FORM_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_email_copy" type="list"
label="COM_CONTACT_FIELD_EMAIL_EMAIL_COPY_LABEL"
description="COM_CONTACT_FIELD_EMAIL_EMAIL_COPY_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="banned_email" type="textarea"
label="COM_CONTACT_FIELD_EMAIL_BANNED_EMAIL_LABEL" rows="3"
cols="30" description="COM_CONTACT_FIELD_EMAIL_BANNED_EMAIL_DESC" />
<field name="banned_subject" type="textarea"
label="COM_CONTACT_FIELD_EMAIL_BANNED_SUBJECT_LABEL"
rows="3" cols="30"
description="COM_CONTACT_FIELD_EMAIL_BANNED_SUBJECT_DESC" />
<field name="banned_text" type="textarea"
label="COM_CONTACT_FIELD_EMAIL_BANNED_TEXT_LABEL" rows="3"
cols="30" description="COM_CONTACT_FIELD_EMAIL_BANNED_TEXT_DESC" />
<field name="validate_session" type="list"
label="COM_CONTACT_FIELD_CONFIG_SESSION_CHECK_LABEL"
description="COM_CONTACT_FIELD_CONFIG_SESSION_CHECK_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field name="custom_reply" type="list"
label="COM_CONTACT_FIELD_CONFIG_CUSTOM_REPLY_LABEL"
description="COM_CONTACT_FIELD_CONFIG_CUSTOM_REPLY_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field name="redirect"
type="text"
size="30"
label="COM_CONTACT_FIELD_CONFIG_REDIRECT_LABEL"
description="COM_CONTACT_FIELD_CONFIG_REDIRECT_DESC" />
</fieldset>
</fields>
<fields name="metadata">
<fieldset name="jmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<field name="robots"
type="list"
label="JFIELD_METADATA_ROBOTS_LABEL"
description="JFIELD_METADATA_ROBOTS_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="index, follow">JGLOBAL_INDEX_FOLLOW</option>
<option value="noindex, follow">JGLOBAL_NOINDEX_FOLLOW</option>
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
</field>
<field name="rights" type="text"
label="JFIELD_METADATA_RIGHTS_LABEL"
description="JFIELD_METADATA_RIGHTS_DESC"
size="20" />
</fieldset>
</fields>
<field name="hits"
type="text"
class="readonly"
size="6" label="JGLOBAL_HITS"
description="COM_CONTACT_HITS_DESC"
readonly="true"
filter="unset" />
<field name="version" type="text" class="readonly"
label="COM_CONTACT_FIELD_VERSION_LABEL" size="6" description="COM_CONTACT_FIELD_VERSION_DESC"
readonly="true" filter="unset" />
</form>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>