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,19 @@
<?xml version="1.0" encoding="utf-8"?>
<access component="com_contact">
<section name="component">
<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC" />
<action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC" />
<action name="core.create" title="JACTION_CREATE" description="JACTION_CREATE_COMPONENT_DESC" />
<action name="core.delete" title="JACTION_DELETE" description="JACTION_DELETE_COMPONENT_DESC" />
<action name="core.edit" title="JACTION_EDIT" description="JACTION_EDIT_COMPONENT_DESC" />
<action name="core.edit.state" title="JACTION_EDITSTATE" description="JACTION_EDITSTATE_COMPONENT_DESC" />
<action name="core.edit.own" title="JACTION_EDITOWN" description="JACTION_EDITOWN_COMPONENT_DESC" />
</section>
<section name="category">
<action name="core.create" title="JACTION_CREATE" description="COM_CATEGORIES_ACCESS_CREATE_DESC" />
<action name="core.delete" title="JACTION_DELETE" description="COM_CATEGORIES_ACCESS_DELETE_DESC" />
<action name="core.edit" title="JACTION_EDIT" description="COM_CATEGORIES_ACCESS_EDIT_DESC" />
<action name="core.edit.state" title="JACTION_EDITSTATE" description="COM_CATEGORIES_ACCESS_EDITSTATE_DESC" />
<action name="core.edit.own" title="JACTION_EDITOWN" description="COM_CATEGORIES_ACCESS_EDITOWN_DESC" />
</section>
</access>

View File

