| Current Path : /home/w/u/e/wuectly/www/03cbe/ |
| Current File : /home/w/u/e/wuectly/www/03cbe/contact.tar |
contact.xml 0000604 00000001415 15245531124 0006720 0 ustar 00 <?xml version="1.0" encoding="utf-8"?>
<extension version="3.9" type="plugin" group="privacy" method="upgrade">
<name>plg_privacy_contact</name>
<author>Joomla! Project</author>
<creationDate>July 2018</creationDate>
<copyright>(C) 2018 Open Source Matters, Inc.</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.9.0</version>
<description>PLG_PRIVACY_CONTACT_XML_DESCRIPTION</description>
<files>
<filename plugin="contact">contact.php</filename>
</files>
<languages>
<language tag="en-GB">en-GB.plg_privacy_contact.ini</language>
<language tag="en-GB">en-GB.plg_privacy_contact.sys.ini</language>
</languages>
</extension>
contact.php 0000604 00000003457 15245531124 0006717 0 ustar 00 <?php
/**
* @package Joomla.Plugin
* @subpackage Privacy.contact
*
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JLoader::register('PrivacyPlugin', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/plugin.php');
/**
* Privacy plugin managing Joomla user contact data
*
* @since 3.9.0
*/
class PlgPrivacyContact extends PrivacyPlugin
{
/**
* Processes an export request for Joomla core user contact data
*
* This event will collect data for the contact core tables:
*
* - Contact custom fields
*
* @param PrivacyTableRequest $request The request record being processed
* @param JUser $user The user account associated with this request if available
*
* @return PrivacyExportDomain[]
*
* @since 3.9.0
*/
public function onPrivacyExportRequest(PrivacyTableRequest $request, JUser $user = null)
{
if (!$user && !$request->email)
{
return array();
}
$domains = array();
$domain = $this->createDomain('user_contact', 'joomla_user_contact_data');
$domains[] = $domain;
$query = $this->db->getQuery(true)
->select('*')
->from($this->db->quoteName('#__contact_details'))
->order($this->db->quoteName('ordering') . ' ASC');
if ($user)
{
$query->where($this->db->quoteName('user_id') . ' = ' . (int) $user->id);
}
else
{
$query->where($this->db->quoteName('email_to') . ' = ' . $this->db->quote($request->email));
}
$items = $this->db->setQuery($query)->loadObjectList();
foreach ($items as $item)
{
$domain->addItem($this->createItemFromArray((array) $item));
}
$domains[] = $this->createCustomFieldsDomain('com_contact.contact', $items);
return $domains;
}
}
tmpl/default_user_custom_fields.php 0000604 00000004415 15245551567 0013652 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$params = $this->item->params;
$presentation_style = $params->get('presentation_style');
$displayGroups = $params->get('show_user_custom_fields');
$userFieldGroups = array();
?>
<?php if (!$displayGroups || !$this->contactUser) : ?>
<?php return; ?>
<?php endif; ?>
<?php foreach ($this->contactUser->jcfields as $field) : ?>
<?php if (!in_array('-1', $displayGroups) && (!$field->group_id || !in_array($field->group_id, $displayGroups))) : ?>
<?php continue; ?>
<?php endif; ?>
<?php if (!key_exists($field->group_title, $userFieldGroups)) : ?>
<?php $userFieldGroups[$field->group_title] = array(); ?>
<?php endif; ?>
<?php $userFieldGroups[$field->group_title][] = $field; ?>
<?php endforeach; ?>
<?php foreach ($userFieldGroups as $groupTitle => $fields) : ?>
<?php $id = JApplicationHelper::stringURLSafe($groupTitle); ?>
<?php if ($presentation_style == 'sliders') : ?>
<?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', $groupTitle ?: JText::_('COM_CONTACT_USER_FIELDS'), 'display-' . $id); ?>
<?php elseif ($presentation_style == 'tabs') : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-' . $id, $groupTitle ?: JText::_('COM_CONTACT_USER_FIELDS')); ?>
<?php elseif ($presentation_style == 'plain') : ?>
<?php echo '<h3>' . ($groupTitle ?: JText::_('COM_CONTACT_USER_FIELDS')) . '</h3>'; ?>
<?php endif; ?>
<div class="contact-profile" id="user-custom-fields-<?php echo $id; ?>">
<dl class="dl-horizontal">
<?php foreach ($fields as $field) : ?>
<?php if (!$field->value) : ?>
<?php continue; ?>
<?php endif; ?>
<?php if ($field->params->get('showlabel')) : ?>
<?php echo '<dt>' . JText::_($field->label) . '</dt>'; ?>
<?php endif; ?>
<?php echo '<dd>' . $field->value . '</dd>'; ?>
<?php endforeach; ?>
</dl>
</div>
<?php if ($presentation_style == 'sliders') : ?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php elseif ($presentation_style == 'tabs') : ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php endforeach; ?>
tmpl/default_address.php 0000604 00000007607 15245551567 0011407 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Marker_class: Class based on the selection of text, none, or icons
* jicon-text, jicon-none, jicon-icon
*/
?>
<dl class="contact-address dl-horizontal" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<?php if (($this->params->get('address_check') > 0) &&
($this->contact->address || $this->contact->suburb || $this->contact->state || $this->contact->country || $this->contact->postcode)) : ?>
<dt>
<span class="<?php echo $this->params->get('marker_class'); ?>">
<?php echo $this->params->get('marker_address'); ?>
</span>
</dt>
<?php if ($this->contact->address && $this->params->get('show_street_address')) : ?>
<dd>
<span class="contact-street" itemprop="streetAddress">
<?php echo nl2br($this->contact->address); ?>
<br />
</span>
</dd>
<?php endif; ?>
<?php if ($this->contact->suburb && $this->params->get('show_suburb')) : ?>
<dd>
<span class="contact-suburb" itemprop="addressLocality">
<?php echo $this->contact->suburb; ?>
<br />
</span>
</dd>
<?php endif; ?>
<?php if ($this->contact->state && $this->params->get('show_state')) : ?>
<dd>
<span class="contact-state" itemprop="addressRegion">
<?php echo $this->contact->state; ?>
<br />
</span>
</dd>
<?php endif; ?>
<?php if ($this->contact->postcode && $this->params->get('show_postcode')) : ?>
<dd>
<span class="contact-postcode" itemprop="postalCode">
<?php echo $this->contact->postcode; ?>
<br />
</span>
</dd>
<?php endif; ?>
<?php if ($this->contact->country && $this->params->get('show_country')) : ?>
<dd>
<span class="contact-country" itemprop="addressCountry">
<?php echo $this->contact->country; ?>
<br />
</span>
</dd>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->contact->email_to && $this->params->get('show_email')) : ?>
<dt>
<span class="<?php echo $this->params->get('marker_class'); ?>" itemprop="email">
<?php echo nl2br($this->params->get('marker_email')); ?>
</span>
</dt>
<dd>
<span class="contact-emailto">
<?php echo $this->contact->email_to; ?>
</span>
</dd>
<?php endif; ?>
<?php if ($this->contact->telephone && $this->params->get('show_telephone')) : ?>
<dt>
<span class="<?php echo $this->params->get('marker_class'); ?>">
<?php echo $this->params->get('marker_telephone'); ?>
</span>
</dt>
<dd>
<span class="contact-telephone" itemprop="telephone">
<?php echo $this->contact->telephone; ?>
</span>
</dd>
<?php endif; ?>
<?php if ($this->contact->fax && $this->params->get('show_fax')) : ?>
<dt>
<span class="<?php echo $this->params->get('marker_class'); ?>">
<?php echo $this->params->get('marker_fax'); ?>
</span>
</dt>
<dd>
<span class="contact-fax" itemprop="faxNumber">
<?php echo $this->contact->fax; ?>
</span>
</dd>
<?php endif; ?>
<?php if ($this->contact->mobile && $this->params->get('show_mobile')) : ?>
<dt>
<span class="<?php echo $this->params->get('marker_class'); ?>">
<?php echo $this->params->get('marker_mobile'); ?>
</span>
</dt>
<dd>
<span class="contact-mobile" itemprop="telephone">
<?php echo $this->contact->mobile; ?>
</span>
</dd>
<?php endif; ?>
<?php if ($this->contact->webpage && $this->params->get('show_webpage')) : ?>
<dt>
<span class="<?php echo $this->params->get('marker_class'); ?>">
<?php echo $this->params->get('marker_webpage'); ?>
</span>
</dt>
<dd>
<span class="contact-webpage">
<a href="<?php echo $this->contact->webpage; ?>" target="_blank" rel="noopener noreferrer" itemprop="url">
<?php echo JStringPunycode::urlToUTF8($this->contact->webpage); ?></a>
</span>
</dd>
<?php endif; ?>
</dl>
tmpl/default_form.php 0000604 00000003176 15245551567 0010722 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::_('behavior.keepalive');
JHtml::_('behavior.formvalidator');
?>
<div class="contact-form">
<form id="contact-form" action="<?php echo JRoute::_('index.php'); ?>" method="post" class="form-validate form-horizontal well">
<?php foreach ($this->form->getFieldsets() as $fieldset) : ?>
<?php if ($fieldset->name === 'captcha' && !$this->captchaEnabled) : ?>
<?php continue; ?>
<?php endif; ?>
<?php $fields = $this->form->getFieldset($fieldset->name); ?>
<?php if (count($fields)) : ?>
<fieldset>
<?php if (isset($fieldset->label) && ($legend = trim(JText::_($fieldset->label))) !== '') : ?>
<legend><?php echo $legend; ?></legend>
<?php endif; ?>
<?php foreach ($fields as $field) : ?>
<?php echo $field->renderField(); ?>
<?php endforeach; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
<div class="control-group">
<div class="controls">
<button class="btn btn-primary validate" type="submit"><?php echo JText::_('COM_CONTACT_CONTACT_SEND'); ?></button>
<input type="hidden" name="option" value="com_contact" />
<input type="hidden" name="task" value="contact.submit" />
<input type="hidden" name="return" value="<?php echo $this->return_page; ?>" />
<input type="hidden" name="id" value="<?php echo $this->contact->slug; ?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
</form>
</div>
tmpl/default.xml 0000604 00000030000 15245551567 0007672 0 ustar 00 <?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_CONTACT_CONTACT_VIEW_DEFAULT_TITLE" option="COM_CONTACT_CONTACT_VIEW_DEFAULT_OPTION">
<help
key = "JHELP_MENUS_MENU_ITEM_CONTACT_SINGLE_CONTACT"
/>
<message>
<![CDATA[COM_CONTACT_CONTACT_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<!-- Add fields to the request variables for the layout. -->
<fields name="request">
<fieldset name="request"
addfieldpath="/administrator/components/com_contact/models/fields"
>
<field
name="id"
type="modal_contact"
label="COM_CONTACT_SELECT_CONTACT_LABEL"
description="COM_CONTACT_SELECT_CONTACT_DESC"
required="true"
select="true"
new="true"
edit="true"
clear="true"
/>
</fieldset>
</fields>
<!-- Add fields to the parameters object for the layout. -->
<fields name="params">
<!-- Basic options. -->
<fieldset name="params"
label="COM_CONTACT_BASIC_OPTIONS_FIELDSET_LABEL"
addfieldpath="/administrator/components/com_fields/models/fields"
>
<field
name="presentation_style"
type="list"
label="COM_CONTACT_FIELD_PRESENTATION_LABEL"
description="COM_CONTACT_FIELD_PRESENTATION_DESC"
useglobal="true"
>
<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_contact_category"
type="list"
label="COM_CONTACT_FIELD_CONTACT_SHOW_CATEGORY_LABEL"
description="COM_CONTACT_FIELD_CONTACT_SHOW_CATEGORY_DESC"
useglobal="true"
class="chzn-color"
>
<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="list"
label="COM_CONTACT_FIELD_CONTACT_SHOW_LIST_LABEL"
description="COM_CONTACT_FIELD_CONTACT_SHOW_LIST_DESC"
useglobal="true"
class="chzn-color"
>
<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"
useglobal="true"
class="chzn-color"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_tags"
type="list"
label="COM_CONTACT_FIELD_SHOW_TAGS_LABEL"
description="COM_CONTACT_FIELD_SHOW_TAGS_DESC"
useglobal="true"
class="chzn-color"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_info"
type="list"
label="COM_CONTACT_FIELD_SHOW_INFO_LABEL"
description="COM_CONTACT_FIELD_SHOW_INFO_DESC"
useglobal="true"
class="chzn-color"
>
<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"
useglobal="true"
showon="show_info:1"
class="chzn-color"
>
<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"
useglobal="true"
showon="show_info:1"
class="chzn-color"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="add_mailto_link"
type="list"
label="COM_CONTACT_FIELD_PARAMS_ADD_MAILTO_LINK_LABEL"
description="COM_CONTACT_FIELD_PARAMS_ADD_MAILTO_LINK_DESC"
useglobal="true"
showon="show_info:1"
class="chzn-color"
>
<option value="1">JYES</option>
<option value="0">JNO</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"
useglobal="true"
showon="show_info:1"
class="chzn-color"
>
<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"
useglobal="true"
showon="show_info:1"
class="chzn-color"
>
<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"
useglobal="true"
showon="show_info:1"
class="chzn-color"
>
<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"
useglobal="true"
showon="show_info:1"
class="chzn-color"
>
<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"
useglobal="true"
showon="show_info:1"
class="chzn-color"
>
<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"
useglobal="true"
showon="show_info:1"
class="chzn-color"
>
<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"
useglobal="true"
showon="show_info:1"
class="chzn-color"
>
<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"
useglobal="true"
showon="show_info:1"
class="chzn-color"
>
<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"
useglobal="true"
showon="show_info:1"
class="chzn-color"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_image"
type="list"
label="COM_CONTACT_FIELD_PARAMS_IMAGE_LABEL"
description="COM_CONTACT_FIELD_PARAMS_IMAGE_DESC"
useglobal="true"
showon="show_info:1"
class="chzn-color"
>
<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"
useglobal="true"
class="chzn-color"
>
<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"
useglobal="true"
class="chzn-color"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_articles"
type="list"
label="COM_CONTACT_FIELD_ARTICLES_SHOW_LABEL"
description="COM_CONTACT_FIELD_ARTICLES_SHOW_DESC"
useglobal="true"
class="chzn-color"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="articles_display_num"
type="list"
label="COM_CONTACT_FIELD_ARTICLES_DISPLAY_NUM_LABEL"
description="COM_CONTACT_FIELD_ARTICLES_DISPLAY_NUM_DESC"
default=""
useglobal="true"
>
<option value="use_contact">COM_CONTACT_FIELD_VALUE_USE_CONTACT_SETTINGS</option>
<option value="5">J5</option>
<option value="10">J10</option>
<option value="15">J15</option>
<option value="20">J20</option>
<option value="25">J25</option>
<option value="30">J30</option>
<option value="50">J50</option>
<option value="75">J75</option>
<option value="100">J100</option>
<option value="150">J150</option>
<option value="200">J200</option>
<option value="250">J250</option>
<option value="300">J300</option>
<option value="0">JALL</option>
</field>
<field
name="show_profile"
type="list"
label="COM_CONTACT_FIELD_PROFILE_SHOW_LABEL"
description="COM_CONTACT_FIELD_PROFILE_SHOW_DESC"
useglobal="true"
class="chzn-color"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_user_custom_fields"
type="fieldgroups"
label="COM_CONTACT_FIELD_USER_CUSTOM_FIELDS_SHOW_LABEL"
description="COM_CONTACT_FIELD_USER_CUSTOM_FIELDS_SHOW_DESC"
multiple="true"
context="com_users.user"
>
<option value="-1">JALL</option>
</field>
<field
name="show_links"
type="list"
label="COM_CONTACT_FIELD_SHOW_LINKS_LABEL"
description="COM_CONTACT_FIELD_SHOW_LINKS_DESC"
useglobal="true"
class="chzn-color"
>
<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"
size="30"
useglobal="true"
/>
<field
name="linkb_name"
type="text"
label="COM_CONTACT_FIELD_LINKB_NAME_LABEL"
description="COM_CONTACT_FIELD_LINK_NAME_DESC"
size="30"
useglobal="true"
/>
<field
name="linkc_name"
type="text"
label="COM_CONTACT_FIELD_LINKC_NAME_LABEL"
description="COM_CONTACT_FIELD_LINK_NAME_DESC"
size="30"
useglobal="true"
/>
<field
name="linkd_name"
type="text"
label="COM_CONTACT_FIELD_LINKD_NAME_LABEL"
description="COM_CONTACT_FIELD_LINK_NAME_DESC"
size="30"
useglobal="true"
/>
<field
name="linke_name"
type="text"
label="COM_CONTACT_FIELD_LINKE_NAME_LABEL"
description="COM_CONTACT_FIELD_LINK_NAME_DESC"
size="30"
useglobal="true"
/>
</fieldset>
<!-- Form options. -->
<fieldset name="Contact_Form"
label="COM_CONTACT_MAIL_FIELDSET_LABEL"
>
<field
name="show_email_form"
type="list"
label="COM_CONTACT_FIELD_EMAIL_SHOW_FORM_LABEL"
description="COM_CONTACT_FIELD_EMAIL_SHOW_FORM_DESC"
useglobal="true"
class="chzn-color"
>
<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"
useglobal="true"
class="chzn-color"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="validate_session"
type="list"
label="COM_CONTACT_FIELD_CONFIG_SESSION_CHECK_LABEL"
description="COM_CONTACT_FIELD_CONFIG_SESSION_CHECK_DESC"
useglobal="true"
class="chzn-color"
>
<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"
useglobal="true"
class="chzn-color"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="redirect"
type="text"
label="COM_CONTACT_FIELD_CONFIG_REDIRECT_LABEL"
description="COM_CONTACT_FIELD_CONFIG_REDIRECT_DESC"
size="30"
useglobal="true"
/>
</fieldset>
</fields>
</metadata>
tmpl/default.php 0000604 00000024573 15245551567 0007703 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$tparams = $this->item->params;
?>
<div class="contact<?php echo $this->pageclass_sfx; ?>" itemscope itemtype="https://schema.org/Person">
<?php if ($tparams->get('show_page_heading')) : ?>
<h1>
<?php echo $this->escape($tparams->get('page_heading')); ?>
</h1>
<?php endif; ?>
<?php if ($this->contact->name && $tparams->get('show_name')) : ?>
<div class="page-header">
<h2>
<?php if ($this->item->published == 0) : ?>
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<span class="contact-name" itemprop="name"><?php echo $this->contact->name; ?></span>
</h2>
</div>
<?php endif; ?>
<?php $show_contact_category = $tparams->get('show_contact_category'); ?>
<?php if ($show_contact_category === 'show_no_link') : ?>
<h3>
<span class="contact-category"><?php echo $this->contact->category_title; ?></span>
</h3>
<?php elseif ($show_contact_category === 'show_with_link') : ?>
<?php $contactLink = ContactHelperRoute::getCategoryRoute($this->contact->catid); ?>
<h3>
<span class="contact-category"><a href="<?php echo $contactLink; ?>">
<?php echo $this->escape($this->contact->category_title); ?></a>
</span>
</h3>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($tparams->get('show_contact_list') && count($this->contacts) > 1) : ?>
<form action="#" method="get" name="selectForm" id="selectForm">
<label for="select_contact"><?php echo JText::_('COM_CONTACT_SELECT_CONTACT'); ?></label>
<?php echo JHtml::_('select.genericlist', $this->contacts, 'select_contact', 'class="inputbox" onchange="document.location.href = this.value"', 'link', 'name', $this->contact->link); ?>
</form>
<?php endif; ?>
<?php if ($tparams->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php $this->item->tagLayout = new JLayoutFile('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php $presentation_style = $tparams->get('presentation_style'); ?>
<?php $accordionStarted = false; ?>
<?php $tabSetStarted = false; ?>
<?php if ($this->params->get('show_info', 1)) : ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php echo JHtml::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'basic-details')); ?>
<?php $accordionStarted = true; ?>
<?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_DETAILS'), 'basic-details'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'basic-details')); ?>
<?php $tabSetStarted = true; ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'basic-details', JText::_('COM_CONTACT_DETAILS')); ?>
<?php elseif ($presentation_style === 'plain') : ?>
<?php echo '<h3>' . JText::_('COM_CONTACT_DETAILS') . '</h3>'; ?>
<?php endif; ?>
<?php if ($this->contact->image && $tparams->get('show_image')) : ?>
<div class="thumbnail pull-right">
<?php echo JHtml::_('image', $this->contact->image, htmlspecialchars($this->contact->name, ENT_QUOTES, 'UTF-8'), array('itemprop' => 'image')); ?>
</div>
<?php endif; ?>
<?php if ($this->contact->con_position && $tparams->get('show_position')) : ?>
<dl class="contact-position dl-horizontal">
<dt><?php echo JText::_('COM_CONTACT_POSITION'); ?>:</dt>
<dd itemprop="jobTitle">
<?php echo $this->contact->con_position; ?>
</dd>
</dl>
<?php endif; ?>
<?php echo $this->loadTemplate('address'); ?>
<?php if ($tparams->get('allow_vcard')) : ?>
<?php echo JText::_('COM_CONTACT_DOWNLOAD_INFORMATION_AS'); ?>
<a href="<?php echo JRoute::_('index.php?option=com_contact&view=contact&id=' . $this->contact->id . '&format=vcf'); ?>">
<?php echo JText::_('COM_CONTACT_VCARD'); ?></a>
<?php endif; ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($tparams->get('show_email_form') && ($this->contact->email_to || $this->contact->user_id)) : ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php if (!$accordionStarted)
{
echo JHtml::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'display-form'));
$accordionStarted = true;
}
?>
<?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_EMAIL_FORM'), 'display-form'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php if (!$tabSetStarted)
{
echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'display-form'));
$tabSetStarted = true;
}
?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-form', JText::_('COM_CONTACT_EMAIL_FORM')); ?>
<?php elseif ($presentation_style === 'plain') : ?>
<?php echo '<h3>' . JText::_('COM_CONTACT_EMAIL_FORM') . '</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('form'); ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($tparams->get('show_links')) : ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php if (!$accordionStarted) : ?>
<?php echo JHtml::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'display-links')); ?>
<?php $accordionStarted = true; ?>
<?php endif; ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php if (!$tabSetStarted) : ?>
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'display-links')); ?>
<?php $tabSetStarted = true; ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($tparams->get('show_articles') && $this->contact->user_id && $this->contact->articles) : ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php if (!$accordionStarted)
{
echo JHtml::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'display-articles'));
$accordionStarted = true;
}
?>
<?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('JGLOBAL_ARTICLES'), 'display-articles'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php if (!$tabSetStarted)
{
echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'display-articles'));
$tabSetStarted = true;
}
?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-articles', JText::_('JGLOBAL_ARTICLES')); ?>
<?php elseif ($presentation_style === 'plain') : ?>
<?php echo '<h3>' . JText::_('JGLOBAL_ARTICLES') . '</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('articles'); ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($tparams->get('show_profile') && $this->contact->user_id && JPluginHelper::isEnabled('user', 'profile')) : ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php if (!$accordionStarted)
{
echo JHtml::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'display-profile'));
$accordionStarted = true;
}
?>
<?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_PROFILE'), 'display-profile'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php if (!$tabSetStarted)
{
echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'display-profile'));
$tabSetStarted = true;
}
?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-profile', JText::_('COM_CONTACT_PROFILE')); ?>
<?php elseif ($presentation_style === 'plain') : ?>
<?php echo '<h3>' . JText::_('COM_CONTACT_PROFILE') . '</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('profile'); ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($tparams->get('show_user_custom_fields') && $this->contactUser) : ?>
<?php echo $this->loadTemplate('user_custom_fields'); ?>
<?php endif; ?>
<?php if ($this->contact->misc && $tparams->get('show_misc')) : ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php if (!$accordionStarted)
{
echo JHtml::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'display-misc'));
$accordionStarted = true;
}
?>
<?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_OTHER_INFORMATION'), 'display-misc'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php if (!$tabSetStarted)
{
echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'display-misc'));
$tabSetStarted = true;
}
?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-misc', JText::_('COM_CONTACT_OTHER_INFORMATION')); ?>
<?php elseif ($presentation_style === 'plain') : ?>
<?php echo '<h3>' . JText::_('COM_CONTACT_OTHER_INFORMATION') . '</h3>'; ?>
<?php endif; ?>
<div class="contact-miscinfo">
<dl class="dl-horizontal">
<dt>
<span class="<?php echo $tparams->get('marker_class'); ?>">
<?php echo $tparams->get('marker_misc'); ?>
</span>
</dt>
<dd>
<span class="contact-misc">
<?php echo $this->contact->misc; ?>
</span>
</dd>
</dl>
</div>
<?php if ($presentation_style === 'sliders') : ?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($accordionStarted) : ?>
<?php echo JHtml::_('bootstrap.endAccordion'); ?>
<?php elseif ($tabSetStarted) : ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>
tmpl/default_articles.php 0000604 00000001441 15245551567 0011556 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');
?>
<?php if ($this->params->get('show_articles')) : ?>
<div class="contact-articles">
<ul class="nav nav-tabs nav-stacked">
<?php foreach ($this->item->articles as $article) : ?>
<li>
<?php echo JHtml::_('link', JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catid, $article->language)), htmlspecialchars($article->title, ENT_COMPAT, 'UTF-8')); ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
tmpl/default_profile.php 0000604 00000002525 15245551567 0011414 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<?php if (JPluginHelper::isEnabled('user', 'profile')) :
$fields = $this->item->profile->getFieldset('profile'); ?>
<div class="contact-profile" id="users-profile-custom">
<dl class="dl-horizontal">
<?php foreach ($fields as $profile) :
if ($profile->value) :
echo '<dt>' . $profile->label . '</dt>';
$profile->text = htmlspecialchars($profile->value, ENT_COMPAT, 'UTF-8');
switch ($profile->id) :
case 'profile_website':
$v_http = substr($profile->value, 0, 4);
if ($v_http === 'http') :
echo '<dd><a href="' . $profile->text . '">' . JStringPunycode::urlToUTF8($profile->text) . '</a></dd>';
else :
echo '<dd><a href="http://' . $profile->text . '">' . JStringPunycode::urlToUTF8($profile->text) . '</a></dd>';
endif;
break;
case 'profile_dob':
echo '<dd>' . JHtml::_('date', $profile->text, JText::_('DATE_FORMAT_LC4'), false) . '</dd>';
break;
default:
echo '<dd>' . $profile->text . '</dd>';
break;
endswitch;
endif;
endforeach; ?>
</dl>
</div>
<?php endif; ?>
tmpl/default_links.php 0000604 00000003231 15245551567 0011067 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<?php if ($this->params->get('presentation_style') === 'sliders') : ?>
<?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_LINKS'), 'display-links'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-links', JText::_('COM_CONTACT_LINKS')); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain') : ?>
<?php echo '<h3>' . JText::_('COM_CONTACT_LINKS') . '</h3>'; ?>
<?php endif; ?>
<div class="contact-links">
<ul class="nav nav-tabs nav-stacked">
<?php
// Letters 'a' to 'e'
foreach (range('a', 'e') as $char) :
$link = $this->contact->params->get('link' . $char);
$label = $this->contact->params->get('link' . $char . '_name');
if (!$link) :
continue;
endif;
// Add 'http://' if not present
$link = (0 === strpos($link, 'http')) ? $link : 'http://' . $link;
// If no label is present, take the link
$label = $label ?: $link;
?>
<li>
<a href="<?php echo $link; ?>" itemprop="url">
<?php echo $label; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php if ($this->params->get('presentation_style') === 'sliders') : ?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
view.vcf.php 0000604 00000006225 15245551567 0007024 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* View to create a VCF for a contact item
*
* @since 1.6
*/
class ContactViewContact extends JViewLegacy
{
/**
* The item model state
*
* @var \Joomla\Registry\Registry
* @deprecated 4.0 Variable not used
*/
protected $state;
/**
* The contact item
*
* @var JObject
*/
protected $item;
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*/
public function display($tpl = null)
{
// Get model data.
$item = $this->get('Item');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseWarning(500, implode("\n", $errors));
return false;
}
JFactory::getDocument()->setMimeEncoding('text/directory', true);
// Compute lastname, firstname and middlename
$item->name = trim($item->name);
// "Lastname, Firstname Midlename" format support
// e.g. "de Gaulle, Charles"
$namearray = explode(',', $item->name);
if (count($namearray) > 1)
{
$lastname = $namearray[0];
$card_name = $lastname;
$name_and_midname = trim($namearray[1]);
$firstname = '';
if (!empty($name_and_midname))
{
$namearray = explode(' ', $name_and_midname);
$firstname = $namearray[0];
$middlename = (count($namearray) > 1) ? $namearray[1] : '';
$card_name = $firstname . ' ' . ($middlename ? $middlename . ' ' : '') . $card_name;
}
}
// "Firstname Middlename Lastname" format support
else
{
$namearray = explode(' ', $item->name);
$middlename = (count($namearray) > 2) ? $namearray[1] : '';
$firstname = array_shift($namearray);
$lastname = count($namearray) ? end($namearray) : '';
$card_name = $firstname . ($middlename ? ' ' . $middlename : '') . ($lastname ? ' ' . $lastname : '');
}
$rev = date('c', strtotime($item->modified));
JFactory::getApplication()->setHeader('Content-disposition', 'attachment; filename="' . $card_name . '.vcf"', true);
$vcard = array();
$vcard[] .= 'BEGIN:VCARD';
$vcard[] .= 'VERSION:3.0';
$vcard[] = 'N:' . $lastname . ';' . $firstname . ';' . $middlename;
$vcard[] = 'FN:' . $item->name;
$vcard[] = 'TITLE:' . $item->con_position;
$vcard[] = 'TEL;TYPE=WORK,VOICE:' . $item->telephone;
$vcard[] = 'TEL;TYPE=WORK,FAX:' . $item->fax;
$vcard[] = 'TEL;TYPE=WORK,MOBILE:' . $item->mobile;
$vcard[] = 'ADR;TYPE=WORK:;;' . $item->address . ';' . $item->suburb . ';' . $item->state . ';' . $item->postcode . ';' . $item->country;
$vcard[] = 'LABEL;TYPE=WORK:' . $item->address . "\n" . $item->suburb . "\n" . $item->state . "\n" . $item->postcode . "\n" . $item->country;
$vcard[] = 'EMAIL;TYPE=PREF,INTERNET:' . $item->email_to;
$vcard[] = 'URL:' . $item->webpage;
$vcard[] = 'REV:' . $rev . 'Z';
$vcard[] = 'END:VCARD';
echo implode("\n", $vcard);
}
}
view.html.php 0000604 00000010442 15245551567 0007206 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_contact
*
* @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* View to edit a contact.
*
* @since 1.6
*/
class ContactViewContact extends JViewLegacy
{
/**
* The JForm object
*
* @var JForm
*/
protected $form;
/**
* The active item
*
* @var object
*/
protected $item;
/**
* The model state
*
* @var object
*/
protected $state;
/**
* Display the view.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*/
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')))
{
throw new Exception(implode("\n", $errors), 500);
}
// If we are forcing a language in modal (used for associations).
if ($this->getLayout() === 'modal' && $forcedLanguage = JFactory::getApplication()->input->get('forcedLanguage', '', 'cmd'))
{
// Set the language field to the forcedLanguage and disable changing it.
$this->form->setValue('language', null, $forcedLanguage);
$this->form->setFieldAttribute('language', 'readonly', 'true');
// Only allow to select categories with All language or with the forced language.
$this->form->setFieldAttribute('catid', 'language', '*,' . $forcedLanguage);
// Only allow to select tags with All language or with the forced language.
$this->form->setFieldAttribute('tags', 'language', '*,' . $forcedLanguage);
}
$this->addToolbar();
return parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser();
$userId = $user->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 = JHelperContent::getActions('com_contact', 'category', $this->item->catid);
JToolbarHelper::title($isNew ? JText::_('COM_CONTACT_MANAGER_CONTACT_NEW') : JText::_('COM_CONTACT_MANAGER_CONTACT_EDIT'), 'address contact');
// 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
{
// Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
$itemEditable = $canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_by == $userId);
// Can't save the record if it's checked out and editable
if (!$checkedOut && $itemEditable)
{
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');
}
if (JComponentHelper::isEnabled('com_contenthistory') && $this->state->params->get('save_history', 0) && $itemEditable)
{
JToolbarHelper::versions('com_contact.contact', $this->item->id);
}
if (JLanguageAssociations::isEnabled() && JComponentHelper::isEnabled('com_associations'))
{
JToolbarHelper::custom('contact.editAssociations', 'contract', 'contract', 'JTOOLBAR_ASSOCIATIONS', false, false);
}
JToolbarHelper::cancel('contact.cancel', 'JTOOLBAR_CLOSE');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_COMPONENTS_CONTACTS_CONTACTS_EDIT');
}
}
default_profile.php 0000604 00000002127 15245605471 0010430 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<?php if (JPluginHelper::isEnabled('user', 'profile')) :
$fields = $this->item->profile->getFieldset('profile'); ?>
<div class="contact-profile" id="users-profile-custom">
<dl class="dl-horizontal">
<?php foreach ($fields as $profile) :
if ($profile->value) :
echo '<dt>'.$profile->label.'</dt>';
$profile->text = htmlspecialchars($profile->value, ENT_COMPAT, 'UTF-8');
switch ($profile->id) :
case 'profile_website' :
$v_http = substr($profile->profile_value, 0, 4);
if ($v_http === 'http') :
echo '<dd><a href="'.$profile->text.'">'.$profile->text.'</a></dd>';
else :
echo '<dd><a href="http://'.$profile->text.'">'.$profile->text.'</a></dd>';
endif;
break;
default:
echo '<dd>'.$profile->text.'</dd>';
break;
endswitch;
endif;
endforeach; ?>
</dl>
</div>
<?php endif; ?>
default_form.php 0000604 00000006363 15245605471 0007741 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::_('behavior.keepalive');
JHtml::_('behavior.formvalidation');
if (isset($this->error)) : ?>
<div class="contact-error">
<?php echo $this->error; ?>
</div>
<?php endif; ?>
<div class="contact-form">
<form id="contact-form" action="<?php echo JRoute::_('index.php'); ?>" method="post" class="form-validate form-horizontal">
<fieldset>
<legend><?php echo JText::_('COM_CONTACT_FORM_LABEL'); ?></legend>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('contact_name'); ?></div>
<div class="controls"><?php echo $this->form->getInput('contact_name'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('contact_email'); ?></div>
<div class="controls"><?php echo $this->form->getInput('contact_email'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('contact_subject'); ?></div>
<div class="controls"><?php echo $this->form->getInput('contact_subject'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('contact_message'); ?></div>
<div class="controls"><?php echo $this->form->getInput('contact_message'); ?></div>
</div>
<?php if ($this->params->get('show_email_copy', 0)){ ?>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('contact_email_copy'); ?></div>
<div class="controls"><?php echo $this->form->getInput('contact_email_copy'); ?></div>
</div>
<?php } ?>
<?php //Dynamically load any additional fields from plugins. ?>
<?php foreach ($this->form->getFieldsets() as $fieldset) : ?>
<?php if ($fieldset->name !== 'contact'):?>
<?php $fields = $this->form->getFieldset($fieldset->name);?>
<?php foreach ($fields as $field) : ?>
<div class="control-group">
<?php if ($field->hidden) : ?>
<div class="controls">
<?php echo $field->input;?>
</div>
<?php else:?>
<div class="control-label">
<?php echo $field->label; ?>
<?php if (!$field->required && $field->type !== 'Spacer') : ?>
<span class="optional"><?php echo JText::_('COM_CONTACT_OPTIONAL');?></span>
<?php endif; ?>
</div>
<div class="controls"><?php echo $field->input;?></div>
<?php endif;?>
</div>
<?php endforeach;?>
<?php endif ?>
<?php endforeach;?>
<div class="form-actions"><button class="btn btn-primary validate" type="submit"><?php echo JText::_('COM_CONTACT_CONTACT_SEND'); ?></button>
<input type="hidden" name="option" value="com_contact" />
<input type="hidden" name="task" value="contact.submit" />
<input type="hidden" name="return" value="<?php echo $this->return_page;?>" />
<input type="hidden" name="id" value="<?php echo $this->contact->slug; ?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
</fieldset>
</form>
</div>
default_links.php 0000604 00000002467 15245605471 0010117 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
if ($this->params->get('presentation_style') === 'sliders') : ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_CONTACT_LINKS'), 'display-links'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtml::_('tabs.panel', JText::_('COM_CONTACT_LINKS'), 'display-links'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_LINKS').'</h3>'; ?>
<?php endif; ?>
<div class="contact-links">
<ul class="nav nav-list">
<?php foreach (range('a', 'e') as $char) :// letters 'a' to 'e'
$link = $this->contact->params->get('link'.$char);
$label = $this->contact->params->get('link'.$char.'_name');
if (!$link) :
continue;
endif;
// Add 'http://' if not present
$link = (0 === strpos($link, 'http')) ? $link : 'http://'.$link;
// If no label is present, take the link
$label = $label ?: $link;
?>
<li>
<a href="<?php echo $link; ?>">
<?php echo $label; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
default_address.php 0000604 00000007025 15245605471 0010417 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/* marker_class: Class based on the selection of text, none, or icons
* jicon-text, jicon-none, jicon-icon
*/
?>
<dl class="contact-address dl-horizontal">
<?php if (($this->contact->address || $this->contact->suburb || $this->contact->state || $this->contact->country || $this->contact->postcode) && ($addressCheck = $this->params->get('address_check') > 0)) : ?>
<?php if ($addressCheck === true) : ?>
<dt>
<span class="<?php echo $this->params->get('marker_class'); ?>" >
<?php echo $this->params->get('marker_address'); ?>
</span>
</dt>
<dd>
<address>
<?php endif; ?>
<?php if ($this->contact->address && $this->params->get('show_street_address')) : ?>
<span class="contact-street">
<?php echo nl2br($this->contact->address); ?>
</span>
<?php endif; ?>
<?php if ($this->contact->suburb && $this->params->get('show_suburb')) : ?>
<span class="contact-suburb">
<?php echo $this->contact->suburb; ?>
</span>
<?php endif; ?>
<?php if ($this->contact->state && $this->params->get('show_state')) : ?>
<span class="contact-state">
<?php echo $this->contact->state; ?>
</span>
<?php endif; ?>
<?php if ($this->contact->postcode && $this->params->get('show_postcode')) : ?>
<span class="contact-postcode">
<?php echo $this->contact->postcode; ?>
</span>
<?php endif; ?>
<?php if ($this->contact->country && $this->params->get('show_country')) : ?>
<span class="contact-country">
<?php echo $this->contact->country; ?>
</span>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->params->get('address_check') > 0) : ?>
</address>
</dd>
<?php endif; ?>
<?php if ($this->contact->email_to && $this->params->get('show_email')) : ?>
<dt>
<span class="<?php echo $this->params->get('marker_class'); ?>" >
<?php echo $this->params->get('marker_email'); ?>
</span>
</dt>
<dd>
<span class="contact-emailto">
<?php echo $this->contact->email_to; ?>
</span>
</dd>
<?php endif; ?>
<?php if ($this->contact->telephone && $this->params->get('show_telephone')) : ?>
<dt>
<span class="<?php echo $this->params->get('marker_class'); ?>" >
<?php echo $this->params->get('marker_telephone'); ?>
</span>
</dt>
<dd>
<span class="contact-telephone">
<?php echo nl2br($this->contact->telephone); ?>
</span>
</dd>
<?php endif; ?>
<?php if ($this->contact->fax && $this->params->get('show_fax')) : ?>
<dt>
<span class="<?php echo $this->params->get('marker_class'); ?>" >
<?php echo $this->params->get('marker_fax'); ?>
</span>
</dt>
<dd>
<span class="contact-fax">
<?php echo nl2br($this->contact->fax); ?>
</span>
</dd>
<?php endif; ?>
<?php if ($this->contact->mobile && $this->params->get('show_mobile')) :?>
<dt>
<span class="<?php echo $this->params->get('marker_class'); ?>" >
<?php echo $this->params->get('marker_mobile'); ?>
</span>
</dt>
<dd>
<span class="contact-mobile">
<?php echo nl2br($this->contact->mobile); ?>
</span>
</dd>
<?php endif; ?>
<?php if ($this->contact->webpage && $this->params->get('show_webpage')) : ?>
<dt>
<span class="<?php echo $this->params->get('marker_class'); ?>" >
</span>
</dt>
<dd>
<span class="contact-webpage">
<a href="<?php echo $this->contact->webpage; ?>" target="_blank" rel="noopener noreferrer">
<?php echo $this->contact->webpage; ?></a>
</span>
</dd>
<?php endif; ?>
</dl>
index.html 0000604 00000000037 15245605471 0006546 0 ustar 00 <!DOCTYPE html><title></title>
default_articles.php 0000604 00000001401 15245605471 0010570 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');
?>
<?php if ($this->params->get('show_articles')) : ?>
<div class="contact-articles">
<ol>
<?php foreach ($this->item->articles as $article) : ?>
<li>
<?php echo JHtml::_('link', JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catid, $article->language)), htmlspecialchars($article->title, ENT_COMPAT, 'UTF-8')); ?>
</li>
<?php endforeach; ?>
</ol>
</div>
<?php endif; ?>
default.php 0000604 00000016374 15245605471 0006721 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$cparams = JComponentHelper::getParams('com_media');
?>
<div class="contact<?php echo $this->pageclass_sfx?>">
<?php if ($this->params->get('show_page_heading')) : ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>
<?php if ($this->contact->name && $this->params->get('show_name')) : ?>
<div class="page-header">
<h2>
<span class="contact-name"><?php echo $this->contact->name; ?></span>
</h2>
</div>
<?php endif; ?>
<?php if ($this->params->get('show_contact_category') === 'show_no_link') : ?>
<h3>
<span class="contact-category"><?php echo $this->contact->category_title; ?></span>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_contact_category') === 'show_with_link') : ?>
<?php $contactLink = ContactHelperRoute::getCategoryRoute($this->contact->catid);?>
<h3>
<span class="contact-category"><a href="<?php echo $contactLink; ?>">
<?php echo $this->escape($this->contact->category_title); ?></a>
</span>
</h3>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($this->params->get('show_contact_list') && count($this->contacts) > 1) : ?>
<form action="#" method="get" name="selectForm" id="selectForm">
<label for="select_contact"><?php echo JText::_('COM_CONTACT_SELECT_CONTACT'); ?></label>
<?php echo JHtml::_('select.genericlist', $this->contacts, 'select_contact', 'class="inputbox" onchange="document.location.href = this.value"', 'link', 'name', $this->contact->link); ?>
</form>
<?php endif; ?>
<?php if (!empty($this->item->tags->itemTags) && $this->params->get('show_tags', 1)) : ?>
<?php $this->item->tagLayout = new JLayoutFile('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ($this->params->get('presentation_style') === 'sliders') : ?>
<?php echo JHtml::_('sliders.start', 'panel-sliders', array('useCookie' => '1')); ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_CONTACT_DETAILS'), 'basic-details'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtml::_('tabs.start', 'tabs', array('useCookie' => '1')); ?>
<?php echo JHtml::_('tabs.panel', JText::_('COM_CONTACT_DETAILS'), 'basic-details'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain'):?>
<?php echo '<h3>' . JText::_('COM_CONTACT_DETAILS') . '</h3>'; ?>
<?php endif; ?>
<?php if ($this->contact->image && $this->params->get('show_image')) : ?>
<div class="thumbnail pull-right">
<?php echo JHtml::_('image', $this->contact->image, htmlspecialchars($this->contact->name, ENT_QUOTES, 'UTF-8'), array('style' => 'vertical-align: middle;')); ?>
</div>
<?php endif; ?>
<?php if ($this->contact->con_position && $this->params->get('show_position')) : ?>
<dl class="contact-position dl-horizontal">
<dt><?php echo JText::_('COM_CONTACT_POSITION'); ?>:</dt>
<dd>
<?php echo $this->contact->con_position; ?>
</dd>
</dl>
<?php endif; ?>
<?php echo $this->loadTemplate('address'); ?>
<?php if ($this->params->get('allow_vcard')) : ?>
<?php echo JText::_('COM_CONTACT_DOWNLOAD_INFORMATION_AS');?>
<a href="<?php echo JRoute::_('index.php?option=com_contact&view=contact&id='.$this->contact->id . '&format=vcf'); ?>">
<?php echo JText::_('COM_CONTACT_VCARD');?></a>
<?php endif; ?>
<?php if (($this->contact->email_to || $this->contact->user_id) && $this->params->get('show_email_form')) : ?>
<?php if ($this->params->get('presentation_style') === 'sliders') : ?>
<?php echo JHtml::_('sliders.panel', JText::_('COM_CONTACT_EMAIL_FORM'), 'display-form'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtml::_('tabs.panel', JText::_('COM_CONTACT_EMAIL_FORM'), 'display-form'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_EMAIL_FORM').'</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('form'); ?>
<?php endif; ?>
<?php if ($this->params->get('show_links')) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($this->contact->user_id && $this->contact->articles && $this->params->get('show_articles')) : ?>
<?php if ($this->params->get('presentation_style') === 'sliders') :
echo JHtml::_('sliders.panel', JText::_('JGLOBAL_ARTICLES'), 'display-articles'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtml::_('tabs.panel', JText::_('JGLOBAL_ARTICLES'), 'display-articles'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain'):?>
<?php echo '<h3>'. JText::_('JGLOBAL_ARTICLES').'</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('articles'); ?>
<?php endif; ?>
<?php if ($this->contact->user_id && $this->params->get('show_profile') && JPluginHelper::isEnabled('user', 'profile')) : ?>
<?php if ($this->params->get('presentation_style') === 'sliders') :
echo JHtml::_('sliders.panel', JText::_('COM_CONTACT_PROFILE'), 'display-profile'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtml::_('tabs.panel', JText::_('COM_CONTACT_PROFILE'), 'display-profile'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_PROFILE').'</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('profile'); ?>
<?php endif; ?>
<?php if ($this->contactUser && $this->params->get('show_user_custom_fields')) : ?>
<?php echo $this->loadTemplate('user_custom_fields'); ?>
<?php endif; ?>
<?php if ($this->contact->misc && $this->params->get('show_misc')) : ?>
<?php if ($this->params->get('presentation_style') === 'sliders') :
echo JHtml::_('sliders.panel', JText::_('COM_CONTACT_OTHER_INFORMATION'), 'display-misc'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtml::_('tabs.panel', JText::_('COM_CONTACT_OTHER_INFORMATION'), 'display-misc'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_OTHER_INFORMATION').'</h3>'; ?>
<?php endif; ?>
<div class="contact-miscinfo">
<dl class="dl-horizontal">
<dt>
<span class="<?php echo $this->params->get('marker_class'); ?>">
<?php echo $this->params->get('marker_misc'); ?>
</span>
</dt>
<dd>
<span class="contact-misc">
<?php echo $this->contact->misc; ?>
</span>
</dd>
</dl>
</div>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'sliders') : ?>
<?php echo JHtml::_('sliders.end'); ?>
<?php elseif ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtml::_('tabs.end'); ?>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>
default_user_custom_fields.php 0000604 00000003723 15245605471 0012671 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$params = $this->params;
$displayGroups = $params->get('show_user_custom_fields');
$userFieldGroups = array();
?>
<?php if (!$displayGroups || !$this->contactUser) : ?>
<?php return; ?>
<?php endif; ?>
<?php foreach ($this->contactUser->jcfields as $field) :?>
<?php if (!in_array('-1', $displayGroups) && (!$field->group_id || !in_array($field->group_id, $displayGroups))) : ?>
<?php continue; ?>
<?php endif; ?>
<?php if (!array_key_exists($field->group_title, $userFieldGroups)) : ?>
<?php $userFieldGroups[$field->group_title] = array();?>
<?php endif; ?>
<?php $userFieldGroups[$field->group_title][] = $field;?>
<?php endforeach; ?>
<?php foreach ($userFieldGroups as $groupTitle => $fields) :?>
<?php $id = JApplicationHelper::stringURLSafe($groupTitle); ?>
<?php if ($this->params->get('presentation_style') === 'sliders') :
echo JHtml::_('sliders.panel', $groupTitle ?: JText::_('COM_CONTACT_USER_FIELDS'), 'display-' . $id); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'tabs') : ?>
<?php echo JHtml::_('tabs.panel', $groupTitle ?: JText::_('COM_CONTACT_USER_FIELDS'), 'display-' . $id); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') === 'plain'):?>
<?php echo '<h3>' . ($groupTitle ?: JText::_('COM_CONTACT_USER_FIELDS')) . '</h3>'; ?>
<?php endif; ?>
<div class="contact-profile" id="user-custom-fields-<?php echo $id; ?>">
<dl class="dl-horizontal">
<?php foreach ($fields as $field) :?>
<?php if (!$field->value) : ?>
<?php continue; ?>
<?php endif; ?>
<?php echo '<dt>' . $field->label . '</dt>'; ?>
<?php echo '<dd>' . $field->value . '</dd>'; ?>
<?php endforeach; ?>
</dl>
</div>
<?php endforeach; ?>
tmpl/edit_params.php 0000604 00000001727 15245622275 0010536 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_contact
*
* @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
* @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));
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; ?>
tmpl/edit_metadata.php 0000604 00000000504 15245622275 0011023 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_contact
*
* @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
echo JLayoutHelper::render('joomla.edit.metadata', $this);
tmpl/modal_metadata.php 0000604 00000000504 15245622275 0011172 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_contact
*
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
echo JLayoutHelper::render('joomla.edit.metadata', $this);
tmpl/modal_params.php 0000604 00000001727 15245622275 0010705 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_contact
*
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
* @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));
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; ?>
tmpl/edit.php 0000604 00000011647 15245622275 0007175 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_contact
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @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.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', '#jform_catid', null, array('disable_search_threshold' => 0 ));
JHtml::_('formbehavior.chosen', '#jform_tags', null, array('placeholder_text_multiple' => JText::_('JGLOBAL_TYPE_OR_SELECT_SOME_TAGS')));
JHtml::_('formbehavior.chosen', 'select');
$app = JFactory::getApplication();
$input = $app->input;
$assoc = JLanguageAssociations::isEnabled();
JFactory::getDocument()->addScriptDeclaration('
Joomla.submitbutton = function(task)
{
if (task == "contact.cancel" || document.formvalidator.isValid(document.getElementById("contact-form")))
{
' . $this->form->getField('misc')->save() . '
Joomla.submitform(task, document.getElementById("contact-form"));
// @deprecated 4.0 The following js is not needed since 3.7.0.
if (task !== "contact.apply")
{
window.parent.jQuery("#contactEdit' . $this->item->id . 'Modal").modal("hide");
}
}
};
');
// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
$this->ignore_fieldsets = array('details', 'item_associations', 'jmetadata');
// In case of modal
$isModal = $input->get('layout') == 'modal' ? true : false;
$layout = $isModal ? 'modal' : 'edit';
$tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=component' : '';
?>
<form action="<?php echo JRoute::_('index.php?option=com_contact&layout=' . $layout . $tmpl . '&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="contact-form" class="form-validate">
<?php echo JLayoutHelper::render('joomla.edit.title_alias', $this); ?>
<div class="form-horizontal">
<?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') : JText::_('COM_CONTACT_EDIT_CONTACT')); ?>
<div class="row-fluid">
<div class="span9">
<div class="row-fluid form-horizontal-desktop float-cols" >
<div class="span6">
<?php echo $this->form->renderField('user_id'); ?>
<?php echo $this->form->renderField('image'); ?>
<?php echo $this->form->renderField('con_position'); ?>
<?php echo $this->form->renderField('email_to'); ?>
<?php echo $this->form->renderField('address'); ?>
<?php echo $this->form->renderField('suburb'); ?>
<?php echo $this->form->renderField('state'); ?>
<?php echo $this->form->renderField('postcode'); ?>
<?php echo $this->form->renderField('country'); ?>
</div>
<div class="span6">
<?php echo $this->form->renderField('telephone'); ?>
<?php echo $this->form->renderField('mobile'); ?>
<?php echo $this->form->renderField('fax'); ?>
<?php echo $this->form->renderField('webpage'); ?>
<?php echo $this->form->renderField('sortname1'); ?>
<?php echo $this->form->renderField('sortname2'); ?>
<?php echo $this->form->renderField('sortname3'); ?>
</div>
</div>
</div>
<div class="span3">
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'misc', JText::_('JGLOBAL_FIELDSET_MISCELLANEOUS')); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="form-vertical">
<?php echo $this->form->renderField('misc'); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JLayoutHelper::render('joomla.edit.params', $this); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'publishing', JText::_('JGLOBAL_FIELDSET_PUBLISHING')); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span6">
<?php echo JLayoutHelper::render('joomla.edit.publishingdata', $this); ?>
</div>
<div class="span6">
<?php echo JLayoutHelper::render('joomla.edit.metadata', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php if ( ! $isModal && $assoc) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'associations', JText::_('JGLOBAL_FIELDSET_ASSOCIATIONS')); ?>
<?php echo $this->loadTemplate('associations'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php elseif ($isModal && $assoc) : ?>
<div class="hidden"><?php echo $this->loadTemplate('associations'); ?></div>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
</div>
<input type="hidden" name="task" value="" />
<input type="hidden" name="forcedLanguage" value="<?php echo $input->get('forcedLanguage', '', 'cmd'); ?>" />
<?php echo JHtml::_('form.token'); ?>
</form>
tmpl/modal_associations.php 0000604 00000000510 15245622275 0012106 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_contact
*
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
echo JLayoutHelper::render('joomla.edit.associations', $this);
tmpl/modal.php 0000604 00000002541 15245622275 0007335 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_contact
*
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom'));
// @deprecated 4.0 the function parameter, the inline js and the buttons are not needed since 3.7.0.
$function = JFactory::getApplication()->input->getCmd('function', 'jEditContact_' . (int) $this->item->id);
// Function to update input title when changed
JFactory::getDocument()->addScriptDeclaration('
function jEditContactModal() {
if (window.parent && document.formvalidator.isValid(document.getElementById("contact-form"))) {
return window.parent.' . $this->escape($function) . '(document.getElementById("jform_name").value);
}
}
');
?>
<button id="applyBtn" type="button" class="hidden" onclick="Joomla.submitbutton('contact.apply'); jEditContactModal();"></button>
<button id="saveBtn" type="button" class="hidden" onclick="Joomla.submitbutton('contact.save'); jEditContactModal();"></button>
<button id="closeBtn" type="button" class="hidden" onclick="Joomla.submitbutton('contact.cancel');"></button>
<div class="container-popup">
<?php $this->setLayout('edit'); ?>
<?php echo $this->loadTemplate(); ?>
</div>
tmpl/edit_associations.php 0000604 00000000510 15245622275 0011737 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_contact
*
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
echo JLayoutHelper::render('joomla.edit.associations', $this);
encyclopedia.php 0000604 00000005601 15245673154 0007726 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Templates.beez3
*
* @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$cparams = JComponentHelper::getParams('com_media');
?>
<div class="contact<?php echo $this->pageclass_sfx?>">
<?php $contactLink = ContactHelperRoute::getCategoryRoute($this->contact->catid);?>
<h3>
<span class="contact-category"><a href="<?php echo $contactLink; ?>">
<?php echo $this->escape($this->contact->category_title); ?></a>
</span>
</h3>
<?php if ($this->contact->name && $this->params->get('show_name')) : ?>
<h2>
<span class="contact-name"><?php echo $this->contact->name; ?></span>
</h2>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<div class="encyclopedia_col1">
<?php if ($this->contact->image ) : ?>
<div class="contact-image">
<?php // We are going to use the contact address field for the main image caption.
// If we have a caption load the caption behavior. ?>
<?php if ($this->contact->address)
{
JHtml::_('behavior.caption');
}?>
<?php echo JHtml::_('image', $this->contact->image, $this->contact->name, array('align' => 'middle', 'class' => 'caption', 'title' => $this->contact->address)); ?>
</div>
<?php endif; ?>
</div>
<div class="encyclopedia_col2">
<?php // We are going to use some of the standard content fields in non standard ways. ?>
<div class="contact-miscinfo">
<div class="contact-misc">
<?php echo $this->contact->misc; ?>
</div>
</div>
<?php //Let's use position for the scientific name. ?>
<?php if ($this->contact->con_position && $this->params->get('show_position')) : ?>
<p class="contact-position"><?php echo $this->contact->con_position; ?></p>
<?php endif; ?>
<?php //Let's use state to put the family name. ?>
<?php if ($this->contact->state && $this->params->get('show_state')) : ?>
<p class="contact-state"><?php echo $this->contact->state; ?></p>
<?php endif; ?>
<?php // Let's use country to list the main countries it grows in. ?>
<?php if ($this->contact->country && $this->params->get('show_country')) : ?>
<p class="contact-country"><?php echo $this->contact->country; ?></p>
<?php endif; ?>
</div>
<div class="clr"> </div>
<?php if ($this->params->get('presentation_style') !== 'plain'):?>
<?php echo JHtml::_($this->params->get('presentation_style').'.start', 'contact-slider'); ?>
<?php endif ?>
<div class="encyclopedia_links">
<?php echo $this->loadTemplate('links'); ?>
</div>
<?php if ($this->params->get('presentation_style') !== 'plain'):?>
<?php echo JHtml::_($this->params->get('presentation_style').'.end'); ?>
<?php endif; ?>
</div>
<?php echo $this->item->event->afterDisplayContent; ?>