Improved the getActions helper method, also added ->params to custom views.
This commit is contained in:
parent
38176365de
commit
2e758308d2
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.0) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.1) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -125,11 +125,11 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 14th September, 2018
|
||||
+ *Version*: 2.9.0
|
||||
+ *Last Build*: 19th September, 2018
|
||||
+ *Version*: 2.9.1
|
||||
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **193091**
|
||||
+ *Line count*: **193291**
|
||||
+ *Field count*: **1081**
|
||||
+ *File count*: **1273**
|
||||
+ *Folder count*: **201**
|
||||
|
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.0) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.1) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -125,11 +125,11 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 14th September, 2018
|
||||
+ *Version*: 2.9.0
|
||||
+ *Last Build*: 19th September, 2018
|
||||
+ *Version*: 2.9.1
|
||||
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **193091**
|
||||
+ *Line count*: **193291**
|
||||
+ *Field count*: **1081**
|
||||
+ *File count*: **1273**
|
||||
+ *Folder count*: **201**
|
||||
|
@ -306,11 +306,13 @@ abstract class ###Component###Helper
|
||||
* @param string $view The related view name
|
||||
* @param int $record The item to act upon
|
||||
* @param string $views The related list view name
|
||||
* @param mixed $target Only get this permission (like edit, create, delete)
|
||||
* @param string $component The target component
|
||||
*
|
||||
* @return object The JObject of permission/authorised actions
|
||||
*
|
||||
**/
|
||||
public static function getActions($view, &$record = null, $views = null)
|
||||
public static function getActions($view, &$record = null, $views = null, $target = null, $component = '###component###')
|
||||
{
|
||||
// get the user object
|
||||
$user = JFactory::getUser();
|
||||
@ -324,7 +326,7 @@ abstract class ###Component###Helper
|
||||
}
|
||||
// get all actions from component
|
||||
$actions = JAccess::getActionsFromFile(
|
||||
JPATH_ADMINISTRATOR . '/components/com_###component###/access.xml',
|
||||
JPATH_ADMINISTRATOR . '/components/com_' . $component . '/access.xml',
|
||||
"/access/section[@name='component']/"
|
||||
);
|
||||
// if non found then return empty JObject
|
||||
@ -335,13 +337,33 @@ abstract class ###Component###Helper
|
||||
// get created by if not found
|
||||
if (self::checkObject($record) && !isset($record->created_by) && isset($record->id))
|
||||
{
|
||||
$record->created_by = self::getVar($view, 'id', $record->id, 'created_by');
|
||||
$record->created_by = self::getVar($view, $record->id, 'id', 'created_by', '=', $component);
|
||||
}
|
||||
// set actions only set in component settings
|
||||
$componentActions = array('core.admin', 'core.manage', 'core.options', 'core.export');
|
||||
// check if we have a target
|
||||
$checkTarget = false;
|
||||
if ($target)
|
||||
{
|
||||
// convert to an array
|
||||
if (self::checkString($target))
|
||||
{
|
||||
$target = array($target);
|
||||
}
|
||||
// check if we are good to go
|
||||
if (self::checkArray($target))
|
||||
{
|
||||
$checkTarget = true;
|
||||
}
|
||||
}
|
||||
// loop the actions and set the permissions
|
||||
foreach ($actions as $action)
|
||||
{
|
||||
// check target action filter
|
||||
if ($checkTarget && self::filterActions($view, $action->name, $target))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// set to use component default
|
||||
$fallback = true;
|
||||
// reset permission per/action
|
||||
@ -356,7 +378,7 @@ abstract class ###Component###Helper
|
||||
// we are in item
|
||||
$area = 'item';
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise($action->name, 'com_###component###.' . $view . '.' . (int) $record->id);
|
||||
$permission = $user->authorise($action->name, 'com_' . $component . '.' . $view . '.' . (int) $record->id);
|
||||
// if no permission found, check edit own
|
||||
if (!$permission)
|
||||
{
|
||||
@ -366,8 +388,8 @@ abstract class ###Component###Helper
|
||||
// the correct target
|
||||
$coreCheck = (array) explode('.', $action->name);
|
||||
// check that we have both local and global access
|
||||
if ($user->authorise($coreCheck[0] . '.edit.own', 'com_###component###.' . $view . '.' . (int) $record->id) &&
|
||||
$user->authorise($coreCheck[0] . '.edit.own', 'com_###component###'))
|
||||
if ($user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component . '.' . $view . '.' . (int) $record->id) &&
|
||||
$user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component))
|
||||
{
|
||||
// allow edit
|
||||
$result->set($action->name, true);
|
||||
@ -401,15 +423,15 @@ abstract class ###Component###Helper
|
||||
$categoryCheck = $action->name;
|
||||
}
|
||||
// The record has a category. Check the category permissions.
|
||||
$catpermission = $user->authorise($categoryCheck, 'com_###component###.' . $views . '.category.' . (int) $record->catid);
|
||||
$catpermission = $user->authorise($categoryCheck, 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid);
|
||||
if (!$catpermission && !is_null($catpermission))
|
||||
{
|
||||
// With edit, if the created_by matches current user then dig deeper.
|
||||
if (($action->name === 'core.edit' || $action->name === $view . '.edit') && $record->created_by > 0 && ($record->created_by == $user->id))
|
||||
{
|
||||
// check that we have both local and global access
|
||||
if ($user->authorise('core.edit.own', 'com_###component###.' . $views . '.category.' . (int) $record->catid) &&
|
||||
$user->authorise($core . '.edit.own', 'com_###component###'))
|
||||
if ($user->authorise('core.edit.own', 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid) &&
|
||||
$user->authorise($core . '.edit.own', 'com_' . $component))
|
||||
{
|
||||
// allow edit
|
||||
$result->set($action->name, true);
|
||||
@ -441,13 +463,36 @@ abstract class ###Component###Helper
|
||||
// Since items are created by users and global permissions is set by system admin.
|
||||
else
|
||||
{
|
||||
$result->set($action->name, $user->authorise($action->name, 'com_###component###'));
|
||||
$result->set($action->name, $user->authorise($action->name, 'com_' . $component));
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the action permissions
|
||||
*
|
||||
* @param string $action The action to check
|
||||
* @param array $targets The array of target actions
|
||||
*
|
||||
* @return boolean true if action should be filtered out
|
||||
*
|
||||
**/
|
||||
protected static function filterActions(&$view, &$action, &$targets)
|
||||
{
|
||||
foreach ($targets as $target)
|
||||
{
|
||||
if (strpos($action, $view . '.' . $target) !== false ||
|
||||
strpos($action, 'core.' . $target) !== false)
|
||||
{
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get any component's model
|
||||
**/
|
||||
|
@ -621,11 +621,13 @@ abstract class ###Component###Helper
|
||||
* @param string $view The related view name
|
||||
* @param int $record The item to act upon
|
||||
* @param string $views The related list view name
|
||||
* @param mixed $target Only get this permission (like edit, create, delete)
|
||||
* @param string $component The target component
|
||||
*
|
||||
* @return object The JObject of permission/authorised actions
|
||||
*
|
||||
**/
|
||||
public static function getActions($view, &$record = null, $views = null)
|
||||
public static function getActions($view, &$record = null, $views = null, $target = null, $component = '###component###')
|
||||
{
|
||||
// get the user object
|
||||
$user = JFactory::getUser();
|
||||
@ -639,7 +641,7 @@ abstract class ###Component###Helper
|
||||
}
|
||||
// get all actions from component
|
||||
$actions = JAccess::getActionsFromFile(
|
||||
JPATH_ADMINISTRATOR . '/components/com_###component###/access.xml',
|
||||
JPATH_ADMINISTRATOR . '/components/com_' . $component . '/access.xml',
|
||||
"/access/section[@name='component']/"
|
||||
);
|
||||
// if non found then return empty JObject
|
||||
@ -650,13 +652,33 @@ abstract class ###Component###Helper
|
||||
// get created by if not found
|
||||
if (self::checkObject($record) && !isset($record->created_by) && isset($record->id))
|
||||
{
|
||||
$record->created_by = self::getVar($view, 'id', $record->id, 'created_by');
|
||||
$record->created_by = self::getVar($view, $record->id, 'id', 'created_by', '=', $component);
|
||||
}
|
||||
// set actions only set in component settings
|
||||
$componentActions = array('core.admin', 'core.manage', 'core.options', 'core.export');
|
||||
// check if we have a target
|
||||
$checkTarget = false;
|
||||
if ($target)
|
||||
{
|
||||
// convert to an array
|
||||
if (self::checkString($target))
|
||||
{
|
||||
$target = array($target);
|
||||
}
|
||||
// check if we are good to go
|
||||
if (self::checkArray($target))
|
||||
{
|
||||
$checkTarget = true;
|
||||
}
|
||||
}
|
||||
// loop the actions and set the permissions
|
||||
foreach ($actions as $action)
|
||||
{
|
||||
// check target action filter
|
||||
if ($checkTarget && self::filterActions($view, $action->name, $target))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// set to use component default
|
||||
$fallback = true;
|
||||
// reset permission per/action
|
||||
@ -671,7 +693,7 @@ abstract class ###Component###Helper
|
||||
// we are in item
|
||||
$area = 'item';
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise($action->name, 'com_###component###.' . $view . '.' . (int) $record->id);
|
||||
$permission = $user->authorise($action->name, 'com_' . $component . '.' . $view . '.' . (int) $record->id);
|
||||
// if no permission found, check edit own
|
||||
if (!$permission)
|
||||
{
|
||||
@ -681,8 +703,8 @@ abstract class ###Component###Helper
|
||||
// the correct target
|
||||
$coreCheck = (array) explode('.', $action->name);
|
||||
// check that we have both local and global access
|
||||
if ($user->authorise($coreCheck[0] . '.edit.own', 'com_###component###.' . $view . '.' . (int) $record->id) &&
|
||||
$user->authorise($coreCheck[0] . '.edit.own', 'com_###component###'))
|
||||
if ($user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component . '.' . $view . '.' . (int) $record->id) &&
|
||||
$user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component))
|
||||
{
|
||||
// allow edit
|
||||
$result->set($action->name, true);
|
||||
@ -716,15 +738,15 @@ abstract class ###Component###Helper
|
||||
$categoryCheck = $action->name;
|
||||
}
|
||||
// The record has a category. Check the category permissions.
|
||||
$catpermission = $user->authorise($categoryCheck, 'com_###component###.' . $views . '.category.' . (int) $record->catid);
|
||||
$catpermission = $user->authorise($categoryCheck, 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid);
|
||||
if (!$catpermission && !is_null($catpermission))
|
||||
{
|
||||
// With edit, if the created_by matches current user then dig deeper.
|
||||
if (($action->name === 'core.edit' || $action->name === $view . '.edit') && $record->created_by > 0 && ($record->created_by == $user->id))
|
||||
{
|
||||
// check that we have both local and global access
|
||||
if ($user->authorise('core.edit.own', 'com_###component###.' . $views . '.category.' . (int) $record->catid) &&
|
||||
$user->authorise($core . '.edit.own', 'com_###component###'))
|
||||
if ($user->authorise('core.edit.own', 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid) &&
|
||||
$user->authorise($core . '.edit.own', 'com_' . $component))
|
||||
{
|
||||
// allow edit
|
||||
$result->set($action->name, true);
|
||||
@ -756,13 +778,36 @@ abstract class ###Component###Helper
|
||||
// Since items are created by users and global permissions is set by system admin.
|
||||
else
|
||||
{
|
||||
$result->set($action->name, $user->authorise($action->name, 'com_###component###'));
|
||||
$result->set($action->name, $user->authorise($action->name, 'com_' . $component));
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the action permissions
|
||||
*
|
||||
* @param string $action The action to check
|
||||
* @param array $targets The array of target actions
|
||||
*
|
||||
* @return boolean true if action should be filtered out
|
||||
*
|
||||
**/
|
||||
protected static function filterActions(&$view, &$action, &$targets)
|
||||
{
|
||||
foreach ($targets as $target)
|
||||
{
|
||||
if (strpos($action, $view . '.' . $target) !== false ||
|
||||
strpos($action, 'core.' . $target) !== false)
|
||||
{
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if have an json string
|
||||
*
|
||||
|
@ -28,6 +28,8 @@ class ###Component###View###View### extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_###component###');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -28,6 +28,8 @@ class ###Component###View###View### extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_###component###');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
@ -119,7 +121,7 @@ class ###Component###View###View### extends JViewLegacy
|
||||
$this->document = JFactory::getDocument();
|
||||
}
|
||||
$this->document->setTitle(JText::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
|
||||
// we need this to fix the form display
|
||||
// we need this to fix the form display (TODO)
|
||||
$this->document->addStyleSheet(JURI::root()."administrator/templates/isis/css/template.css", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
|
||||
$this->document->addScript(JURI::root()."administrator/templates/isis/js/template.js", (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
|
||||
// the default style of this view
|
||||
|
@ -22,7 +22,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_###component###');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
###EDITBODYFADEIN###
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_###component###&layout=edit&id='. (int) $this->item->id . $this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
|
@ -24,7 +24,7 @@ JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('behavior.tabstate');
|
||||
JHtml::_('behavior.calendar');
|
||||
$componentParams = JComponentHelper::getParams('com_###component###');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<?php echo $this->toolbar->render(); ?>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_###component###&layout=edit&id='. (int) $this->item->id . $this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
|
@ -3666,6 +3666,13 @@ abstract class ComponentbuilderHelper
|
||||
// check if we found any
|
||||
if (self::checkString($url))
|
||||
{
|
||||
// get the global settings
|
||||
if (!self::checkObject(self::$params))
|
||||
{
|
||||
self::$params = JComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
// get UIKIT version
|
||||
$uikit = self::$params->get('uikit_version', 2);
|
||||
// check that we have the ID
|
||||
if (self::checkObject($item) && isset($item->id))
|
||||
{
|
||||
@ -3687,15 +3694,38 @@ abstract class ComponentbuilderHelper
|
||||
$title = self::safeString(JText::_('COM_COMPONENTBUILDER_EDIT') . ' ' . $view, 'W');
|
||||
// check that there is a check message
|
||||
if (self::checkString($headsup))
|
||||
{
|
||||
if (3 == $uikit)
|
||||
{
|
||||
$href = 'onclick="UIkit.modal.confirm(\''.JText::_($headsup).'\').then( function(){ window.location.href = \'' . $url . '\' } )" href="javascript:void(0)"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$href = 'onclick="UIkit2.modal.confirm(\''.JText::_($headsup).'\', function(){ window.location.href = \'' . $url . '\' })" href="javascript:void(0)"';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$href = 'href="' . $url . '"';
|
||||
}
|
||||
// return UIKIT version 3
|
||||
if (3 == $uikit)
|
||||
{
|
||||
// check if it is checked out
|
||||
if (isset($checked_out) && $checked_out > 0)
|
||||
{
|
||||
// is this user the one who checked it out
|
||||
if ($checked_out == JFactory::getUser()->id)
|
||||
{
|
||||
return ' <a ' . $href . ' uk-icon="icon: lock" title="' . $title . '"></a>';
|
||||
}
|
||||
return ' <a href="#" disabled uk-icon="icon: lock" title="' . JText::sprintf('COM_COMPONENTBUILDER__HAS_BEEN_CHECKED_OUT_BY_S', self::safeString($view, 'W'), JFactory::getUser($checked_out)->name) . '"></a>';
|
||||
}
|
||||
// return normal edit link
|
||||
return ' <a ' . $href . ' uk-icon="icon: pencil" title="' . $title . '"></a>';
|
||||
}
|
||||
// check if it is checked out (return UIKIT version 2)
|
||||
if (isset($checked_out) && $checked_out > 0)
|
||||
{
|
||||
// is this user the one who checked it out
|
||||
if ($checked_out == JFactory::getUser()->id)
|
||||
@ -3725,53 +3755,45 @@ abstract class ComponentbuilderHelper
|
||||
*/
|
||||
public static function getEditURL(&$item, $view, $views, $ref = '', $component = 'com_componentbuilder', $jRoute = true)
|
||||
{
|
||||
// build record
|
||||
$record = new stdClass();
|
||||
// check that we have the ID
|
||||
if (self::checkObject($item) && isset($item->id))
|
||||
{
|
||||
$id = (int) $item->id;
|
||||
$record->id = (int) $item->id;
|
||||
// check if created_by is available
|
||||
if (isset($item->created_by) && $item->created_by > 0)
|
||||
{
|
||||
$created_by = (int) $item->created_by;
|
||||
$record->created_by = (int) $item->created_by;
|
||||
}
|
||||
}
|
||||
elseif (self::checkArray($item) && isset($item['id']))
|
||||
{
|
||||
$id = (int) $item['id'];
|
||||
$record->id = (int) $item['id'];
|
||||
// check if created_by is available
|
||||
if (isset($item['created_by']) && $item['created_by'] > 0)
|
||||
{
|
||||
$created_by = (int) $item['created_by'];
|
||||
$record->created_by = (int) $item['created_by'];
|
||||
}
|
||||
}
|
||||
elseif (is_numeric($item))
|
||||
{
|
||||
$id = (int) $item;
|
||||
$record->id = (int) $item;
|
||||
}
|
||||
// check ID
|
||||
if (isset($id) && $id > 0)
|
||||
if (isset($record->id) && $record->id > 0)
|
||||
{
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
// get user action permission to edit
|
||||
$action = self::getActions($view, $record, $views, 'edit', str_replace('com_', '', $component));
|
||||
// can edit
|
||||
if ($user->authorise($view . '.edit', $component . '.' . $view . '.' . (int) $id) ||
|
||||
(
|
||||
isset($created_by) && $created_by == $user->id &&
|
||||
(
|
||||
($user->authorise($view . '.edit.own', $component . '.' . $view . '.' . (int) $id) &&
|
||||
$user->authorise($view . '.edit.own', $component)) ||
|
||||
($user->authorise('core.edit.own', $component . '.' . $view . '.' . (int) $id) &&
|
||||
$user->authorise('core.edit.own', $component))
|
||||
)
|
||||
)
|
||||
)
|
||||
if ($action->get($view . '.edit'))
|
||||
{
|
||||
// set the edit link
|
||||
if ($jRoute)
|
||||
{
|
||||
return JRoute::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $id . $ref);
|
||||
return JRoute::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref);
|
||||
}
|
||||
return "index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $id . $ref;
|
||||
return "index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@ -4566,11 +4588,13 @@ abstract class ComponentbuilderHelper
|
||||
* @param string $view The related view name
|
||||
* @param int $record The item to act upon
|
||||
* @param string $views The related list view name
|
||||
* @param mixed $target Only get this permission (like edit, create, delete)
|
||||
* @param string $component The target component
|
||||
*
|
||||
* @return object The JObject of permission/authorised actions
|
||||
*
|
||||
**/
|
||||
public static function getActions($view, &$record = null, $views = null)
|
||||
public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'componentbuilder')
|
||||
{
|
||||
// get the user object
|
||||
$user = JFactory::getUser();
|
||||
@ -4584,7 +4608,7 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
// get all actions from component
|
||||
$actions = JAccess::getActionsFromFile(
|
||||
JPATH_ADMINISTRATOR . '/components/com_componentbuilder/access.xml',
|
||||
JPATH_ADMINISTRATOR . '/components/com_' . $component . '/access.xml',
|
||||
"/access/section[@name='component']/"
|
||||
);
|
||||
// if non found then return empty JObject
|
||||
@ -4595,13 +4619,33 @@ abstract class ComponentbuilderHelper
|
||||
// get created by if not found
|
||||
if (self::checkObject($record) && !isset($record->created_by) && isset($record->id))
|
||||
{
|
||||
$record->created_by = self::getVar($view, 'id', $record->id, 'created_by');
|
||||
$record->created_by = self::getVar($view, $record->id, 'id', 'created_by', '=', $component);
|
||||
}
|
||||
// set actions only set in component settings
|
||||
$componentActions = array('core.admin', 'core.manage', 'core.options', 'core.export');
|
||||
// check if we have a target
|
||||
$checkTarget = false;
|
||||
if ($target)
|
||||
{
|
||||
// convert to an array
|
||||
if (self::checkString($target))
|
||||
{
|
||||
$target = array($target);
|
||||
}
|
||||
// check if we are good to go
|
||||
if (self::checkArray($target))
|
||||
{
|
||||
$checkTarget = true;
|
||||
}
|
||||
}
|
||||
// loop the actions and set the permissions
|
||||
foreach ($actions as $action)
|
||||
{
|
||||
// check target action filter
|
||||
if ($checkTarget && self::filterActions($view, $action->name, $target))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// set to use component default
|
||||
$fallback = true;
|
||||
// reset permission per/action
|
||||
@ -4616,7 +4660,7 @@ abstract class ComponentbuilderHelper
|
||||
// we are in item
|
||||
$area = 'item';
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise($action->name, 'com_componentbuilder.' . $view . '.' . (int) $record->id);
|
||||
$permission = $user->authorise($action->name, 'com_' . $component . '.' . $view . '.' . (int) $record->id);
|
||||
// if no permission found, check edit own
|
||||
if (!$permission)
|
||||
{
|
||||
@ -4626,8 +4670,8 @@ abstract class ComponentbuilderHelper
|
||||
// the correct target
|
||||
$coreCheck = (array) explode('.', $action->name);
|
||||
// check that we have both local and global access
|
||||
if ($user->authorise($coreCheck[0] . '.edit.own', 'com_componentbuilder.' . $view . '.' . (int) $record->id) &&
|
||||
$user->authorise($coreCheck[0] . '.edit.own', 'com_componentbuilder'))
|
||||
if ($user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component . '.' . $view . '.' . (int) $record->id) &&
|
||||
$user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component))
|
||||
{
|
||||
// allow edit
|
||||
$result->set($action->name, true);
|
||||
@ -4661,15 +4705,15 @@ abstract class ComponentbuilderHelper
|
||||
$categoryCheck = $action->name;
|
||||
}
|
||||
// The record has a category. Check the category permissions.
|
||||
$catpermission = $user->authorise($categoryCheck, 'com_componentbuilder.' . $views . '.category.' . (int) $record->catid);
|
||||
$catpermission = $user->authorise($categoryCheck, 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid);
|
||||
if (!$catpermission && !is_null($catpermission))
|
||||
{
|
||||
// With edit, if the created_by matches current user then dig deeper.
|
||||
if (($action->name === 'core.edit' || $action->name === $view . '.edit') && $record->created_by > 0 && ($record->created_by == $user->id))
|
||||
{
|
||||
// check that we have both local and global access
|
||||
if ($user->authorise('core.edit.own', 'com_componentbuilder.' . $views . '.category.' . (int) $record->catid) &&
|
||||
$user->authorise($core . '.edit.own', 'com_componentbuilder'))
|
||||
if ($user->authorise('core.edit.own', 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid) &&
|
||||
$user->authorise($core . '.edit.own', 'com_' . $component))
|
||||
{
|
||||
// allow edit
|
||||
$result->set($action->name, true);
|
||||
@ -4701,13 +4745,36 @@ abstract class ComponentbuilderHelper
|
||||
// Since items are created by users and global permissions is set by system admin.
|
||||
else
|
||||
{
|
||||
$result->set($action->name, $user->authorise($action->name, 'com_componentbuilder'));
|
||||
$result->set($action->name, $user->authorise($action->name, 'com_' . $component));
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the action permissions
|
||||
*
|
||||
* @param string $action The action to check
|
||||
* @param array $targets The array of target actions
|
||||
*
|
||||
* @return boolean true if action should be filtered out
|
||||
*
|
||||
**/
|
||||
protected static function filterActions(&$view, &$action, &$targets)
|
||||
{
|
||||
foreach ($targets as $target)
|
||||
{
|
||||
if (strpos($action, $view . '.' . $target) !== false ||
|
||||
strpos($action, 'core.' . $target) !== false)
|
||||
{
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get any component's model
|
||||
**/
|
||||
|
@ -1569,7 +1569,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name
|
||||
(13, '', 'Provides a meter to show value in a range, updated with jQuery if needed or simply a fixed value.', 'Meter', '{\"properties0\":{\"name\":\"type\",\"example\":\"meter\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be meter.\"},\"properties1\":{\"name\":\"name\",\"example\":\"meter\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Meter\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"width\",\"example\":\"330px\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the width of meter box\"},\"properties4\":{\"name\":\"color\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The background color\"},\"properties5\":{\"name\":\"default\",\"example\":\"9\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"animated\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) lets the bar have strips\"},\"properties7\":{\"name\":\"active\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) lets the strips on the bar move\"},\"properties8\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties9\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties10\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(mandatory) this value is the min on the meter.\"},\"properties11\":{\"name\":\"max\",\"example\":\"20\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(mandatory) this value is the max on meter.\"},\"properties12\":{\"name\":\"step\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Provides a meter to show value in a range.', '', 1, 2, '', ''),
|
||||
(14, '', 'This form field makes it possible to create titles, texts, descriptions and even alert boxes. It also allows you to bring order in the settings for extensions, by separating them with useful titles. Or adding descriptions for certain settings (without having to rely on the tooltips). Or adding any other text you want.', 'Note', '{\"properties0\":{\"name\":\"type\",\"example\":\"note\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be note\"},\"properties1\":{\"name\":\"name\",\"example\":\"note_one\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"The notice\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory or optional if using description) (translatable) is the descriptive title of the note \"},\"properties3\":{\"name\":\"description\",\"example\":\"The notice description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional if using label)(translatable) the description\\/text of the note \"},\"properties4\":{\"name\":\"heading\",\"example\":\"h4\",\"adjustable\":\"1\",\"description\":\"(optional) the type of heading element to use for the label (default: h4)\"},\"properties5\":{\"name\":\"class\",\"example\":\"alert\",\"adjustable\":\"1\",\"description\":\"(optional) a class name (or class names), like these examples ( alert, alert alert-info, alert alert-success, alert alert-error )\"},\"properties6\":{\"name\":\"close\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) a value of \'true\' (for alerts) or the value for the data-dismiss of the bootstrap close icon\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"}}', 'supports a one line text field.', '', 1, 4, '', ''),
|
||||
(15, '', 'Provides a one line text box with up-down handles to set a number in the field.', 'Number', '{\"properties0\":{\"name\":\"type\",\"example\":\"number\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be number.\"},\"properties1\":{\"name\":\"name\",\"example\":\"number\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Number\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties5\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) this value is the lowest on the list.\"},\"properties8\":{\"name\":\"max\",\"example\":\"40\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) this value is the highest on the list.\"},\"properties9\":{\"name\":\"step\",\"example\":\"5\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties10\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) Javascript that should run on changing of the value.\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Provides a one line text box with up-down handles to set a number in the field.', '', 1, 2, '', ''),
|
||||
(16, '', 'The password form field type provides a text box for entry of a password. The password characters will be obscured as they are entered. If the field has a saved value this is entered (in obscured form) into the text box. If not, the default value (if any)', 'Password', '{\"properties0\":{\"name\":\"type\",\"example\":\"password\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be password.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mypassword\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Enter A Password\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"default\",\"example\":\"secret\",\"adjustable\":\"1\",\"description\":\"(optional) is the default password.\"},\"properties5\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties11\":{\"name\":\"message\",\"example\":\"Error! Please add password here.\",\"adjustable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties6\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties7\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties8\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties9\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties17\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"filter\",\"example\":\"raw\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"hint\",\"example\":\"Your Password Here\",\"adjustable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties14\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a text box for entry of a password. The password characters will be obscured as they are entered.', '', 1, 5, '', ''),
|
||||
(16, '', 'The password form field type provides a text box for entry of a password. The password characters will be obscured as they are entered. If the field has a saved value this is entered (in obscured form) into the text box. If not, the default value (if any)', 'Password', '{\"properties0\":{\"name\":\"type\",\"example\":\"password\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be password.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mypassword\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Enter A Password\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"default\",\"example\":\"secret\",\"adjustable\":\"1\",\"description\":\"(optional) is the default password.\"},\"properties5\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties6\":{\"name\":\"message\",\"example\":\"Error! Please add password here.\",\"adjustable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties7\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties12\":{\"name\":\"field\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) used in validation of \\\"equals\\\" to link the field to match.\"},\"properties13\":{\"name\":\"filter\",\"example\":\"raw\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties14\":{\"name\":\"hint\",\"example\":\"Password Here\",\"adjustable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties17\":{\"name\":\"autocomplete\",\"example\":\"off\",\"adjustable\":\"1\",\"description\":\"(optional) The autocomplete state for the form field. If \'off\' element will not be automatically completed by browser.\"},\"properties15\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties16\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a text box for entry of a password. The password characters will be obscured as they are entered.', '', 1, 7, '', ''),
|
||||
(17, '', 'The radio form field type provides radio buttons to select different options. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Radio', '{\"properties0\":{\"name\":\"type\",\"example\":\"radio\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be radio.\"},\"properties1\":{\"name\":\"name\",\"example\":\"myradiovalue\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an option\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"btn-group btn-group-yesno\",\"adjustable\":\"1\",\"description\":\"(optional) New in Joomla 3, if set to class=\\\"btn-group btn-group-yesno\\\" will show the nice coloured buttons\"},\"properties5\":{\"name\":\"option\",\"example\":\"1|Yes,0|No\",\"adjustable\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties6\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) is the default radio button item value.\"},\"properties7\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties14\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties10\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"},\"properties12\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides radio buttons to select different options.', '', 1, 7, '', ''),
|
||||
(18, '', 'Provides a horizontal scroll bar to specify a value in a range.', 'Range', '{\"properties0\":{\"name\":\"type\",\"example\":\"range\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be range.\"},\"properties1\":{\"name\":\"name\",\"example\":\"range\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Range\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"9\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties14\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties6\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the min on the meter.\"},\"properties7\":{\"name\":\"max\",\"example\":\"20\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the max on meter.\"},\"properties8\":{\"name\":\"step\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties12\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties13\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties9\":{\"name\":\"onchange\",\"example\":\"jQuery(\'#jform_range\').closest(\'.controls\').find(\'span\').remove(); var value = jQuery(\'#jform_range\').val();jQuery(\'#jform_range\').closest(\'.controls\').append(\' \'+value+\'\');\",\"adjustable\":\"1\",\"description\":\"(optional) javascript to run when the range is changed\"},\"properties10\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Provides a horizontal scroll bar to specify a value in a range.', '', 1, 3, '', ''),
|
||||
(19, '', 'Provides a modal with rows of formfields that you specify. As many options can be added as desired. Note this form field has a jQuery based javascript file as a dependency.', 'Repeatable', '{\"properties0\":{\"name\":\"type\",\"example\":\"repeatable\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(mandatory) must be repeatable.\"},\"properties1\":{\"name\":\"name\",\"example\":\"repeatable_list\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the parameter\"},\"properties2\":{\"name\":\"label\",\"example\":\"The Repeatable List\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) description text for the form field. Displays at the top of the modal with the name as well as in the usual position in the form\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The default value for the form field if the field is left empty. Note this has to be a json string compatible with the contents of the form field.\"},\"properties5\":{\"name\":\"id\",\"example\":\"aid\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) id of the hidden from field. (the modal will have this id with an added suffix of \\\"_modal\\\" and the table within the modal will have this id with a suffix of _modal_table\\\")\"},\"properties6\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) class of the table.\"},\"properties7\":{\"name\":\"select\",\"example\":\"Click here\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) The text to show on the modal button.\"},\"properties8\":{\"name\":\"icon\",\"example\":\"list\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The icon to show on the select button (is prefixed with \\\"icon-\\\").\"},\"properties9\":{\"name\":\"maximum\",\"example\":\"50\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The maximum number of rows of fields allowed (by default 999 to be effectively infinite)\"},\"properties10\":{\"name\":\"fields\",\"example\":\"1,2,3\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The fields to add to the modal. All fields must first be created in component builder as a field before you can add them here, since you must use the id of the field. Separate the field ids with commas. Do not add custom fields that are not also used in this component.\"},\"properties11\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) Use only if you would like to save raw data, since the default is best.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Allows form fields which can have as many options as the user desires.', '', 1, 4, '', ''),
|
||||
@ -1589,7 +1589,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name
|
||||
(33, '', 'The menuitem form field type provides a drop down grouped list of the available menu items from your Joomla site.', 'menuitem', '{\"properties0\":{\"name\":\"type\",\"example\":\"menuitem\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be menuitem.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mymenuitem\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a menu item\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default menu item. Note that this is the ItemID number of the menu item.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties5\":{\"name\":\"published\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) determines whether all menu items are listed or only published menu items. If state is \'0\' then all menu items will be listed. If state is \'1\' then only published menu items will be listed.\"},\"properties6\":{\"name\":\"filter\",\"example\":\"int\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"}}', 'provides a drop down list of the available menu items from your Joomla site.', '', 1, 2, '', 4),
|
||||
(34, '', 'Remember all views already have [accesslevel] added by default, only add this if you need more custom access selection! Provides a dropdown list of accesslevel options with the current option selected.', 'Accesslevel', '{\"properties0\":{\"name\":\"type\",\"example\":\"accesslevel\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be accesslevel\"},\"properties1\":{\"name\":\"name\",\"example\":\"accesstwo\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field. This must match the name of the query results column that contains the values that will be shown to the user in the drop-down list, unless a different name is specified in the value_field attribute. \"},\"properties2\":{\"name\":\"label\",\"example\":\"Access Two\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"Select an access level to this concept.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the field required true if yes.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) If set to multiple then allows more than one usergroup to be selected.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'List of accesslevels', '', 1, 2, '', 5),
|
||||
(35, '', 'Provides a form with rows of fields that you specify. As many options can be added as desired. Note this form field has a jQuery based javascript file as a dependency.', 'Subform', '{\"properties0\":{\"name\":\"type\",\"example\":\"subform\",\"description\":\"(mandatory) must be subform.\"},\"properties1\":{\"name\":\"name\",\"example\":\"options\",\"adjustable\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter\"},\"properties2\":{\"name\":\"label\",\"example\":\"The Option List\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"layout\",\"example\":\"joomla.form.field.subform.repeatable-table\",\"adjustable\":\"1\",\"description\":\"(mandatory) The layout for the repeatable table.\"},\"properties4\":{\"name\":\"component\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) To change the component where it should search for layout\"},\"properties5\":{\"name\":\"client\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Function to initialise the application client<br \\/>Frontend: <code>site<\\/code> or <code>0<\\/code><br \\/>Backend: <code>admin<\\/code> or <code>1<\\/code>\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"true\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The rows to be multiple.\"},\"properties7\":{\"name\":\"buttons\",\"example\":\"add,remove,move\",\"adjustable\":\"1\",\"description\":\"(optional) Which buttons to show if multiple mode is true.<br \\/>Options: <code>add,remove,move<\\/code>\"},\"properties8\":{\"name\":\"fields\",\"example\":\"1,2,3\",\"adjustable\":\"1\",\"description\":\"(mandatory) The fields to add to the modal. All fields must first be created in component builder as a field before you can add them here, since you must use the id of the field. Separate the field ids with commas. Do not add custom fields that are not also used in this component.\"},\"properties9\":{\"name\":\"formsource\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) you can add a path to a xml file containing the fields.\"},\"properties10\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) description text for the form field. Displays at the top of the modal with the name as well as in the usual position in the form\"},\"properties11\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The default value for the form field if the field is left empty. Note this has to be a json string compatible with the contents of the form field.\"},\"properties12\":{\"name\":\"icon\",\"example\":\"list\",\"adjustable\":\"1\",\"description\":\"(optional) The icon to show on the select button (is prefixed with \\\"icon-\\\").\"},\"properties13\":{\"name\":\"max\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) The maximum number of rows of fields allowed (by default 999 to be effectively infinite)\"},\"properties14\":{\"name\":\"min\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The minimum number of rows of fields required\"},\"properties15\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Use only if you would like to save raw data, since the default is best.\"},\"properties16\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Allows form fields which can have as many options as the user desires.', '', 1, 12, '', 6),
|
||||
(36, '', 'Provides an input field for an email address.', 'Email', '{\"properties0\":{\"name\":\"type\",\"example\":\"email\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be email.\"},\"properties1\":{\"name\":\"name\",\"example\":\"email\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Email Address\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"maxlength\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) limits the number of characters that may be entered.\"},\"properties5\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties7\":{\"name\":\"class\",\"example\":\"inputbox\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"filter\",\"example\":\"STRING\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"validate\",\"example\":\"email\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties13\":{\"name\":\"message\",\"example\":\"Error! Please add some text here.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties14\":{\"name\":\"hint\",\"example\":\"your@email.com\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties15\":{\"name\":\"autocomplete\",\"example\":\"on\",\"adjustable\":\"1\",\"description\":\"(optional) The autocomplete state for the form field. If \'off\' element will not be automatically completed by browser.\"},\"properties16\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"},\"properties17\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'Email form field type', '', 1, 3, '', 7),
|
||||
(36, '', 'Provides an input field for an email address.', 'Email', '{\"properties0\":{\"name\":\"type\",\"example\":\"email\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be email.\"},\"properties1\":{\"name\":\"name\",\"example\":\"email\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Email Address\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"maxlength\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) limits the number of characters that may be entered.\"},\"properties5\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties7\":{\"name\":\"class\",\"example\":\"inputbox\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"filter\",\"example\":\"STRING\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"validate\",\"example\":\"email\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties19\":{\"name\":\"unique\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) Used in validation, to check if we should test for uniqueness, to insure that this email does not already belong to another user. Check line 99 in \\/libraries\\/src\\/Form\\/Rule\\/EmailRule.php\"},\"properties13\":{\"name\":\"field\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) used in validation of \\\"equals\\\" to link the field to match.\"},\"properties14\":{\"name\":\"message\",\"example\":\"Error! Please add some text here.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties15\":{\"name\":\"hint\",\"example\":\"your@email.com\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties16\":{\"name\":\"autocomplete\",\"example\":\"on\",\"adjustable\":\"1\",\"description\":\"(optional) The autocomplete state for the form field. If \'off\' element will not be automatically completed by browser.\"},\"properties17\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"},\"properties18\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'Email form field type', '', 1, 5, '', 7),
|
||||
(37, '', 'Provides a dropdown list of plugin options from the folder.', 'Plugins', '{\"properties0\":{\"name\":\"type\",\"example\":\"plugins\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be editors.\"},\"properties1\":{\"name\":\"name\",\"example\":\"editor\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an editor\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties5\":{\"name\":\"folder\",\"example\":\"editors\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) editors or captcha.\"},\"properties6\":{\"name\":\"filter\",\"example\":\"cmd\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Provides a dropdown list of plugin options from the folder.', '', 1, 5, '', 8);
|
||||
|
||||
--
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewAdmin_custom_tabs extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewAdmin_fields_conditions extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewAdmin_fields_relations extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewComponent_admin_views extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewComponent_config extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewComponent_custom_admin_menus extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewComponent_custom_admin_views extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewComponent_dashboard extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewComponent_files_folders extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewComponent_mysql_tweaks extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewComponent_site_views extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewComponent_updates extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewCustom_admin_view extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewCustom_code extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewDynamic_get extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewField extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewFieldtype extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewHelp_document extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -117,16 +117,16 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
if ($this->user->authorise('joomla_component.export_jcb_packages', 'com_componentbuilder'))
|
||||
{
|
||||
// add Export JCB Packages button.
|
||||
JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES', 'true');
|
||||
}
|
||||
if ($this->user->authorise('joomla_component.clone', 'com_componentbuilder'))
|
||||
{
|
||||
// add Clone button.
|
||||
JToolBarHelper::custom('joomla_components.cloner', 'save-copy', '', 'COM_COMPONENTBUILDER_CLONE', 'true');
|
||||
}
|
||||
if ($this->user->authorise('joomla_component.export_jcb_packages', 'com_componentbuilder'))
|
||||
{
|
||||
// add Export JCB Packages button.
|
||||
JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES', 'true');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewLanguage extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewLanguage_translation extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewLayout extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewLibrary extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewLibrary_config extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewLibrary_files_folders_urls extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewServer extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewSite_view extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<div id="componentbuilder_loader">
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&layout=edit&id='. (int) $this->item->id . $this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewSnippet extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewSnippet_type extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewTemplate extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
|
@ -23,6 +23,8 @@ class ComponentbuilderViewValidation_rule extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>14th September, 2018</creationDate>
|
||||
<creationDate>19th September, 2018</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||
<copyright>Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<version>2.9.0</version>
|
||||
<version>2.9.1</version>
|
||||
<description><![CDATA[
|
||||
<h1>Component Builder (v.2.9.0)</h1>
|
||||
<h1>Component Builder (v.2.9.1)</h1>
|
||||
<div style="clear: both;"></div>
|
||||
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
||||
|
||||
|
@ -514,10 +514,10 @@
|
||||
<description>Builds Complex Joomla Components</description>
|
||||
<element>com_componentbuilder</element>
|
||||
<type>component</type>
|
||||
<version>2.9.0</version>
|
||||
<version>2.9.1</version>
|
||||
<infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl>
|
||||
<downloads>
|
||||
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.9.0/JCB_v2.9.0.zip</downloadurl>
|
||||
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.9.1/JCB_v2.9.1.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>stable</tag>
|
||||
|
@ -5116,7 +5116,7 @@ class com_componentbuilderInstallerScript
|
||||
echo '<a target="_blank" href="http://www.joomlacomponentbuilder.com" title="Component Builder">
|
||||
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
|
||||
</a>
|
||||
<h3>Upgrade to Version 2.9.0 Was Successful! Let us know if anything is not working as expected.</h3>';
|
||||
<h3>Upgrade to Version 2.9.1 Was Successful! Let us know if anything is not working as expected.</h3>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3666,6 +3666,13 @@ abstract class ComponentbuilderHelper
|
||||
// check if we found any
|
||||
if (self::checkString($url))
|
||||
{
|
||||
// get the global settings
|
||||
if (!self::checkObject(self::$params))
|
||||
{
|
||||
self::$params = JComponentHelper::getParams('com_componentbuilder');
|
||||
}
|
||||
// get UIKIT version
|
||||
$uikit = self::$params->get('uikit_version', 2);
|
||||
// check that we have the ID
|
||||
if (self::checkObject($item) && isset($item->id))
|
||||
{
|
||||
@ -3687,15 +3694,38 @@ abstract class ComponentbuilderHelper
|
||||
$title = self::safeString(JText::_('COM_COMPONENTBUILDER_EDIT') . ' ' . $view, 'W');
|
||||
// check that there is a check message
|
||||
if (self::checkString($headsup))
|
||||
{
|
||||
if (3 == $uikit)
|
||||
{
|
||||
$href = 'onclick="UIkit.modal.confirm(\''.JText::_($headsup).'\').then( function(){ window.location.href = \'' . $url . '\' } )" href="javascript:void(0)"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$href = 'onclick="UIkit2.modal.confirm(\''.JText::_($headsup).'\', function(){ window.location.href = \'' . $url . '\' })" href="javascript:void(0)"';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$href = 'href="' . $url . '"';
|
||||
}
|
||||
// return UIKIT version 3
|
||||
if (3 == $uikit)
|
||||
{
|
||||
// check if it is checked out
|
||||
if (isset($checked_out) && $checked_out > 0)
|
||||
{
|
||||
// is this user the one who checked it out
|
||||
if ($checked_out == JFactory::getUser()->id)
|
||||
{
|
||||
return ' <a ' . $href . ' uk-icon="icon: lock" title="' . $title . '"></a>';
|
||||
}
|
||||
return ' <a href="#" disabled uk-icon="icon: lock" title="' . JText::sprintf('COM_COMPONENTBUILDER__HAS_BEEN_CHECKED_OUT_BY_S', self::safeString($view, 'W'), JFactory::getUser($checked_out)->name) . '"></a>';
|
||||
}
|
||||
// return normal edit link
|
||||
return ' <a ' . $href . ' uk-icon="icon: pencil" title="' . $title . '"></a>';
|
||||
}
|
||||
// check if it is checked out (return UIKIT version 2)
|
||||
if (isset($checked_out) && $checked_out > 0)
|
||||
{
|
||||
// is this user the one who checked it out
|
||||
if ($checked_out == JFactory::getUser()->id)
|
||||
@ -3725,53 +3755,45 @@ abstract class ComponentbuilderHelper
|
||||
*/
|
||||
public static function getEditURL(&$item, $view, $views, $ref = '', $component = 'com_componentbuilder', $jRoute = true)
|
||||
{
|
||||
// build record
|
||||
$record = new stdClass();
|
||||
// check that we have the ID
|
||||
if (self::checkObject($item) && isset($item->id))
|
||||
{
|
||||
$id = (int) $item->id;
|
||||
$record->id = (int) $item->id;
|
||||
// check if created_by is available
|
||||
if (isset($item->created_by) && $item->created_by > 0)
|
||||
{
|
||||
$created_by = (int) $item->created_by;
|
||||
$record->created_by = (int) $item->created_by;
|
||||
}
|
||||
}
|
||||
elseif (self::checkArray($item) && isset($item['id']))
|
||||
{
|
||||
$id = (int) $item['id'];
|
||||
$record->id = (int) $item['id'];
|
||||
// check if created_by is available
|
||||
if (isset($item['created_by']) && $item['created_by'] > 0)
|
||||
{
|
||||
$created_by = (int) $item['created_by'];
|
||||
$record->created_by = (int) $item['created_by'];
|
||||
}
|
||||
}
|
||||
elseif (is_numeric($item))
|
||||
{
|
||||
$id = (int) $item;
|
||||
$record->id = (int) $item;
|
||||
}
|
||||
// check ID
|
||||
if (isset($id) && $id > 0)
|
||||
if (isset($record->id) && $record->id > 0)
|
||||
{
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
// get user action permission to edit
|
||||
$action = self::getActions($view, $record, $views, 'edit', str_replace('com_', '', $component));
|
||||
// can edit
|
||||
if ($user->authorise($view . '.edit', $component . '.' . $view . '.' . (int) $id) ||
|
||||
(
|
||||
isset($created_by) && $created_by == $user->id &&
|
||||
(
|
||||
($user->authorise($view . '.edit.own', $component . '.' . $view . '.' . (int) $id) &&
|
||||
$user->authorise($view . '.edit.own', $component)) ||
|
||||
($user->authorise('core.edit.own', $component . '.' . $view . '.' . (int) $id) &&
|
||||
$user->authorise('core.edit.own', $component))
|
||||
)
|
||||
)
|
||||
)
|
||||
if ($action->get($view . '.edit'))
|
||||
{
|
||||
// set the edit link
|
||||
if ($jRoute)
|
||||
{
|
||||
return JRoute::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $id . $ref);
|
||||
return JRoute::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref);
|
||||
}
|
||||
return "index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $id . $ref;
|
||||
return "index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@ -4623,11 +4645,13 @@ abstract class ComponentbuilderHelper
|
||||
* @param string $view The related view name
|
||||
* @param int $record The item to act upon
|
||||
* @param string $views The related list view name
|
||||
* @param mixed $target Only get this permission (like edit, create, delete)
|
||||
* @param string $component The target component
|
||||
*
|
||||
* @return object The JObject of permission/authorised actions
|
||||
*
|
||||
**/
|
||||
public static function getActions($view, &$record = null, $views = null)
|
||||
public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'componentbuilder')
|
||||
{
|
||||
// get the user object
|
||||
$user = JFactory::getUser();
|
||||
@ -4641,7 +4665,7 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
// get all actions from component
|
||||
$actions = JAccess::getActionsFromFile(
|
||||
JPATH_ADMINISTRATOR . '/components/com_componentbuilder/access.xml',
|
||||
JPATH_ADMINISTRATOR . '/components/com_' . $component . '/access.xml',
|
||||
"/access/section[@name='component']/"
|
||||
);
|
||||
// if non found then return empty JObject
|
||||
@ -4652,13 +4676,33 @@ abstract class ComponentbuilderHelper
|
||||
// get created by if not found
|
||||
if (self::checkObject($record) && !isset($record->created_by) && isset($record->id))
|
||||
{
|
||||
$record->created_by = self::getVar($view, 'id', $record->id, 'created_by');
|
||||
$record->created_by = self::getVar($view, $record->id, 'id', 'created_by', '=', $component);
|
||||
}
|
||||
// set actions only set in component settings
|
||||
$componentActions = array('core.admin', 'core.manage', 'core.options', 'core.export');
|
||||
// check if we have a target
|
||||
$checkTarget = false;
|
||||
if ($target)
|
||||
{
|
||||
// convert to an array
|
||||
if (self::checkString($target))
|
||||
{
|
||||
$target = array($target);
|
||||
}
|
||||
// check if we are good to go
|
||||
if (self::checkArray($target))
|
||||
{
|
||||
$checkTarget = true;
|
||||
}
|
||||
}
|
||||
// loop the actions and set the permissions
|
||||
foreach ($actions as $action)
|
||||
{
|
||||
// check target action filter
|
||||
if ($checkTarget && self::filterActions($view, $action->name, $target))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// set to use component default
|
||||
$fallback = true;
|
||||
// reset permission per/action
|
||||
@ -4673,7 +4717,7 @@ abstract class ComponentbuilderHelper
|
||||
// we are in item
|
||||
$area = 'item';
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise($action->name, 'com_componentbuilder.' . $view . '.' . (int) $record->id);
|
||||
$permission = $user->authorise($action->name, 'com_' . $component . '.' . $view . '.' . (int) $record->id);
|
||||
// if no permission found, check edit own
|
||||
if (!$permission)
|
||||
{
|
||||
@ -4683,8 +4727,8 @@ abstract class ComponentbuilderHelper
|
||||
// the correct target
|
||||
$coreCheck = (array) explode('.', $action->name);
|
||||
// check that we have both local and global access
|
||||
if ($user->authorise($coreCheck[0] . '.edit.own', 'com_componentbuilder.' . $view . '.' . (int) $record->id) &&
|
||||
$user->authorise($coreCheck[0] . '.edit.own', 'com_componentbuilder'))
|
||||
if ($user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component . '.' . $view . '.' . (int) $record->id) &&
|
||||
$user->authorise($coreCheck[0] . '.edit.own', 'com_' . $component))
|
||||
{
|
||||
// allow edit
|
||||
$result->set($action->name, true);
|
||||
@ -4718,15 +4762,15 @@ abstract class ComponentbuilderHelper
|
||||
$categoryCheck = $action->name;
|
||||
}
|
||||
// The record has a category. Check the category permissions.
|
||||
$catpermission = $user->authorise($categoryCheck, 'com_componentbuilder.' . $views . '.category.' . (int) $record->catid);
|
||||
$catpermission = $user->authorise($categoryCheck, 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid);
|
||||
if (!$catpermission && !is_null($catpermission))
|
||||
{
|
||||
// With edit, if the created_by matches current user then dig deeper.
|
||||
if (($action->name === 'core.edit' || $action->name === $view . '.edit') && $record->created_by > 0 && ($record->created_by == $user->id))
|
||||
{
|
||||
// check that we have both local and global access
|
||||
if ($user->authorise('core.edit.own', 'com_componentbuilder.' . $views . '.category.' . (int) $record->catid) &&
|
||||
$user->authorise($core . '.edit.own', 'com_componentbuilder'))
|
||||
if ($user->authorise('core.edit.own', 'com_' . $component . '.' . $views . '.category.' . (int) $record->catid) &&
|
||||
$user->authorise($core . '.edit.own', 'com_' . $component))
|
||||
{
|
||||
// allow edit
|
||||
$result->set($action->name, true);
|
||||
@ -4758,13 +4802,36 @@ abstract class ComponentbuilderHelper
|
||||
// Since items are created by users and global permissions is set by system admin.
|
||||
else
|
||||
{
|
||||
$result->set($action->name, $user->authorise($action->name, 'com_componentbuilder'));
|
||||
$result->set($action->name, $user->authorise($action->name, 'com_' . $component));
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the action permissions
|
||||
*
|
||||
* @param string $action The action to check
|
||||
* @param array $targets The array of target actions
|
||||
*
|
||||
* @return boolean true if action should be filtered out
|
||||
*
|
||||
**/
|
||||
protected static function filterActions(&$view, &$action, &$targets)
|
||||
{
|
||||
foreach ($targets as $target)
|
||||
{
|
||||
if (strpos($action, $view . '.' . $target) !== false ||
|
||||
strpos($action, 'core.' . $target) !== false)
|
||||
{
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if have an json string
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user