@ -0,0 +1,807 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<fieldset name="contact"
label="COM_CONTACT_FIELD_CONFIG_INDIVIDUAL_CONTACT_DISPLAY"
description="COM_CONTACT_FIELD_CONFIG_INDIVIDUAL_CONTACT_DESC"
>
<field
name="contact_layout" type="componentlayout"
label="JGLOBAL_FIELD_LAYOUT_LABEL"
description="JGLOBAL_FIELD_LAYOUT_DESC"
menuitems="true"
extension="com_contact"
view="contact"
/>
<field name="show_contact_category"
type="list"
default="hide"
label="COM_CONTACT_FIELD_CONTACT_SHOW_CATEGORY_LABEL"
description="COM_CONTACT_FIELD_CONTACT_SHOW_CATEGORY_DESC"
>
<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"
default="0"
description="COM_CONTACT_FIELD_CONTACT_SHOW_LIST_DESC"
label="COM_CONTACT_FIELD_CONTACT_SHOW_LIST_LABEL"
>
<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="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_name"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_PARAMS_NAME_LABEL"
description="COM_CONTACT_FIELD_PARAMS_NAME_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_position"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_PARAMS_CONTACT_POSITION_LABEL"
description="COM_CONTACT_FIELD_PARAMS_CONTACT_POSITION_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_email"
type="radio"
class="btn-group"
default="0"
label="JGLOBAL_EMAIL"
description="COM_CONTACT_FIELD_PARAMS_CONTACT_E_MAIL_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_street_address"
type="radio"
class="btn-group"
default="1" label="COM_CONTACT_FIELD_PARAMS_STREET_ADDRESS_LABEL"
description="COM_CONTACT_FIELD_PARAMS_STREET_ADDRESS_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_suburb"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_PARAMS_TOWN-SUBURB_LABEL"
description="COM_CONTACT_FIELD_PARAMS_TOWN-SUBURB_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_state"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_PARAMS_STATE-COUNTY_LABEL"
description="COM_CONTACT_FIELD_PARAMS_STATE-COUNTY_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_postcode"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_PARAMS_POST-ZIP_CODE_LABEL"
description="COM_CONTACT_FIELD_PARAMS_POST-ZIP_CODE_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_country"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_PARAMS_COUNTRY_LABEL"
description="COM_CONTACT_FIELD_PARAMS_COUNTRY_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_telephone"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_PARAMS_TELEPHONE_LABEL"
description="COM_CONTACT_FIELD_PARAMS_TELEPHONE_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_mobile"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_PARAMS_MOBILE_LABEL"
description="COM_CONTACT_FIELD_PARAMS_MOBILE_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_fax"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_PARAMS_FAX_LABEL"
description="COM_CONTACT_FIELD_PARAMS_FAX_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_webpage"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_PARAMS_WEBPAGE_LABEL"
description="COM_CONTACT_FIELD_PARAMS_WEBPAGE_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_misc"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_PARAMS_MISC_INFO_LABEL"
description="COM_CONTACT_FIELD_PARAMS_MISC_INFO_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_image"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_PARAMS_SHOW_IMAGE_LABEL" description="COM_CONTACT_FIELD_PARAMS_SHOW_IMAGE_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="image"
type="media"
label="COM_CONTACT_FIELD_PARAMS_IMAGE_LABEL"
description="COM_CONTACT_FIELD_PARAMS_IMAGE_DESC"
>
</field>
<field name="allow_vcard"
type="radio"
class="btn-group"
default="0"
label="COM_CONTACT_FIELD_PARAMS_VCARD_LABEL"
description="COM_CONTACT_FIELD_PARAMS_VCARD_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_articles"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_ARTICLES_SHOW_LABEL"
description="COM_CONTACT_FIELD_ARTICLES_SHOW_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_profile"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_PROFILE_SHOW_LABEL" description="COM_CONTACT_FIELD_PROFILE_SHOW_DESC"
>
<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_LABEL"
type="radio"
class="btn-group"
default="1"
>
<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="linkb_name"
type="text"
label="COM_CONTACT_FIELD_LINKB_NAME_LABEL"
description="COM_CONTACT_FIELD_LINK_NAME_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="linkd_name"
type="text"
label="COM_CONTACT_FIELD_LINKD_NAME_LABEL"
description="COM_CONTACT_FIELD_LINK_NAME_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
id="show_tags"
name="show_tags"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_SHOW_TAGS_LABEL"
description="COM_CONTACT_FIELD_SHOW_TAGS_DESC">
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="Icons"
label="COM_CONTACT_ICONS_SETTINGS"
description="COM_CONTACT_FIELD_CONFIG_INDIVIDUAL_CONTACT_DESC"
>
<field name="contact_icons"
type="list"
default="0"
label="COM_CONTACT_FIELD_ICONS_SETTINGS_LABEL"
description="COM_CONTACT_FIELD_ICONS_SETTINGS_DESC"
>
<option value="0">COM_CONTACT_FIELD_VALUE_ICONS
</option>
<option value="1">COM_CONTACT_FIELD_VALUE_TEXT
</option>
<option value="2">COM_CONTACT_FIELD_VALUE_NONE
</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>
<fieldset name="Category"
label="JCATEGORY"
description="COM_CONTACT_FIELD_CONFIG_CATEGORY_DESC"
>
<field
name="category_layout" type="componentlayout"
label="JGLOBAL_FIELD_LAYOUT_LABEL"
description="JGLOBAL_FIELD_LAYOUT_DESC"
menuitems="true"
extension="com_contact"
view="category"
/>
<field name="show_category_title" type="radio"
default="1"
class="btn-group"
label="JGLOBAL_SHOW_CATEGORY_TITLE"
description="JGLOBAL_SHOW_CATEGORY_TITLE_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_description" type="radio"
default="1"
class="btn-group"
description="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC"
label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_description_image" type="radio"
default="0"
class="btn-group"
description="JGLOBAL_SHOW_CATEGORY_IMAGE_DESC"
label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="maxLevel" type="list"
default="-1"
description="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC"
label="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_LABEL"
>
<option value="-1">JALL</option>
<option value="0">JNONE</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field name="show_empty_categories" type="radio"
default="0"
class="btn-group"
label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
description="COM_CONTACT_SHOW_EMPTY_CATEGORIES_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_subcat_desc" type="radio"
default="1"
class="btn-group"
label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_cat_items" type="radio"
default="1"
class="btn-group"
label="COM_CONTACT_FIELD_SHOW_CAT_ITEMS_LABEL"
description="COM_CONTACT_FIELD_SHOW_CAT_ITEMS_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_cat_tags" type="radio"
label="COM_CONTACT_FIELD_SHOW_CAT_TAGS_LABEL"
description="COM_CONTACT_FIELD_SHOW_CAT_TAGS_DESC"
class="btn-group"
default="1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="categories"
label="JCATEGORIES"
description="COM_CONTACT_FIELD_CONFIG_CATEGORIES_DESC"
>
<field name="show_base_description" type="radio"
default="1"
class="btn-group"
label="JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_LABEL"
description="JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="maxLevelcat" type="list"
default="-1"
description="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC"
label="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_LABEL"
>
<option value="-1">JALL</option>
<option value="1">J1</option>
<option value="2">J2</option>
<option value="3">J3</option>
<option value="4">J4</option>
<option value="5">J5</option>
</field>
<field name="show_empty_categories_cat" type="radio"
default="0"
class="btn-group"
label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
description="COM_CONTACT_SHOW_EMPTY_CATEGORIES_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_subcat_desc_cat" type="radio"
default="1"
class="btn-group"
label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_cat_items_cat" type="radio"
default="1"
class="btn-group"
label="COM_CONTACT_FIELD_SHOW_CAT_ITEMS_LABEL"
description="COM_CONTACT_FIELD_SHOW_CAT_ITEMS_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="contacts"
label="JGLOBAL_LIST_LAYOUT_OPTIONS"
description="COM_CONTACT_FIELD_CONFIG_TABLE_OF_CONTACTS_DESC"
>
<field
name="filter_field"
type="list"
default="1"
description="JGLOBAL_FILTER_FIELD_DESC"
label="JGLOBAL_FILTER_FIELD_LABEL"
>
<option value="hide">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_pagination_limit" type="radio"
default="1"
class="btn-group"
description="JGLOBAL_DISPLAY_SELECT_DESC"
label="JGLOBAL_DISPLAY_SELECT_LABEL"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_headings" type="radio"
default="1"
class="btn-group"
description="JGLOBAL_SHOW_HEADINGS_DESC"
label="JGLOBAL_SHOW_HEADINGS_LABEL"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_position_headings" type="radio"
default="1"
class="btn-group"
label="COM_CONTACT_FIELD_CONFIG_POSITION_LABEL"
description="COM_CONTACT_FIELD_CONFIG_POSITION_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_email_headings" type="radio"
default="0"
class="btn-group"
label="JGLOBAL_EMAIL"
description="COM_CONTACT_FIELD_CONFIG_EMAIL_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_telephone_headings"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_CONFIG_PHONE_LABEL"
description="COM_CONTACT_FIELD_CONFIG_PHONE_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_mobile_headings"
type="radio"
class="btn-group"
default="0"
label="COM_CONTACT_FIELD_CONFIG_MOBILE_LABEL"
description="COM_CONTACT_FIELD_CONFIG_MOBILE_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_fax_headings"
type="radio"
class="btn-group"
default="0"
label="COM_CONTACT_FIELD_CONFIG_FAX_LABEL"
description="COM_CONTACT_FIELD_CONFIG_FAX_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_suburb_headings" type="radio"
default="0"
class="btn-group"
label="COM_CONTACT_FIELD_CONFIG_SUBURB_LABEL"
description="COM_CONTACT_FIELD_CONFIG_SUBURB_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_state_headings"
type="radio"
class="btn-group"
default="0"
label="COM_CONTACT_FIELD_CONFIG_STATE_LABEL"
description="COM_CONTACT_FIELD_CONFIG_STATE_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_country_headings"
type="radio"
class="btn-group"
default="0"
label="COM_CONTACT_FIELD_CONFIG_COUNTRY_LABEL"
description="COM_CONTACT_FIELD_CONFIG_COUNTRY_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_pagination" type="list"
default="2"
description="JGLOBAL_PAGINATION_DESC"
label="JGLOBAL_PAGINATION_LABEL"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
<option value="2">JGLOBAL_AUTO</option>
</field>
<field
name="show_pagination_results"
type="radio"
class="btn-group"
default="1"
label="JGLOBAL_PAGINATION_RESULTS_LABEL"
description="JGLOBAL_PAGINATION_RESULTS_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="initial_sort" type="list"
description="COM_CONTACT_FIELD_INITIAL_SORT_DESC"
label="COM_CONTACT_FIELD_INITIAL_SORT_LABEL"
validate="options"
default="ordering"
>
<option value="name">COM_CONTACT_FIELD_VALUE_NAME</option>
<option value="sortname">COM_CONTACT_FIELD_VALUE_SORT_NAME</option>
<option value="ordering">COM_CONTACT_FIELD_VALUE_ORDERING</option>
</field>
</fieldset>
<fieldset name="Contact_Form"
label="COM_CONTACT_FIELD_CONFIG_CONTACT_FORM"
description="COM_CONTACT_FIELD_CONFIG_INDIVIDUAL_CONTACT_DESC"
>
<field
name="captcha"
type="plugins"
folder="captcha"
default=""
label="COM_CONTACT_FIELD_CAPTCHA_LABEL"
description="COM_CONTACT_FIELD_CAPTCHA_DESC"
filter="cmd" >
<option
value="">JOPTION_USE_DEFAULT</option>
<option
value="0">JOPTION_DO_NOT_USE</option>
</field>
<field name="show_email_form"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_EMAIL_SHOW_FORM_LABEL"
description="COM_CONTACT_FIELD_EMAIL_SHOW_FORM_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_email_copy"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_EMAIL_EMAIL_COPY_LABEL"
description="COM_CONTACT_FIELD_EMAIL_EMAIL_COPY_DESC"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="banned_email"
type="textarea"
label="COM_CONTACT_FIELD_CONFIG_BANNED_EMAIL_LABEL"
rows="3"
cols="30"
description="COM_CONTACT_FIELD_CONFIG_BANNED_EMAIL_DESC"
/>
<field name="banned_subject"
type="textarea"
label="COM_CONTACT_FIELD_CONFIG_BANNED_SUBJECT_LABEL"
rows="3"
cols="30"
description="COM_CONTACT_FIELD_CONFIG_BANNED_SUBJECT_DESC"
/>
<field name="banned_text"
type="textarea"
label="COM_CONTACT_FIELD_CONFIG_BANNED_TEXT_LABEL"
rows="3"
cols="30"
description="COM_CONTACT_FIELD_CONFIG_BANNED_TEXT_DESC"
/>
<field name="validate_session"
type="radio"
class="btn-group"
default="1"
label="COM_CONTACT_FIELD_CONFIG_SESSION_CHECK_LABEL"
description="COM_CONTACT_FIELD_CONFIG_SESSION_CHECK_DESC"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field name="custom_reply"
type="radio"
class="btn-group"
default="0"
label="COM_CONTACT_FIELD_CONFIG_CUSTOM_REPLY_LABEL"
description="COM_CONTACT_FIELD_CONFIG_CUSTOM_REPLY_DESC"
>
<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>
<fieldset name="integration"
label="JGLOBAL_INTEGRATION_LABEL"
description="COM_CONTACT_CONFIG_INTEGRATION_SETTINGS_DESC"
>
<field
name="show_feed_link"
type="radio"
class="btn-group"
default="1"
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
description="JGLOBAL_SHOW_FEED_LINK_DESC">
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset name="permissions"
label="JCONFIG_PERMISSIONS_LABEL"
description="JCONFIG_PERMISSIONS_DESC"
>
<field name="rules"
type="rules"
label="JCONFIG_PERMISSIONS_LABEL"
validate="rules"
filter="rules"
component="com_contact"
section="component" />
</fieldset>
</config>

View File

