diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index 6339edb9fc2b9..22c7cfe0a3b71 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -348,6 +348,7 @@ protected function updateManifestCaches() array('plugin', 'urlinstaller', 'installer', 0), array('plugin', 'phpversioncheck', 'quickicon', 0), array('plugin', 'menu', 'editors-xtd', 0), + array('plugin', 'contact', 'editors-xtd', 0), // Templates array('template', 'beez3', '', 0), diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-10-01.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-10-01.sql new file mode 100644 index 0000000000000..0eac30c0aa2ef --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-10-01.sql @@ -0,0 +1,2 @@ +INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES +(460, 'plg_editors-xtd_contact', 'plugin', 'contact', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-10-01.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-10-01.sql new file mode 100644 index 0000000000000..3e5604675df12 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-10-01.sql @@ -0,0 +1,2 @@ +INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES +(460, 'plg_editors-xtd_contact', 'plugin', 'contact', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-10-01.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-10-01.sql new file mode 100644 index 0000000000000..d975345be02cb --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2016-10-01.sql @@ -0,0 +1,6 @@ +SET IDENTITY_INSERT [#__extensions] ON; + +INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) +SELECT 460, 'plg_editors-xtd_contact', 'plugin', 'contact', 'editors-xtd', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; + +SET IDENTITY_INSERT [#__extensions] OFF; diff --git a/administrator/components/com_banners/models/forms/banner.xml b/administrator/components/com_banners/models/forms/banner.xml index c581f14ea3712..dd0e73660b86a 100644 --- a/administrator/components/com_banners/models/forms/banner.xml +++ b/administrator/components/com_banners/models/forms/banner.xml @@ -92,7 +92,7 @@ description="COM_BANNERS_FIELD_DESCRIPTION_DESC" filter="JComponentHelper::filterText" buttons="true" - hide="readmore,pagebreak,module,article" + hide="readmore,pagebreak,module,article,contact" /> ' + title + ''; + jInsertEditorText(tag, '" . $name . "'); + jModalClose(); + }"; + + JFactory::getDocument()->addScriptDeclaration($js); + + /* + * Use the built-in element view to select the contact. + * Currently uses blank class. + */ + $link = 'index.php?option=com_contact&view=contacts&layout=modal&tmpl=component&' . JSession::getFormToken() . '=1'; + + $button = new JObject; + $button->modal = true; + $button->class = 'btn'; + $button->link = $link; + $button->text = JText::_('PLG_EDITORS-XTD_CONTACT_BUTTON_CONTACT'); + $button->name = 'address'; + $button->options = "{handler: 'iframe', size: {x: 800, y: 500}}"; + + return $button; + } +} diff --git a/plugins/editors-xtd/contact/contact.xml b/plugins/editors-xtd/contact/contact.xml new file mode 100644 index 0000000000000..39faff7bb90b7 --- /dev/null +++ b/plugins/editors-xtd/contact/contact.xml @@ -0,0 +1,19 @@ + + + plg_editors-xtd_contact + Joomla! Project + October 2016 + Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. + GNU General Public License version 2 or later; see LICENSE.txt + admin@joomla.org + www.joomla.org + __DEPLOY_VERSION__ + PLG_EDITORS-XTD_CONTACT_XML_DESCRIPTION + + contact.php + + + en-GB.plg_editors-xtd_contact.ini + en-GB.plg_editors-xtd_contact.sys.ini + +