added dynamic email helper fields to the global settings of all components that use the email helper class

This commit is contained in:
2016-12-22 23:32:13 +02:00
parent 0cd5660141
commit 829384a56b
382 changed files with 1919 additions and 1347 deletions

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.4
@build 25th November, 2016
@version 2.2.5
@build 22nd December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippets.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -61,7 +61,8 @@ class JFormFieldSnippets extends JFormFieldList
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$jinput = JFactory::getApplication()->input;
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
@ -78,7 +79,7 @@ class JFormFieldSnippets extends JFormFieldList
}
$user = JFactory::getUser();
// only add if user allowed to create snippet
if ($user->authorise('core.create', 'com_componentbuilder'))
if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
@ -91,7 +92,7 @@ class JFormFieldSnippets extends JFormFieldList
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit snippet
if (($buttonName == 'snippet' || $buttonName == 'snippets') && $user->authorise('core.edit', 'com_componentbuilder'))
if (($buttonName == 'snippet' || $buttonName == 'snippets') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);