@ -0,0 +1,19 @@
<?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;
if (!JFactory::getUser()->authorise('core.manage', 'com_contact'))
{
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
$controller = JControllerLegacy::getInstance('contact');
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.1" method="upgrade">
<name>com_contact</name>
<author>Joomla! Project</author>
<creationDate>April 2006</creationDate>
<copyright>(C) 2005 - 2013 Open Source Matters. All rights reserved.
</copyright>
<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>3.0.0</version>
<description>COM_CONTACT_XML_DESCRIPTION</description>
<install> <!-- Runs on install -->
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
</sql>
</install>
<uninstall> <!-- Runs on uninstall -->
<sql>
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file>
</sql>
</uninstall>
<files folder="site">
<filename>contact.php</filename>
<filename>controller.php</filename>
<filename>index.html</filename>
<filename>metadata.xml</filename>
<filename>router.php</filename>
<folder>helpers</folder>
<folder>models</folder>
<folder>views</folder>
</files>
<languages folder="site">
<language tag="en-GB">language/en-GB.com_contact.ini</language>
</languages>
<administration>
<menu img="class:contact">com_contact</menu>
<submenu>
<!--
Note that all & must be escaped to &amp; for the file to be valid
XML and be parsed by the installer
-->
<menu link="option=com_contact" img="class:contact"
alt="Contact/Contacts">com_contact_contacts</menu>
<menu link="option=com_categories&amp;extension=com_contact"
view="categories" img="class:contact-cat" alt="Contacts/Categories">com_contact_categories</menu>
</submenu>
<files folder="admin">
<filename>access.xml</filename>
<filename>config.xml</filename>
<filename>contact.php</filename>
<filename>controller.php</filename>
<filename>index.html</filename>
<folder>controllers</folder>
<folder>elements</folder>
<folder>helpers</folder>
<folder>models</folder>
<folder>tables</folder>
<folder>views</folder>
</files>
<languages folder="admin">
<language tag="en-GB">language/en-GB.com_contact.ini</language>
<language tag="en-GB">language/en-GB.com_contact.sys.ini</language>
</languages>
</administration>
</extension>

View File

@ -0,0 +1,58 @@
<?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;
/**
* Component Controller
*
* @package Joomla.Administrator
* @subpackage com_contact
*/
class ContactController extends JControllerLegacy
{
/**
* @var string The default view.
* @since 1.6
*/
protected $default_view = 'contacts';
/**
* Method to display a view.
*
* @param boolean If true, the view output will be cached
* @param array An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
*
* @return JController This object to support chaining.
* @since 1.5
*/
public function display($cachable = false, $urlparams = false)
{
require_once JPATH_COMPONENT.'/helpers/contact.php';
$view = $this->input->get('view', 'contacts');
$layout = $this->input->get('layout', 'default');
$id = $this->input->getInt('id');
// Check for edit form.
if ($view == 'contact' && $layout == 'edit' && !$this->checkEditId('com_contact.edit.contact', $id)) {
// Somehow the person just went to the form - we don't allow that.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
$this->setMessage($this->getError(), 'error');
$this->setRedirect(JRoute::_('index.php?option=com_contact&view=contacts', false));
return false;
}
parent::display();
return $this;
}
}

View File

@ -0,0 +1,119 @@
<?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;
/**
* Controller for a single contact
*
* @package Joomla.Administrator
* @subpackage com_contact
* @since 1.6
*/
class ContactControllerContact extends JControllerForm
{
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
$user = JFactory::getUser();
$categoryId = JArrayHelper::getValue($data, 'catid', $this->input->getInt('filter_category_id'), 'int');
$allow = null;
if ($categoryId)
{
// If the category has been passed in the URL check it.
$allow = $user->authorise('core.create', $this->option . '.category.' . $categoryId);
}
if ($allow === null)
{
// In the absense of better information, revert to the component permissions.
return parent::allowAdd($data);
}
else
{
return $allow;
}
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
$categoryId = 0;
if ($recordId)
{
$categoryId = (int) $this->getModel()->getItem($recordId)->catid;
}
if ($categoryId)
{
// The category has been set. Check the category permissions.
return JFactory::getUser()->authorise('core.edit', $this->option . '.category.' . $categoryId);
}
else
{
// Since there is no asset tracking, revert to the component permissions.
return parent::allowEdit($data, $key);
}
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Contact', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_contact&view=contacts' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Function that allows child controller access to model data after the data has been saved.
*
* @param JModelLegacy $model The data model object.
* @param array $validData The validated data.
*
* @return void
* @since 3.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
}
}

View File

@ -0,0 +1,116 @@
<?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;
/**
* Articles list controller class.
*
* @package Joomla.Administrator
* @subpackage com_contact
* @since 1.6
*/
class ContactControllerContacts extends JControllerAdmin
{
/**
* Constructor.
*
* @param array $config An optional associative array of configuration settings.
*
* @return ContactControllerContacts
* @see JController
* @since 1.6
*/
public function __construct($config = array())
{
parent::__construct($config);
$this->registerTask('unfeatured', 'featured');
}
/**
* Method to toggle the featured setting of a list of contacts.
*
* @return void
* @since 1.6
*/
public function featured()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
$user = JFactory::getUser();
$ids = $this->input->get('cid', array(), 'array');
$values = array('featured' => 1, 'unfeatured' => 0);
$task = $this->getTask();
$value = JArrayHelper::getValue($values, $task, 0, 'int');
// Get the model.
$model = $this->getModel();
// Access checks.
foreach ($ids as $i => $id)
{
$item = $model->getItem($id);
if (!$user->authorise('core.edit.state', 'com_contact.category.'.(int) $item->catid))
{
// Prune items that you can't change.
unset($ids[$i]);
JError::raiseNotice(403, JText::_('JLIB_APPLICATION_ERROR_EDITSTATE_NOT_PERMITTED'));
}
}
if (empty($ids))
{
JError::raiseWarning(500, JText::_('COM_CONTACT_NO_ITEM_SELECTED'));
}
else
{
// Publish the items.
if (!$model->featured($ids, $value))
{
JError::raiseWarning(500, $model->getError());
}
}
$this->setRedirect('index.php?option=com_contact&view=contacts');
}
/**
* Proxy for getModel.
*
* @param string $name The name of the model.
* @param string $prefix The prefix for the PHP class name.
*
* @return JModel
* @since 1.6
*/
public function getModel($name = 'Contact', $prefix = 'ContactModel', $config = array('ignore_request' => true))
{
$model = parent::getModel($name, $prefix, $config);
return $model;
}
/**
* Function that allows child controller access to model data
* after the item has been deleted.
*
* @param JModelLegacy $model The data model object.
* @param integer $ids The array of ids for items being deleted.
*
* @return void
*
* @since 12.2
*/
protected function postDeleteHook(JModelLegacy $model, $ids = null)
{
}
}

View File

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

View File

@ -0,0 +1,89 @@
<?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;
/**
* Contact component helper.
*
* @package Joomla.Administrator
* @subpackage com_contact
* @since 1.6
*/
class ContactHelper
{
/**
* Configure the Linkbar.
*
* @param string $vName The name of the active view.
*
* @return void
* @since 1.6
*/
public static function addSubmenu($vName)
{
JHtmlSidebar::addEntry(
JText::_('COM_CONTACT_SUBMENU_CONTACTS'),
'index.php?option=com_contact&view=contacts',
$vName == 'contacts'
);
JHtmlSidebar::addEntry(
JText::_('COM_CONTACT_SUBMENU_CATEGORIES'),
'index.php?option=com_categories&extension=com_contact',
$vName == 'categories'
);
if ($vName == 'categories')
{
JToolbarHelper::title(
JText::sprintf('COM_CATEGORIES_CATEGORIES_TITLE', JText::_('com_contact')),
'contact-categories');
}
}
/**
* Gets a list of the actions that can be performed.
*
* @param integer The category ID.
* @param integer The contact ID.
*
* @return JObject
* @since 1.6
*/
public static function getActions($categoryId = 0, $contactId = 0)
{
$user = JFactory::getUser();
$result = new JObject;
if (empty($contactId) && empty($categoryId))
{
$assetName = 'com_contact';
$level = 'component';
}
elseif (empty($contactId))
{
$assetName = 'com_contact.category.'.(int) $categoryId;
$level = 'category';
}
else
{
$assetName = 'com_contact.contact.'.(int) $contactId;
$level = 'category';
}
$actions = JAccess::getActions('com_contact', $level);
foreach ($actions as $action)
{
$result->set($action->name, $user->authorise($action->name, $assetName));
}
return $result;
}
}

View File

@ -0,0 +1,116 @@
<?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');
/**
* @package Joomla.Administrator
* @subpackage com_contact
*/
abstract class JHtmlContact
{
/**
* Get the associated language flags
*
* @param int $contactid The item id to search associations
*
* @return string The language HTML
*/
public static function association($contactid)
{
// Defaults
$html = '';
// Get the associations
if ($associations = JLanguageAssociations::getAssociations('com_contact', '#__contact_details', 'com_contact.item', $contactid))
{
foreach ($associations as $tag => $associated)
{
$associations[$tag] = (int) $associated->id;
}
// Get the associated contact items
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('c.id, c.name as title')
->select('l.sef as lang_sef')
->from('#__contact_details as c')
->select('cat.title as category_title')
->join('LEFT', '#__categories as cat ON cat.id=c.catid')
->where('c.id IN (' . implode(',', array_values($associations)) . ')')
->join('LEFT', '#__languages as l ON c.language=l.lang_code')
->select('l.image')
->select('l.title as language_title');
$db->setQuery($query);
try
{
$items = $db->loadObjectList('id');
}
catch (runtimeException $e)
{
throw new Exception($e->getMessage(), 500);
return false;
}
if ($items)
{
foreach ($items as &$item)
{
$text = strtoupper($item->lang_sef);
$url = JRoute::_('index.php?option=com_contact&task=contact.edit&id=' . (int) $item->id);
$tooltipParts = array(
JHtml::_('image', 'mod_languages/' . $item->image . '.gif',
$item->language_title,
array('title' => $item->language_title),
true
),
$item->title,
'(' . $item->category_title . ')'
);
$item->link = JHtml::_('tooltip', implode(' ', $tooltipParts), null, null, $text, $url, null, 'hasTooltip label label-association label-' . $item->lang_sef);
}
}
$html = JLayoutHelper::render('joomla.content.associations', $items);
}
return $html;
}
/**
* @param int $value The featured value
* @param int $i
* @param bool $canChange Whether the value can be changed or not
*
* @return string The anchor tag to toggle featured/unfeatured contacts.
* @since 1.6
*/
public static function featured($value = 0, $i, $canChange = true)
{
// Array of image, task, title, action
$states = array(
0 => array('disabled.png', 'contacts.featured', 'COM_CONTACT_UNFEATURED', 'COM_CONTACT_TOGGLE_TO_FEATURE'),
1 => array('featured.png', 'contacts.unfeatured', 'JFEATURED', 'COM_CONTACT_TOGGLE_TO_UNFEATURE'),
);
$state = JArrayHelper::getValue($states, (int) $value, $states[1]);
$html = JHtml::_('image', 'admin/'.$state[0], JText::_($state[2]), null, true);
if ($canChange)
{
$html = '<a href="#" onclick="return listItemTask(\'cb'.$i.'\',\''.$state[1].'\')" title="'.JText::_($state[3]).'">'
. $html .'</a>';
}
return $html;
}
}

View File

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

View File

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

View File

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

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>

View File

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

View File

@ -0,0 +1,54 @@
CREATE TABLE `#__contact_details` (
`id` integer NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`alias` varchar(255) NOT NULL default '',
`con_position` varchar(255) default NULL,
`address` text,
`suburb` varchar(100) default NULL,
`state` varchar(100) default NULL,
`country` varchar(100) default NULL,
`postcode` varchar(100) default NULL,
`telephone` varchar(255) default NULL,
`fax` varchar(255) default NULL,
`misc` mediumtext,
`image` varchar(255) default NULL,
`imagepos` varchar(20) default NULL,
`email_to` varchar(255) default NULL,
`default_con` tinyint(1) unsigned NOT NULL default '0',
`published` tinyint(1) NOT NULL default '0',
`checked_out` integer unsigned NOT NULL default '0',
`checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',
`ordering` integer NOT NULL default '0',
`params` text NOT NULL,
`user_id` integer NOT NULL default '0',
`catid` integer NOT NULL default '0',
`access` tinyint(3) unsigned NOT NULL default '0',
`mobile` varchar(255) NOT NULL default '',
`webpage` varchar(255) NOT NULL default '',
`sortname1` varchar(255) NOT NULL,
`sortname2` varchar(255) NOT NULL,
`sortname3` varchar(255) NOT NULL,
`language` char(7) NOT NULL,
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`created_by` int(10) unsigned NOT NULL default '0',
`created_by_alias` varchar(255) NOT NULL default '',
`modified` datetime NOT NULL default '0000-00-00 00:00:00',
`modified_by` int(10) unsigned NOT NULL default '0',
`metakey` text NOT NULL,
`metadesc` text NOT NULL,
`metadata` text NOT NULL,
`featured` tinyint(3) unsigned NOT NULL default '0' COMMENT 'Set if article is featured.',
`xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.',
`publish_up` datetime NOT NULL default '0000-00-00 00:00:00',
`publish_down` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_state` (`published`),
KEY `idx_catid` (`catid`),
KEY `idx_createdby` (`created_by`),
KEY `idx_featured_catid` (`featured`,`catid`),
KEY `idx_language` (`language`),
KEY `idx_xreference` (`xreference`)
) DEFAULT CHARSET=utf8;

View File

@ -0,0 +1,2 @@
DROP TABLE IF EXISTS `#__contact_details`;

View File

@ -0,0 +1,219 @@
<?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;
/**
* @package Joomla.Administrator
* @subpackage com_contact
*/
class ContactTableContact extends JTable
{
/**
* Constructor
*
* @param JDatabaseDriver &$db Database connector object
*
* @since 1.0
*/
public function __construct(&$db)
{
parent::__construct('#__contact_details', 'id', $db);
}
/**
* Overloaded bind function
*
* @param array $array Named array to bind
* @param mixed $ignore An optional array or space separated list of properties to ignore while binding.
*
* @return mixed Null if operation was satisfactory, otherwise returns an error
* @since 1.6
*/
public function bind($array, $ignore = '')
{
if (isset($array['params']) && is_array($array['params']))
{
$registry = new JRegistry;
$registry->loadArray($array['params']);
$array['params'] = (string) $registry;
}
if (isset($array['metadata']) && is_array($array['metadata']))
{
$registry = new JRegistry;
$registry->loadArray($array['metadata']);
$array['metadata'] = (string) $registry;
}
return parent::bind($array, $ignore);
}
/**
* Stores a contact
*
* @param boolean True to update fields even if they are null.
*
* @return boolean True on success, false on failure.
*
* @since 1.6
*/
public function store($updateNulls = false)
{
// Transform the params field
if (is_array($this->params))
{
$registry = new JRegistry;
$registry->loadArray($this->params);
$this->params = (string) $registry;
}
$date = JFactory::getDate();
$user = JFactory::getUser();
if ($this->id)
{
// Existing item
$this->modified = $date->toSql();
$this->modified_by = $user->get('id');
}
else
{
// New contact. A contact created and created_by field can be set by the user,
// so we don't touch either of these if they are set.
if (!(int) $this->created)
{
$this->created = $date->toSql();
}
if (empty($this->created_by))
{
$this->created_by = $user->get('id');
}
}
// Set publish_up to null date if not set
if (!$this->publish_up)
{
$this->publish_up = $this->_db->getNullDate();
}
// Set publish_down to null date if not set
if (!$this->publish_down)
{
$this->publish_down = $this->_db->getNullDate();
}
// Set xreference to empty string if not set
if (!$this->xreference)
{
$this->xreference = '';
}
// Store utf8 email as punycode
$this->email_to = JStringPunycode::emailToPunycode($this->email_to);
// Convert IDN urls to punycode
$this->webpage = JStringPunycode::urlToPunycode($this->webpage);
// Verify that the alias is unique
$table = JTable::getInstance('Contact', 'ContactTable');
if ($table->load(array('alias' => $this->alias, 'catid' => $this->catid)) && ($table->id != $this->id || $this->id == 0))
{
$this->setError(JText::_('COM_CONTACT_ERROR_UNIQUE_ALIAS'));
return false;
}
return parent::store($updateNulls);
}
/**
* Overloaded check function
*
* @return boolean True on success, false on failure
*
* @see JTable::check
* @since 1.5
*/
public function check()
{
$this->default_con = (int) $this->default_con;
if (JFilterInput::checkAttribute(array ('href', $this->webpage)))
{
$this->setError(JText::_('COM_CONTACT_WARNING_PROVIDE_VALID_URL'));
return false;
}
/** check for valid name */
if (trim($this->name) == '')
{
$this->setError(JText::_('COM_CONTACT_WARNING_PROVIDE_VALID_NAME'));
return false;
}
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
}
/** check for valid category */
if (trim($this->catid) == '')
{
$this->setError(JText::_('COM_CONTACT_WARNING_CATEGORY'));
return false;
}
// Check the publish down date is not earlier than publish up.
if ((int) $this->publish_down > 0 && $this->publish_down < $this->publish_up)
{
$this->setError(JText::_('JGLOBAL_START_PUBLISH_AFTER_FINISH'));
return false;
}
return true;
// Clean up keywords -- eliminate extra spaces between phrases
// and cr (\r) and lf (\n) characters from string
if (!empty($this->metakey))
{
// Only process if not empty
$bad_characters = array("\n", "\r", "\"", "<", ">"); // array of characters to remove
$after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); // remove bad characters
$keys = explode(',', $after_clean); // create array using commas as delimiter
$clean_keys = array();
foreach($keys as $key)
{
if (trim($key)) { // ignore blank keywords
$clean_keys[] = trim($key);
}
}
$this->metakey = implode(", ", $clean_keys); // put array back together delimited by ", "
}
// Clean up description -- eliminate quotes and <> brackets
if (!empty($this->metadesc))
{
// Only process if not empty
$bad_characters = array("\"", "<", ">");
$this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc);
}
return true;
}
}

View File

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

View File

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

View File

@ -0,0 +1,215 @@
<?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;
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
$app = JFactory::getApplication();
$input = $app->input;
$assoc = isset($app->item_associations) ? $app->item_associations : 0;
?>
<script type="text/javascript">
Joomla.submitbutton = function(task)
{
if (task == 'contact.cancel' || document.formvalidator.isValid(document.id('contact-form')))
{
<?php echo $this->form->getField('misc')->save(); ?>
Joomla.submitform(task, document.getElementById('contact-form'));
}
}
</script>
<form action="<?php echo JRoute::_('index.php?option=com_contact&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="contact-form" class="form-validate form-horizontal">
<?php echo JLayoutHelper::render('joomla.edit.item_title', $this); ?>
<div class="row-fluid">
<!-- Begin contact -->
<div class="span10 form-horizontal">
<fieldset>
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'details')); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'details', empty($this->item->id) ? JText::_('COM_CONTACT_NEW_CONTACT', true) : JText::sprintf('COM_CONTACT_EDIT_CONTACT', $this->item->id, true)); ?>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('name'); ?></div>
<div class="controls"><?php echo $this->form->getInput('name'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('alias'); ?></div>
<div class="controls"><?php echo $this->form->getInput('alias'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('user_id'); ?></div>
<div class="controls"><?php echo $this->form->getInput('user_id'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('catid'); ?></div>
<div class="controls"><?php echo $this->form->getInput('catid'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('ordering'); ?></div>
<div class="controls"><?php echo $this->form->getInput('ordering'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('id'); ?></div>
<div class="controls"><?php echo $this->form->getInput('id'); ?></div>
</div>
<div class="control-group form-inline">
<?php echo $this->form->getLabel('misc'); ?>
</div>
<?php echo $this->form->getInput('misc'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'publishing', JText::_('JGLOBAL_FIELDSET_PUBLISHING', true)); ?>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('created_by'); ?></div>
<div class="controls"><?php echo $this->form->getInput('created_by'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('created_by_alias'); ?></div>
<div class="controls"><?php echo $this->form->getInput('created_by_alias'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('created'); ?></div>
<div class="controls"><?php echo $this->form->getInput('created'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('publish_up'); ?></div>
<div class="controls"><?php echo $this->form->getInput('publish_up'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('publish_down'); ?></div>
<div class="controls"><?php echo $this->form->getInput('publish_down'); ?></div>
</div>
<?php if ($this->item->modified_by) : ?>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('modified_by'); ?></div>
<div class="controls"><?php echo $this->form->getInput('modified_by'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('modified'); ?></div>
<div class="controls"><?php echo $this->form->getInput('modified'); ?></div>
</div>
<?php endif; ?>
<?php if ($this->item->version) : ?>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('version'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('version'); ?>
</div>
</div>
<?php endif; ?>
<?php if ($this->item->hits) : ?>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('hits'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('hits'); ?>
</div>
</div>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'basic', JText::_('COM_CONTACT_CONTACT_DETAILS', true)); ?>
<p><?php echo empty($this->item->id) ? JText::_('COM_CONTACT_DETAILS', true) : JText::sprintf('COM_CONTACT_EDIT_DETAILS', $this->item->id, true); ?></p>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('image'); ?></div>
<div class="controls"><?php echo $this->form->getInput('image'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('con_position'); ?></div>
<div class="controls"><?php echo $this->form->getInput('con_position'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('email_to'); ?></div>
<div class="controls"><?php echo $this->form->getInput('email_to'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('address'); ?></div>
<div class="controls"><?php echo $this->form->getInput('address'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('suburb'); ?></div>
<div class="controls"><?php echo $this->form->getInput('suburb'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('state'); ?></div>
<div class="controls"><?php echo $this->form->getInput('state'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('postcode'); ?></div>
<div class="controls"><?php echo $this->form->getInput('postcode'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('country'); ?></div>
<div class="controls"><?php echo $this->form->getInput('country'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('telephone'); ?></div>
<div class="controls"><?php echo $this->form->getInput('telephone'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('mobile'); ?></div>
<div class="controls"><?php echo $this->form->getInput('mobile'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('fax'); ?></div>
<div class="controls"><?php echo $this->form->getInput('fax'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('webpage'); ?></div>
<div class="controls"><?php echo $this->form->getInput('webpage'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('sortname1'); ?></div>
<div class="controls"><?php echo $this->form->getInput('sortname1'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('sortname2'); ?></div>
<div class="controls"><?php echo $this->form->getInput('sortname2'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('sortname3'); ?></div>
<div class="controls"><?php echo $this->form->getInput('sortname3'); ?></div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo $this->loadTemplate('params'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'metadata', JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS', true)); ?>
<?php echo $this->loadTemplate('metadata'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php if ($assoc) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'associations', JText::_('JGLOBAL_FIELDSET_ASSOCIATIONS', true)); ?>
<?php echo $this->loadTemplate('associations'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
</fieldset>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</div>
<!-- End content -->
<!-- Begin Sidebar -->
<?php echo JLayoutHelper::render('joomla.edit.details', $this); ?>
<!-- End Sidebar -->
</form>

View File

@ -0,0 +1,12 @@
<?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;
echo JLayoutHelper::render('joomla.edit.associations', $this);

View File

@ -0,0 +1,12 @@
<?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;
echo JLayoutHelper::render('joomla.edit.metadata', $this);

View File

@ -0,0 +1,28 @@
<?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;
$fieldSets = $this->form->getFieldsets('params');
foreach ($fieldSets as $name => $fieldSet) :
$paramstabs = 'params-' . $name;
echo JHtml::_('bootstrap.addTab', 'myTab', $paramstabs, JText::_($fieldSet->label, true));
if (isset($fieldSet->description) && trim($fieldSet->description)) :
echo '<p class="alert alert-info">'.$this->escape(JText::_($fieldSet->description)).'</p>';
endif;
?>
<?php foreach ($this->form->getFieldset($name) 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 endforeach; ?>

View File

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

View File

@ -0,0 +1,228 @@
<?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;
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
$app = JFactory::getApplication();
$input = $app->input;
$assoc = isset($app->item_associations) ? $app->item_associations : 0;
?>
<script type="text/javascript">
Joomla.submitbutton = function(task)
{
if (task == 'contact.cancel' || document.formvalidator.isValid(document.id('contact-form')))
{
<?php echo $this->form->getField('misc')->save(); ?>
if (window.opener && (task == 'contact.save' || task == 'contact.cancel'))
{
window.opener.document.closeEditWindow = self;
window.opener.setTimeout('window.document.closeEditWindow.close()', 1000);
}
Joomla.submitform(task, document.getElementById('contact-form'));
}
}
</script>
<div class="container-popup">
<div class="pull-right">
<button class="btn btn-primary" type="button" onclick="Joomla.submitbutton('contact.apply');"><?php echo JText::_('JTOOLBAR_APPLY') ?></button>
<button class="btn btn-primary" type="button" onclick="Joomla.submitbutton('contact.save');"><?php echo JText::_('JTOOLBAR_SAVE') ?></button>
<button class="btn" type="button" onclick="Joomla.submitbutton('contact.cancel');"><?php echo JText::_('JCANCEL') ?></button>
</div>
<div class="clearfix"> </div>
<hr class="hr-condensed" />
<form action="<?php echo JRoute::_('index.php?option=com_contact&layout=modal&tmpl=component&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="contact-form" class="form-validate form-horizontal">
<div class="row-fluid">
<!-- Begin contact -->
<div class="span10 form-horizontal">
<fieldset>
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'details')); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'details', empty($this->item->id) ? JText::_('COM_CONTACT_NEW_CONTACT', true) : JText::sprintf('COM_CONTACT_EDIT_CONTACT', $this->item->id, true)); ?>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('name'); ?></div>
<div class="controls"><?php echo $this->form->getInput('name'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('alias'); ?></div>
<div class="controls"><?php echo $this->form->getInput('alias'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('user_id'); ?></div>
<div class="controls"><?php echo $this->form->getInput('user_id'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('catid'); ?></div>
<div class="controls"><?php echo $this->form->getInput('catid'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('ordering'); ?></div>
<div class="controls"><?php echo $this->form->getInput('ordering'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('id'); ?></div>
<div class="controls"><?php echo $this->form->getInput('id'); ?></div>
</div>
<div class="control-group form-inline">
<?php echo $this->form->getLabel('misc'); ?>
</div>
<?php echo $this->form->getInput('misc'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'publishing', JText::_('JGLOBAL_FIELDSET_PUBLISHING', true)); ?>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('created_by'); ?></div>
<div class="controls"><?php echo $this->form->getInput('created_by'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('created_by_alias'); ?></div>
<div class="controls"><?php echo $this->form->getInput('created_by_alias'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('created'); ?></div>
<div class="controls"><?php echo $this->form->getInput('created'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('publish_up'); ?></div>
<div class="controls"><?php echo $this->form->getInput('publish_up'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('publish_down'); ?></div>
<div class="controls"><?php echo $this->form->getInput('publish_down'); ?></div>
</div>
<?php if ($this->item->modified_by) : ?>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('modified_by'); ?></div>
<div class="controls"><?php echo $this->form->getInput('modified_by'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('modified'); ?></div>
<div class="controls"><?php echo $this->form->getInput('modified'); ?></div>
</div>
<?php endif; ?>
<?php if ($this->item->version) : ?>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('version'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('version'); ?>
</div>
</div>
<?php endif; ?>
<?php if ($this->item->hits) : ?>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('hits'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('hits'); ?>
</div>
</div>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'basic', JText::_('COM_CONTACT_CONTACT_DETAILS', true)); ?>
<p><?php echo empty($this->item->id) ? JText::_('COM_CONTACT_DETAILS', true) : JText::sprintf('COM_CONTACT_EDIT_DETAILS', $this->item->id, true); ?></p>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('image'); ?></div>
<div class="controls"><?php echo $this->form->getInput('image'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('con_position'); ?></div>
<div class="controls"><?php echo $this->form->getInput('con_position'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('email_to'); ?></div>
<div class="controls"><?php echo $this->form->getInput('email_to'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('address'); ?></div>
<div class="controls"><?php echo $this->form->getInput('address'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('suburb'); ?></div>
<div class="controls"><?php echo $this->form->getInput('suburb'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('state'); ?></div>
<div class="controls"><?php echo $this->form->getInput('state'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('postcode'); ?></div>
<div class="controls"><?php echo $this->form->getInput('postcode'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('country'); ?></div>
<div class="controls"><?php echo $this->form->getInput('country'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('telephone'); ?></div>
<div class="controls"><?php echo $this->form->getInput('telephone'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('mobile'); ?></div>
<div class="controls"><?php echo $this->form->getInput('mobile'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('fax'); ?></div>
<div class="controls"><?php echo $this->form->getInput('fax'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('webpage'); ?></div>
<div class="controls"><?php echo $this->form->getInput('webpage'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('sortname1'); ?></div>
<div class="controls"><?php echo $this->form->getInput('sortname1'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('sortname2'); ?></div>
<div class="controls"><?php echo $this->form->getInput('sortname2'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('sortname3'); ?></div>
<div class="controls"><?php echo $this->form->getInput('sortname3'); ?></div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo $this->loadTemplate('params'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'metadata', JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS', true)); ?>
<?php echo $this->loadTemplate('metadata'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
</fieldset>
<div class="hidden">
<?php echo $this->loadTemplate('associations'); ?>
</div>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</div>
<!-- End content -->
<!-- Begin Sidebar -->
<?php echo JLayoutHelper::render('joomla.edit.details', $this); ?>
<!-- End Sidebar -->
</form>
</div>

View File

@ -0,0 +1,12 @@
<?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;
echo JLayoutHelper::render('joomla.edit.associations', $this);

View File

@ -0,0 +1,12 @@
<?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;
echo JLayoutHelper::render('joomla.edit.metadata', $this);

View File

@ -0,0 +1,28 @@
<?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;
$fieldSets = $this->form->getFieldsets('params');
foreach ($fieldSets as $name => $fieldSet) :
$paramstabs = 'params-' . $name;
echo JHtml::_('bootstrap.addTab', 'myTab', $paramstabs, JText::_($fieldSet->label, true));
if (isset($fieldSet->description) && trim($fieldSet->description)) :
echo '<p class="alert alert-info">'.$this->escape(JText::_($fieldSet->description)).'</p>';
endif;
?>
<?php foreach ($this->form->getFieldset($name) 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 endforeach; ?>

View File

@ -0,0 +1,116 @@
<?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;
/**
* View to edit a contact.
*
* @package Joomla.Administrator
* @subpackage com_contact
* @since 1.6
*/
class ContactViewContact extends JViewLegacy
{
protected $form;
protected $item;
protected $state;
/**
* Display the view
*/
public function display($tpl = null)
{
// Initialise variables.
$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;
}
if ($this->getLayout() == 'modal')
{
$this->form->setFieldAttribute('language', 'readonly', 'true');
$this->form->setFieldAttribute('catid', 'readonly', 'true');
}
$this->addToolbar();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser();
$userId = $user->get('id');
$isNew = ($this->item->id == 0);
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
// Since we don't track these assets at the item level, use the category id.
$canDo = ContactHelper::getActions($this->item->catid, 0);
JToolbarHelper::title(JText::_('COM_CONTACT_MANAGER_CONTACT'), 'contact.png');
// Build the actions for new and existing records.
if ($isNew)
{
// For new records, check the create permission.
if ($isNew && (count($user->getAuthorisedCategories('com_contact', 'core.create')) > 0))
{
JToolbarHelper::apply('contact.apply');
JToolbarHelper::save('contact.save');
JToolbarHelper::save2new('contact.save2new');
}
JToolbarHelper::cancel('contact.cancel');
}
else
{
// Can't save the record if it's checked out.
if (!$checkedOut)
{
// Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
if ($canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_by == $userId))
{
JToolbarHelper::apply('contact.apply');
JToolbarHelper::save('contact.save');
// We can save this record, but check the create permission to see if we can return to make a new one.
if ($canDo->get('core.create'))
{
JToolbarHelper::save2new('contact.save2new');
}
}
}
// If checked out, we can still save
if ($canDo->get('core.create'))
{
JToolbarHelper::save2copy('contact.save2copy');
}
JToolbarHelper::cancel('contact.cancel', 'JTOOLBAR_CLOSE');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_COMPONENTS_CONTACTS_CONTACTS_EDIT');
}
}

View File

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

View File

@ -0,0 +1,275 @@
<?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;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');
$app = JFactory::getApplication();
$user = JFactory::getUser();
$userId = $user->get('id');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$archived = $this->state->get('filter.published') == 2 ? true : false;
$trashed = $this->state->get('filter.published') == -2 ? true : false;
$canOrder = $user->authorise('core.edit.state', 'com_contact.category');
$saveOrder = $listOrder == 'a.ordering';
if ($saveOrder)
{
$saveOrderingUrl = 'index.php?option=com_contact&task=contacts.saveOrderAjax&tmpl=component';
JHtml::_('sortablelist.sortable', 'articleList', 'adminForm', strtolower($listDirn), $saveOrderingUrl);
}
$sortFields = $this->getSortFields();
$assoc = isset($app->item_associations) ? $app->item_associations : 0;
?>
<script type="text/javascript">
Joomla.orderTable = function()
{
table = document.getElementById("sortTable");
direction = document.getElementById("directionTable");
order = table.options[table.selectedIndex].value;
if (order != '<?php echo $listOrder; ?>')
{
dirn = 'asc';
}
else
{
dirn = direction.options[direction.selectedIndex].value;
}
Joomla.tableOrdering(order, dirn, '');
}
</script>
<form action="<?php echo JRoute::_('index.php?option=com_contact'); ?>" method="post" name="adminForm" id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
<div id="j-sidebar-container" class="span2">
<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
<?php else : ?>
<div id="j-main-container">
<?php endif;?>
<div id="filter-bar" class="btn-toolbar">
<div class="filter-search btn-group pull-left">
<label for="filter_search" class="element-invisible"><?php echo JText::_('COM_CONTACT_FILTER_SEARCH_DESC');?></label>
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('COM_CONTACT_SEARCH_IN_NAME'); ?>" />
</div>
<div class="btn-group pull-left">
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="directionTable" class="element-invisible"><?php echo JText::_('JFIELD_ORDERING_DESC');?></label>
<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()">
<option value=""><?php echo JText::_('JFIELD_ORDERING_DESC');?></option>
<option value="asc" <?php if ($listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
<option value="desc" <?php if ($listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
</select>
</div>
<div class="btn-group pull-right">
<label for="sortTable" class="element-invisible"><?php echo JText::_('JGLOBAL_SORT_BY');?></label>
<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()">
<option value=""><?php echo JText::_('JGLOBAL_SORT_BY');?></option>
<?php echo JHtml::_('select.options', $sortFields, 'value', 'text', $listOrder);?>
</select>
</div>
</div>
<div class="clearfix"> </div>
<table class="table table-striped" id="articleList">
<thead>
<tr>
<th width="1%" class="nowrap center hidden-phone">
<?php echo JHtml::_('grid.sort', '<i class="icon-menu-2"></i>', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
</th>
<th width="1%" class="hidden-phone">
<?php echo JHtml::_('grid.checkall'); ?>
</th>
<th width="1%" style="min-width:55px" class="nowrap center">
<?php echo JHtml::_('grid.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
</th>
<th>
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.name', $listDirn, $listOrder); ?>
</th>
<th class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_FIELD_LINKED_USER_LABEL', 'ul.name', $listDirn, $listOrder); ?>
</th>
<th width="5%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'JFEATURED', 'a.featured', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?>
</th>
<?php if ($assoc) : ?>
<th width="5%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_HEADING_ASSOCIATION', 'association', $listDirn, $listOrder); ?>
</th>
<?php endif;?>
<th width="5%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?>
</th>
<th width="1%" class="nowrap center hidden-phone">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tbody>
<?php
$n = count($this->items);
foreach ($this->items as $i => $item) :
$ordering = $listOrder == 'a.ordering';
$canCreate = $user->authorise('core.create', 'com_contact.category.'.$item->catid);
$canEdit = $user->authorise('core.edit', 'com_contact.category.'.$item->catid);
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $userId || $item->checked_out == 0;
$canEditOwn = $user->authorise('core.edit.own', 'com_contact.category.'.$item->catid) && $item->created_by == $userId;
$canChange = $user->authorise('core.edit.state', 'com_contact.category.'.$item->catid) && $canCheckin;
$item->cat_link = JRoute::_('index.php?option=com_categories&extension=com_contact&task=edit&type=other&id='.$item->catid);
?>
<tr class="row<?php echo $i % 2; ?>" sortable-group-id="<?php echo $item->catid?>">
<td class="order nowrap center hidden-phone">
<?php
$iconClass = '';
if (!$canChange)
{
$iconClass = ' inactive';
}
elseif (!$saveOrder)
{
$iconClass = ' inactive tip-top hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED');
}
?>
<span class="sortable-handler<?php echo $iconClass ?>">
<i class="icon-menu"></i>
</span>
<?php if ($canChange && $saveOrder) : ?>
<input type="text" style="display:none" name="order[]" size="5"
value="<?php echo $item->ordering; ?>" class="width-20 text-area-order " />
<?php endif; ?>
</td>
<td class="center hidden-phone">
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
</td>
<td class="center">
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'contacts.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
</td>
<td class="nowrap has-context">
<div class="pull-left">
<?php if ($item->checked_out) : ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'contacts.', $canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit || $canEditOwn) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_contact&task=contact.edit&id='.(int) $item->id); ?>">
<?php echo $this->escape($item->name); ?></a>
<?php else : ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
<span class="small">
<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias));?>
</span>
<div class="small">
<?php echo $item->category_title; ?>
</div>
</div>
<div class="pull-left">
<?php
// Create dropdown items
JHtml::_('dropdown.edit', $item->id, 'contact.');
JHtml::_('dropdown.divider');
if ($item->published) :
JHtml::_('dropdown.unpublish', 'cb' . $i, 'contacts.');
else :
JHtml::_('dropdown.publish', 'cb' . $i, 'contacts.');
endif;
if ($item->featured) :
JHtml::_('dropdown.unfeatured', 'cb' . $i, 'contacts.');
else :
JHtml::_('dropdown.featured', 'cb' . $i, 'contacts.');
endif;
JHtml::_('dropdown.divider');
if ($archived) :
JHtml::_('dropdown.unarchive', 'cb' . $i, 'contacts.');
else :
JHtml::_('dropdown.archive', 'cb' . $i, 'contacts.');
endif;
if ($item->checked_out) :
JHtml::_('dropdown.checkin', 'cb' . $i, 'contacts.');
endif;
if ($trashed) :
JHtml::_('dropdown.untrash', 'cb' . $i, 'contacts.');
else :
JHtml::_('dropdown.trash', 'cb' . $i, 'contacts.');
endif;
// render dropdown list
echo JHtml::_('dropdown.render');
?>
</div>
</td>
<td align="small hidden-phone">
<?php if (!empty($item->linked_user)) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_users&task=user.edit&id='.$item->user_id);?>"><?php echo $item->linked_user;?></a>
<?php endif; ?>
</td>
<td class="center hidden-phone">
<?php echo JHtml::_('contact.featured', $item->featured, $i, $canChange); ?>
</td>
<td align="small hidden-phone">
<?php echo $item->access_level; ?>
</td>
<?php if ($assoc) : ?>
<td class="hidden-phone">
<?php if ($item->association) : ?>
<?php echo JHtml::_('contact.association', $item->id); ?>
<?php endif; ?>
</td>
<?php endif;?>
<td class="small hidden-phone">
<?php if ($item->language == '*'):?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else:?>
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif;?>
</td>
<td align="center hidden-phone">
<?php echo $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
<tfoot>
<tr>
<td colspan="10">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
</table>
<?php //Load the batch processing form. ?>
<?php echo $this->loadTemplate('batch'); ?>
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
</form>

View File

@ -0,0 +1,57 @@
<?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;
$published = $this->state->get('filter.published');
?>
<div class="modal hide fade" id="collapseModal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">x</button>
<h3><?php echo JText::_('COM_CONTACT_BATCH_OPTIONS');?></h3>
</div>
<div class="modal-body">
<p><?php echo JText::_('COM_CONTACT_BATCH_TIP'); ?></p>
<div class="control-group">
<div class="controls">
<?php echo JHtml::_('batch.access');?>
</div>
</div>
<div class="control-group">
<div class="controls">
<?php echo JHtml::_('batch.language'); ?>
</div>
</div>
<div class="control-group">
<div class="controls">
<?php echo JHtml::_('batch.user'); ?>
</div>
</div>
<div class="control-group">
<div class="controls">
<?php echo JHtml::_('batch.tag');?>
</div>
</div>
<?php if ($published >= 0) : ?>
<div class="control-group">
<div class="controls">
<?php echo JHtml::_('batch.item', 'com_contact');?>
</div>
</div>
<?php endif; ?>
</div>
<div class="modal-footer">
<button class="btn" type="button" onclick="document.id('batch-category-id').value='';document.id('batch-access').value='';document.id('batch-language-id').value='';document.id('batch-user-id').value='';document.id('batch-tag-id)').value=''" data-dismiss="modal">
<?php echo JText::_('JCANCEL'); ?>
</button>
<button class="btn btn-primary" type="submit" onclick="Joomla.submitbutton('contact.batch');">
<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>
</div>
</div>

View File

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

View File

@ -0,0 +1,160 @@
<?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;
require_once JPATH_ROOT . '/components/com_contact/helpers/route.php';
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('bootstrap.tooltip');
$input = JFactory::getApplication()->input;
$function = $input->getCmd('function', 'jSelectContact');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo JRoute::_('index.php?option=com_contact&view=contacts&layout=modal&tmpl=component&function='.$function);?>" method="post" name="adminForm" id="adminForm" class="form-inline">
<fieldset class="filter clearfix">
<div class="btn-toolbar">
<div class="btn-group pull-left">
<label for="filter_search">
<?php echo JText::_('JSEARCH_FILTER_LABEL'); ?>
</label>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" size="30" title="<?php echo JText::_('COM_CONTACT_FILTER_SEARCH_DESC'); ?>" />
</div>
<div class="btn-group pull-left">
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>" data-placement="bottom">
<i class="icon-search"></i></button>
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" data-placement="bottom" onclick="document.id('filter_search').value='';this.form.submit();">
<i class="icon-remove"></i></button>
</div>
<div class="clearfix"></div>
</div>
<hr class="hr-condensed" />
<div class="filters pull-left">
<select name="filter_access" class="input-medium" onchange="this.form.submit()">
<option value=""><?php echo JText::_('JOPTION_SELECT_ACCESS');?></option>
<?php echo JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'));?>
</select>
<select name="filter_published" class="input-medium" onchange="this.form.submit()">
<option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED');?></option>
<?php echo JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true);?>
</select>
<?php if ($this->state->get('filter.forcedLanguage')) : ?>
<select name="filter_category_id" class="input-medium" onchange="this.form.submit()">
<option value=""><?php echo JText::_('JOPTION_SELECT_CATEGORY');?></option>
<?php echo JHtml::_('select.options', JHtml::_('category.options', 'com_contact', array('filter.language' => array('*', $this->state->get('filter.forcedLanguage')))), 'value', 'text', $this->state->get('filter.category_id'));?>
</select>
<input type="hidden" name="forcedLanguage" value="<?php echo $this->escape($this->state->get('filter.forcedLanguage')); ?>" />
<input type="hidden" name="filter_language" value="<?php echo $this->escape($this->state->get('filter.language')); ?>" />
<?php else : ?>
<select name="filter_category_id" class="input-medium" onchange="this.form.submit()">
<option value=""><?php echo JText::_('JOPTION_SELECT_CATEGORY');?></option>
<?php echo JHtml::_('select.options', JHtml::_('category.options', 'com_contact'), 'value', 'text', $this->state->get('filter.category_id'));?>
</select>
<select name="filter_language" class="input-medium" onchange="this.form.submit()">
<option value=""><?php echo JText::_('JOPTION_SELECT_LANGUAGE');?></option>
<?php echo JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language'));?>
</select>
<?php endif; ?>
</div>
</fieldset>
<table class="table table-striped table-condensed">
<thead>
<tr>
<th class="title">
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.name', $listDirn, $listOrder); ?>
</th>
<th class="center nowrap">
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_FIELD_LINKED_USER_LABEL', 'ul.name', $listDirn, $listOrder); ?>
</th>
<th width="15%" class="center nowrap">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'access_level', $listDirn, $listOrder); ?>
</th>
<th width="15%" class="center nowrap">
<?php echo JHtml::_('grid.sort', 'JCATEGORY', 'a.catid', $listDirn, $listOrder); ?>
</th>
<th width="5%" class="center nowrap">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_LANGUAGE', 'language', $listDirn, $listOrder); ?>
</th>
<th width="1%" class="center nowrap">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="6">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php foreach ($this->items as $i => $item) : ?>
<?php if ($item->language && JLanguageMultilang::isEnabled())
{
$tag = strlen($item->language);
if ($tag == 5)
{
$lang = substr($item->language, 0, 2);
}
elseif ($tag == 6)
{
$lang = substr($item->language, 0, 3);
}
else {
$lang = "";
}
}
elseif (!JLanguageMultilang::isEnabled())
{
$lang = "";
}
?>
<tr class="row<?php echo $i % 2; ?>">
<td>
<a href="javascript:void(0)" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $item->id; ?>', '<?php echo $this->escape(addslashes($item->name)); ?>', '<?php echo $this->escape($item->catid); ?>', null, '<?php echo $this->escape(ContactHelperRoute::getContactRoute($item->id, $item->catid, $item->language)); ?>', '<?php echo $this->escape($lang); ?>', null);">
<?php echo $this->escape($item->name); ?></a>
</td>
<td align="center">
<?php if (!empty($item->linked_user)) : ?>
<?php echo $item->linked_user;?>
<?php endif; ?>
</td>
<td class="center">
<?php echo $this->escape($item->access_level); ?>
</td>
<td class="center">
<?php echo $this->escape($item->category_title); ?>
</td>
<td class="center">
<?php if ($item->language == '*'):?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else:?>
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif;?>
</td>
<td align="center">
<?php echo (int) $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<input type="hidden" name="task" value="" />
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
<?php echo JHtml::_('form.token'); ?>
</form>

View File

@ -0,0 +1,177 @@
<?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;
/**
* View class for a list of contacts.
*
* @package Joomla.Administrator
* @subpackage com_contact
* @since 1.6
*/
class ContactViewContacts extends JViewLegacy
{
protected $items;
protected $pagination;
protected $state;
/**
* Display the view
*
* @return void
*/
public function display($tpl = null)
{
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
ContactHelper::addSubmenu('contacts');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode("\n", $errors));
return false;
}
// Preprocess the list of items to find ordering divisions.
// TODO: Complete the ordering stuff with nested sets
foreach ($this->items as &$item)
{
$item->order_up = true;
$item->order_dn = true;
}
$this->addToolbar();
$this->sidebar = JHtmlSidebar::render();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT.'/helpers/contact.php';
$canDo = ContactHelper::getActions($this->state->get('filter.category_id'));
$user = JFactory::getUser();
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
JToolbarHelper::title(JText::_('COM_CONTACT_MANAGER_CONTACTS'), 'contact.png');
if ($canDo->get('core.create') || (count($user->getAuthorisedCategories('com_contact', 'core.create'))) > 0)
{
JToolbarHelper::addNew('contact.add');
}
if (($canDo->get('core.edit')) || ($canDo->get('core.edit.own')))
{
JToolbarHelper::editList('contact.edit');
}
if ($canDo->get('core.edit.state'))
{
JToolbarHelper::publish('contacts.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('contacts.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::archiveList('contacts.archive');
JToolbarHelper::checkin('contacts.checkin');
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete'))
{
JToolbarHelper::deleteList('', 'contacts.delete', 'JTOOLBAR_EMPTY_TRASH');
}
elseif ($canDo->get('core.edit.state'))
{
JToolbarHelper::trash('contacts.trash');
}
// Add a batch button
if ($user->authorise('core.create', 'com_contacts') && $user->authorise('core.edit', 'com_contacts') && $user->authorise('core.edit.state', 'com_contacts'))
{
JHtml::_('bootstrap.modal', 'collapseModal');
$title = JText::_('JTOOLBAR_BATCH');
// Instantiate a new JLayoutFile instance and render the batch button
$layout = new JLayoutFile('joomla.toolbar.batch');
$dhtml = $layout->render(array('title' => $title));
$bar->appendButton('Custom', $dhtml, 'batch');
}
if ($canDo->get('core.admin'))
{
JToolbarHelper::preferences('com_contact');
}
JToolbarHelper::help('JHELP_COMPONENTS_CONTACTS_CONTACTS');
JHtmlSidebar::setAction('index.php?option=com_contact');
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_PUBLISHED'),
'filter_published',
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
);
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_CATEGORY'),
'filter_category_id',
JHtml::_('select.options', JHtml::_('category.options', 'com_contact'), 'value', 'text', $this->state->get('filter.category_id'))
);
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_ACCESS'),
'filter_access',
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
);
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_LANGUAGE'),
'filter_language',
JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language'))
);
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_TAG'),
'filter_tag',
JHtml::_('select.options', JHtml::_('tag.options', true, true), 'value', 'text', $this->state->get('filter.tag'))
);
}
/**
* Returns an array of fields the table can be sorted by
*
* @return array Array containing the field name to sort by as the key and display text as value
*
* @since 3.0
*/
protected function getSortFields()
{
return array(
'a.ordering' => JText::_('JGRID_HEADING_ORDERING'),
'a.published' => JText::_('JSTATUS'),
'a.name' => JText::_('JGLOBAL_TITLE'),
'category_title' => JText::_('JCATEGORY'),
'ul.name' => JText::_('COM_CONTACT_FIELD_LINKED_USER_LABEL'),
'a.featured' => JText::_('JFEATURED'),
'a.access' => JText::_('JGRID_HEADING_ACCESS'),
'a.language' => JText::_('JGRID_HEADING_LANGUAGE'),
'a.id' => JText::_('JGRID_HEADING_ID')
);
}
}

View File

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