diff --git a/README.md b/README.md index 7628886d5..d62f0765e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,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.18) 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.21) 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) @@ -146,13 +146,13 @@ TODO + *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*: 15th May, 2019 -+ *Version*: 2.9.18 ++ *Last Build*: 6th July, 2019 ++ *Version*: 2.9.21 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **206359** -+ *Field count*: **1136** -+ *File count*: **1344** ++ *Line count*: **211603** ++ *Field count*: **1143** ++ *File count*: **1346** + *Folder count*: **209** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index 7628886d5..d62f0765e 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -12,7 +12,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.18) 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.21) 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) @@ -146,13 +146,13 @@ TODO + *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*: 15th May, 2019 -+ *Version*: 2.9.18 ++ *Last Build*: 6th July, 2019 ++ *Version*: 2.9.21 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **206359** -+ *Field count*: **1136** -+ *File count*: **1344** ++ *Line count*: **211603** ++ *Field count*: **1143** ++ *File count*: **1346** + *Folder count*: **209** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/compiler/joomla_3/Helper.php b/admin/compiler/joomla_3/Helper.php index 2841876b0..b6ce01384 100644 --- a/admin/compiler/joomla_3/Helper.php +++ b/admin/compiler/joomla_3/Helper.php @@ -496,38 +496,42 @@ abstract class ###Component###Helper /** * Get any component's model **/ - public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $component = '###Component###', $config = array()) + public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = '###Component###', $config = array()) { // fix the name $name = self::safeString($name); - // full path - $fullPath = $path . '/models'; - // set prefix - $prefix = $component.'Model'; + // full path to models + $fullPathModels = $path . '/models'; // load the model file - JModelLegacy::addIncludePath($fullPath, $prefix); + JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model'); + // make sure the table path is loaded + if (!isset($config['table_path']) || !self::checkString($config['table_path'])) + { + // This is the JCB default path to tables in Joomla 3.x + $config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables'; + } // get instance - $model = JModelLegacy::getInstance($name, $prefix, $config); + $model = JModelLegacy::getInstance($name, $Component . 'Model', $config); // if model not found (strange) if ($model == false) { jimport('joomla.filesystem.file'); // get file path - $filePath = $path.'/'.$name.'.php'; - $fullPath = $fullPath.'/'.$name.'.php'; + $filePath = $path . '/' . $name . '.php'; + $fullPathModel = $fullPathModels . '/' . $name . '.php'; // check if it exists if (JFile::exists($filePath)) { // get the file require_once $filePath; } - elseif (JFile::exists($fullPath)) + elseif (JFile::exists($fullPathModel)) { // get the file - require_once $fullPath; + require_once $fullPathModel; } // build class names - $modelClass = $prefix.$name; + $modelClass = $Component . 'Model' . $name; if (class_exists($modelClass)) { // initialize the model diff --git a/admin/compiler/joomla_3/Helper_site.php b/admin/compiler/joomla_3/Helper_site.php index 6164ce694..9213fb793 100644 --- a/admin/compiler/joomla_3/Helper_site.php +++ b/admin/compiler/joomla_3/Helper_site.php @@ -139,38 +139,42 @@ abstract class ###Component###Helper /** * Get any component's model **/ - public static function getModel($name, $path = JPATH_COMPONENT_SITE, $component = '###Component###', $config = array()) + public static function getModel($name, $path = JPATH_COMPONENT_SITE, $Component = '###Component###', $config = array()) { // fix the name $name = self::safeString($name); - // full path - $fullPath = $path . '/models'; - // set prefix - $prefix = $component.'Model'; + // full path to models + $fullPathModels = $path . '/models'; // load the model file - JModelLegacy::addIncludePath($fullPath, $prefix); + JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model'); + // make sure the table path is loaded + if (!isset($config['table_path']) || !self::checkString($config['table_path'])) + { + // This is the JCB default path to tables in Joomla 3.x + $config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables'; + } // get instance - $model = JModelLegacy::getInstance($name, $prefix, $config); + $model = JModelLegacy::getInstance($name, $Component . 'Model', $config); // if model not found (strange) if ($model == false) { jimport('joomla.filesystem.file'); // get file path - $filePath = $path.'/'.$name.'.php'; - $fullPath = $fullPath.'/'.$name.'.php'; + $filePath = $path . '/' . $name . '.php'; + $fullPathModel = $fullPathModels . '/' . $name . '.php'; // check if it exists if (JFile::exists($filePath)) { // get the file require_once $filePath; } - elseif (JFile::exists($fullPath)) + elseif (JFile::exists($fullPathModel)) { // get the file - require_once $fullPath; + require_once $fullPathModel; } // build class names - $modelClass = $prefix.$name; + $modelClass = $Component . 'Model' . $name; if (class_exists($modelClass)) { // initialize the model diff --git a/admin/compiler/joomla_3/JControllerForm.php b/admin/compiler/joomla_3/JControllerForm.php index 305a23fec..3f5e8f1c6 100644 --- a/admin/compiler/joomla_3/JControllerForm.php +++ b/admin/compiler/joomla_3/JControllerForm.php @@ -141,7 +141,7 @@ class ###Component###Controller###View### extends JControllerForm $this->refid = $this->input->get('refid', 0, 'int'); // Check if there is a return value - $return = $this->input->get('return', null, 'base64'); + $return = $this->input->get('return', null, 'base64');###JCONTROLLERFORM_BEFORECANCEL### $cancel = parent::cancel($key); @@ -177,7 +177,7 @@ class ###Component###Controller###View### extends JControllerForm 'index.php?option=' . $this->option . $redirect, false ) ); - } + }###JCONTROLLERFORM_AFTERCANCEL### return $cancel; } diff --git a/admin/compiler/joomla_3/JControllerForm_site.php b/admin/compiler/joomla_3/JControllerForm_site.php index 01a76de19..5ccd4c362 100644 --- a/admin/compiler/joomla_3/JControllerForm_site.php +++ b/admin/compiler/joomla_3/JControllerForm_site.php @@ -42,7 +42,7 @@ class ###Component###Controller###View### extends JControllerForm { $this->view_list = '###SITE_DEFAULT_VIEW###'; // safeguard for setting the return view listing to the default site view. parent::__construct($config); - } + }###ADMIN_CUSTOM_BUTTONS_CONTROLLER### /** * Method override to check if you can add a new record. @@ -141,7 +141,7 @@ class ###Component###Controller###View### extends JControllerForm $this->refid = $this->input->get('refid', 0, 'int'); // Check if there is a return value - $return = $this->input->get('return', null, 'base64'); + $return = $this->input->get('return', null, 'base64');###JCONTROLLERFORM_BEFORECANCEL### $cancel = parent::cancel($key); @@ -177,7 +177,7 @@ class ###Component###Controller###View### extends JControllerForm 'index.php?option=' . $this->option . $redirect, false ) ); - } + }###JCONTROLLERFORM_AFTERCANCEL### return $cancel; } diff --git a/admin/compiler/joomla_3/JModelAdmin.php b/admin/compiler/joomla_3/JModelAdmin.php index 46d024f0d..f939f76db 100644 --- a/admin/compiler/joomla_3/JModelAdmin.php +++ b/admin/compiler/joomla_3/JModelAdmin.php @@ -23,13 +23,20 @@ use Joomla\Registry\Registry; * ###Component### ###View### Model */ class ###Component###Model###View### extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = ###TABLAYOUTFIELDSARRAY###; + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_###COMPONENT###'; - + /** * The type alias for this content type. * diff --git a/admin/compiler/joomla_3/JModelAdmin_site.php b/admin/compiler/joomla_3/JModelAdmin_site.php index 46d024f0d..f939f76db 100644 --- a/admin/compiler/joomla_3/JModelAdmin_site.php +++ b/admin/compiler/joomla_3/JModelAdmin_site.php @@ -23,13 +23,20 @@ use Joomla\Registry\Registry; * ###Component### ###View### Model */ class ###Component###Model###View### extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = ###TABLAYOUTFIELDSARRAY###; + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_###COMPONENT###'; - + /** * The type alias for this content type. * diff --git a/admin/compiler/joomla_3/layout.php b/admin/compiler/joomla_3/layout.php index 5b6acbb3c..fb87860a0 100644 --- a/admin/compiler/joomla_3/layout.php +++ b/admin/compiler/joomla_3/layout.php @@ -29,18 +29,31 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( ###LAYOUTITEMS### ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/compiler/joomla_3/layoutfull.php b/admin/compiler/joomla_3/layoutfull.php index bf7b64e02..9f09f4660 100644 --- a/admin/compiler/joomla_3/layoutfull.php +++ b/admin/compiler/joomla_3/layoutfull.php @@ -17,15 +17,27 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( ###LAYOUTITEMS### ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -34,3 +46,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/compiler/joomla_3/layoutitems.php b/admin/compiler/joomla_3/layoutitems.php index 82de7a208..ae2f5a5c0 100644 --- a/admin/compiler/joomla_3/layoutitems.php +++ b/admin/compiler/joomla_3/layoutitems.php @@ -17,18 +17,31 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( ###LAYOUTITEMS### ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/compiler/joomla_3/layoutpublished.php b/admin/compiler/joomla_3/layoutpublished.php index 82de7a208..ae2f5a5c0 100644 --- a/admin/compiler/joomla_3/layoutpublished.php +++ b/admin/compiler/joomla_3/layoutpublished.php @@ -17,18 +17,31 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( ###LAYOUTITEMS### ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/compiler/joomla_3/layouttitle.php b/admin/compiler/joomla_3/layouttitle.php index 5c30a679f..dd1a0e772 100644 --- a/admin/compiler/joomla_3/layouttitle.php +++ b/admin/compiler/joomla_3/layouttitle.php @@ -17,15 +17,27 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( ###LAYOUTITEMS### ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -34,3 +46,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/compiler/joomla_3/router.php b/admin/compiler/joomla_3/router.php index c3084c95a..272e42940 100644 --- a/admin/compiler/joomla_3/router.php +++ b/admin/compiler/joomla_3/router.php @@ -143,6 +143,8 @@ class ###Component###Router extends JComponentRouterBase { $getTable = '#__categories'; $query->from($db->quoteName($getTable)); + // we need this to target the components categories (TODO will keep an eye on this) + $query->where($db->quoteName('extension') . ' LIKE '. $db->quote((string)'com_' . $main . '%')); } else { diff --git a/admin/config.xml b/admin/config.xml index 53a28c3b9..20204b87b 100644 --- a/admin/config.xml +++ b/admin/config.xml @@ -57,6 +57,16 @@ folder="editors" filter="cmd" /> + + @@ -239,6 +249,20 @@ + + + + + + @@ -711,16 +735,29 @@ class="list_class" multiple="false" default="0" - required="false" button="false" /> + + + + + + @@ -730,7 +767,6 @@ name="repository" label="COM_COMPONENTBUILDER_CONFIG_REPOSITORY_LABEL" value="1" - required="false" description="COM_COMPONENTBUILDER_CONFIG_REPOSITORY_DESCRIPTION" class="inputbox" /> @@ -741,7 +777,6 @@ label="COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_LABEL" value="1" default="" - required="false" description="COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_DESCRIPTION" class="inputbox" /> @@ -843,7 +878,6 @@ class="text_area" readonly="false" disabled="false" - required="true" filter="STRING" message="COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_MESSAGE" hint="COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_HINT" diff --git a/admin/controllers/admin_views.php b/admin/controllers/admin_views.php index bfd757d9d..8e158113b 100644 --- a/admin/controllers/admin_views.php +++ b/admin/controllers/admin_views.php @@ -121,7 +121,7 @@ class ComponentbuilderControllerAdmin_views extends JControllerAdmin // set massage $message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); // check if this user has the right to run expansion - if($user->authorise('compiler.run_expansion', 'com_componentbuilder')) + if($user->authorise('admin_views.run_expansion', 'com_componentbuilder')) { // set massage $message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); diff --git a/admin/controllers/compiler.php b/admin/controllers/compiler.php index 0e5770100..720f41699 100644 --- a/admin/controllers/compiler.php +++ b/admin/controllers/compiler.php @@ -216,7 +216,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin // set page redirect $redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=compiler', false); $message = JText::_('COM_COMPONENTBUILDER_COULD_NOT_CLEAR_THE_TMP_FOLDER'); - if($user->authorise('core.admin', 'com_componentbuilder')) + if($user->authorise('compiler.clear_tmp', 'com_componentbuilder') && $user->authorise('core.options', 'com_componentbuilder')) { // get the model $model = $this->getModel('compiler'); diff --git a/admin/controllers/custom_codes.php b/admin/controllers/custom_codes.php index c80a23f66..eb1957194 100644 --- a/admin/controllers/custom_codes.php +++ b/admin/controllers/custom_codes.php @@ -121,7 +121,7 @@ class ComponentbuilderControllerCustom_codes extends JControllerAdmin // set massage $message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); // check if this user has the right to run expansion - if($user->authorise('compiler.run_expansion', 'com_componentbuilder')) + if($user->authorise('custom_codes.run_expansion', 'com_componentbuilder')) { // set massage $message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); diff --git a/admin/controllers/dynamic_gets.php b/admin/controllers/dynamic_gets.php index bc43dd3fc..994738dac 100644 --- a/admin/controllers/dynamic_gets.php +++ b/admin/controllers/dynamic_gets.php @@ -121,7 +121,7 @@ class ComponentbuilderControllerDynamic_gets extends JControllerAdmin // set massage $message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); // check if this user has the right to run expansion - if($user->authorise('compiler.run_expansion', 'com_componentbuilder')) + if($user->authorise('dynamic_gets.run_expansion', 'com_componentbuilder')) { // set massage $message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); diff --git a/admin/controllers/fields.php b/admin/controllers/fields.php index 6e3a3eaf4..4c99c975c 100644 --- a/admin/controllers/fields.php +++ b/admin/controllers/fields.php @@ -121,7 +121,7 @@ class ComponentbuilderControllerFields extends JControllerAdmin // set massage $message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); // check if this user has the right to run expansion - if($user->authorise('compiler.run_expansion', 'com_componentbuilder')) + if($user->authorise('fields.run_expansion', 'com_componentbuilder')) { // set massage $message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); diff --git a/admin/controllers/joomla_component.php b/admin/controllers/joomla_component.php index 3cd654e60..53b48c600 100644 --- a/admin/controllers/joomla_component.php +++ b/admin/controllers/joomla_component.php @@ -45,7 +45,7 @@ class ComponentbuilderControllerJoomla_component extends JControllerForm JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); // check if import is allowed for this user. $user = JFactory::getUser(); - if ($user->authorise('joomla_component.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder')) + if ($user->authorise('joomla_component.import_jcb_packages', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder')) { $session = JFactory::getSession(); $session->set('backto_VDM_IMPORT', 'joomla_components'); diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php index e7ddde183..992cdb98f 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -121,7 +121,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin // set massage $message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); // check if this user has the right to run expansion - if($user->authorise('compiler.run_expansion', 'com_componentbuilder')) + if($user->authorise('joomla_components.run_expansion', 'com_componentbuilder')) { // set massage $message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); @@ -159,7 +159,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin // set page redirect $redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false); $message = JText::_('COM_COMPONENTBUILDER_COULD_NOT_CLEAR_THE_TMP_FOLDER'); - if($user->authorise('core.admin', 'com_componentbuilder')) + if($user->authorise('joomla_components.clear_tmp', 'com_componentbuilder') && $user->authorise('core.options', 'com_componentbuilder')) { // get the model $model = $this->getModel('compiler'); @@ -181,7 +181,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin { // check if import is allowed for this user. $user = JFactory::getUser(); - if ($user->authorise('joomla_component.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder')) + if ($user->authorise('joomla_component.import_jcb_packages', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder')) { $session = JFactory::getSession(); $session->set('backto_VDM_IMPORT', 'joomla_components'); @@ -205,7 +205,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin $model = $this->getModel('Joomla_components'); // check if export is allowed for this user. $model->user = JFactory::getUser(); - if ($model->user->authorise('joomla_component.export', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder')) + if ($model->user->authorise('joomla_component.export_jcb_packages', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder')) { // Get the input $input = JFactory::getApplication()->input; @@ -289,7 +289,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin // make sure to set active type (adding this script from custom code :) $model->activeType = 'manualBackup'; // check if export is allowed for this user. (we need this sorry) - if ($model->user->authorise('joomla_component.export', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder')) + if ($model->user->authorise('joomla_component.export_jcb_packages', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder')) { // get all component IDs to backup $pks = componentbuilderHelper::getComponentIDs(); @@ -443,7 +443,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin $model = $this->getModel('Joomla_components'); // check if export is allowed for this user. $model->user = JFactory::getUser(); - if ($model->user->authorise('joomla_component.cloner', 'com_componentbuilder') && $model->user->authorise('core.copy', 'com_componentbuilder')) + if ($model->user->authorise('joomla_component.clone', 'com_componentbuilder') && $model->user->authorise('core.copy', 'com_componentbuilder')) { // Get the input $input = JFactory::getApplication()->input; diff --git a/admin/helpers/compiler.php b/admin/helpers/compiler.php index 08e3a672a..695c72aaa 100644 --- a/admin/helpers/compiler.php +++ b/admin/helpers/compiler.php @@ -253,6 +253,8 @@ class Compiler extends Infusion */ protected function setFileContent(&$name, &$path, &$bom, $view = null) { + // Trigger Event: jcb_ce_onBeforeSetFileContent + $this->triggerEvent('jcb_ce_onBeforeSetFileContent', array(&$this->componentContext, &$name, &$path, &$bom, &$view)); // set the file name $this->fileContentStatic[$this->hhh . 'FILENAME' . $this->hhh] = $name; // check if the file should get PHP opening @@ -263,6 +265,8 @@ class Compiler extends Infusion } // get content of the file $string = ComponentbuilderHelper::getFileContents($path); + // Trigger Event: jcb_ce_onGetFileContents + $this->triggerEvent('jcb_ce_onGetFileContents', array(&$this->componentContext, &$string, &$name, &$path, &$bom, &$view)); // see if we should add a BOM if (strpos($string, $this->hhh . 'BOM' . $this->hhh) !== false) { @@ -281,6 +285,8 @@ class Compiler extends Infusion { $answer = $this->setDynamicValues($answer); } + // Trigger Event: jcb_ce_onBeforeSetFileContent + $this->triggerEvent('jcb_ce_onBeforeWriteFileContent', array(&$this->componentContext, &$answer, &$name, &$path, &$bom, &$view)); // add answer back to file $this->writeFile($path, $answer); // count the file lines @@ -453,20 +459,28 @@ class Compiler extends Infusion { // set the repo path $repoFullPath = $this->repoPath . '/com_' . $this->componentData->sales_name . '__joomla_' . $this->joomlaVersion; + // Trigger Event: jcb_ce_onBeforeUpdateRepo + $this->triggerEvent('jcb_ce_onBeforeUpdateRepo', array(&$this->componentContext, &$this->componentPath, &$repoFullPath, &$this->componentData)); // remove old data $this->removeFolder($repoFullPath, $this->componentData->toignore); // set the new data JFolder::copy($this->componentPath, $repoFullPath, '', true); + // Trigger Event: jcb_ce_onAfterUpdateRepo + $this->triggerEvent('jcb_ce_onAfterUpdateRepo', array(&$this->componentContext, &$this->componentPath, &$repoFullPath, &$this->componentData)); } // the name of the zip file to create $this->filepath = $this->tempPath . '/' . $this->componentFolderName . '.zip'; - + // Trigger Event: jcb_ce_onBeforeZipComponent + $this->triggerEvent('jcb_ce_onBeforeZipComponent', array(&$this->componentContext, &$this->componentPath, &$this->filepath, &$this->tempPath, &$this->componentFolderName, &$this->componentData)); //create the zip file if (ComponentbuilderHelper::zip($this->componentPath, $this->filepath)) { - // now move to backup if zip was made and backup is requered + // now move to backup if zip was made and backup is required if ($this->backupPath && $this->dynamicIntegration) { + // Trigger Event: jcb_ce_onBeforeBackupZip + $this->triggerEvent('jcb_ce_onBeforeBackupZip', array(&$this->componentContext, &$this->filepath, &$this->tempPath, &$this->backupPath, &$this->componentData)); + // copy the zip to backup path JFile::copy($this->filepath, $this->backupPath); } @@ -476,10 +490,14 @@ class Compiler extends Infusion // make sure we have the correct file if (isset($this->componentData->sales_server)) { + // Trigger Event: jcb_ce_onBeforeMoveToServer + $this->triggerEvent('jcb_ce_onBeforeMoveToServer', array(&$this->componentContext, &$this->filepath, &$this->tempPath, &$this->componentSalesName, &$this->componentData)); // move to server ComponentbuilderHelper::moveToServer($this->filepath, $this->componentSalesName . '.zip', (int) $this->componentData->sales_server, $this->componentData->sales_server_protocol); } } + // Trigger Event: jcb_ce_onAfterZipComponent + $this->triggerEvent('jcb_ce_onAfterZipComponent', array(&$this->componentContext, &$this->filepath, &$this->tempPath, &$this->componentFolderName, &$this->componentData)); // remove the component folder since we are done if ($this->removeFolder($this->componentPath)) { diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 5e90575d7..29186c266 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access'); */ class Get { - + /** * The hash placeholder * @@ -736,6 +736,13 @@ class Get */ public $mysqlTableSetting = array(); + /** + * event plugin trigger switch + * + * @var boolean + */ + protected $active_plugins = false; + /** * Constructor */ @@ -748,6 +755,21 @@ class Get $this->app = JFactory::getApplication(); // Set the params $this->params = JComponentHelper::getParams('com_componentbuilder'); + // get active plugins + if (($plugins = $this->params->get('compiler_plugin', false)) !== false) + { + foreach ($plugins as $plugin) + { + // get posible plugins + if (\JPluginHelper::isEnabled('extension', $plugin)) + { + // Import the appropriate plugin group. + \JPluginHelper::importPlugin('extension', $plugin); + // activate events + $this->active_plugins = true; + } + } + } // set the minfy switch of the JavaScript $this->minify = (isset($config['minify']) && $config['minify'] != 2) ? $config['minify'] : $this->params->get('minify', 0); // set the global language @@ -778,6 +800,8 @@ class Get $this->langPrefix = 'COM_' . ComponentbuilderHelper::safeString($name_code, 'U'); // set component code name $this->componentCodeName = ComponentbuilderHelper::safeString($name_code); + // set component context + $this->componentContext = $this->componentCodeName . '.' . $this->componentID; // set if placeholders should be added to customcode $global = ((int) ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'add_placeholders') == 1) ? true : false; $this->addPlaceholders = ((int) $config['placeholders'] == 0) ? false : (((int) $config['placeholders'] == 1) ? true : $global); @@ -866,6 +890,40 @@ class Get return ''; } + /** + * Trigger events + * + * @param string $event The event to trigger + * @param mix $data The values to pass to the event/plugin + * + * @return string + * + */ + public function triggerEvent($event, $data) + { + // only exicute if plugins were loaded (active) + if ($this->active_plugins) + { + // Get the dispatcher. + $dispatcher = \JEventDispatcher::getInstance(); + + // Trigger this compiler event. + $results = $dispatcher->trigger($event, $data); + + // Check for errors encountered while trigger the event + if (count($results) && in_array(false, $results, true)) + { + // Get the last error. + $error = $dispatcher->getError(); + + if (!($error instanceof \Exception)) + { + throw new \Exception($error); + } + } + } + } + /** * get all System Placeholders * @@ -963,12 +1021,18 @@ class Get $query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_placeholders', 'k') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('k.joomla_component') . ')'); $query->where($this->db->quoteName('a.id') . ' = ' . (int) $this->componentID); + // Trigger Event: jcb_ce_onBeforeQueryComponentData + $this->triggerEvent('jcb_ce_onBeforeQueryComponentData', array(&$this->componentContext, &$this->componentID, &$query, &$this->db)); + // Reset the query using our newly populated query object. $this->db->setQuery($query); // Load the results as a list of stdClass objects $component = $this->db->loadObject(); + // Trigger Event: jcb_ce_onBeforeModelComponentData + $this->triggerEvent('jcb_ce_onBeforeModelComponentData', array(&$this->componentContext, &$component)); + // set upater $updater = array( 'unique' => array( @@ -1510,10 +1574,36 @@ class Get $component->toignore = array('.git'); } + // Trigger Event: jcb_ce_onAfterModelComponentData + $this->triggerEvent('jcb_ce_onAfterModelComponentData', array(&$this->componentContext, &$component)); + // return the found component data return $component; } + /** + * set the language content values to language content array + * + * @param string $target The target area for the language string + * @param string $language The language key string + * @param string $string The language string + * @param boolean $addPrefix The switch to add langPrefix + * + * @return void + * + */ + public function setLangContent($target, $language, $string, $addPrefix = false) + { + if ($addPrefix && !isset($this->langContent[$target][$this->langPrefix . '_' . $language])) + { + $this->langContent[$target][$this->langPrefix . '_' . $language] = trim($string); + } + elseif (!isset($this->langContent[$target][$language])) + { + $this->langContent[$target][$language] = trim($string); + } + } + /** * Get all Admin View Data * @@ -1556,6 +1646,9 @@ class Get $query->join('LEFT', $this->db->quoteName('#__componentbuilder_admin_custom_tabs', 't') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('t.admin_view') . ')'); $query->where($this->db->quoteName('a.id') . ' = ' . (int) $id); + // Trigger Event: jcb_ce_onBeforeQueryViewData + $this->triggerEvent('jcb_ce_onBeforeQueryViewData', array(&$this->componentContext, &$id, &$query, &$this->db)); + // Reset the query using our newly populated query object. $this->db->setQuery($query); @@ -1611,6 +1704,10 @@ class Get $this->placeholders[$this->bbb . 'Views' . $this->ddd] = $this->placeholders[$this->hhh . 'Views' . $this->hhh]; $this->placeholders[$this->bbb . 'VIEW' . $this->ddd] = $this->placeholders[$this->hhh . 'VIEW' . $this->hhh]; $this->placeholders[$this->bbb . 'VIEWS' . $this->ddd] = $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh]; + + // Trigger Event: jcb_ce_onBeforeModelViewData + $this->triggerEvent('jcb_ce_onBeforeModelViewData', array(&$this->componentContext, &$view, &$this->placeholders)); + // add the tables $view->addtables = (isset($view->addtables) && ComponentbuilderHelper::checkJson($view->addtables)) ? json_decode($view->addtables, true) : null; if (ComponentbuilderHelper::checkArray($view->addtables)) @@ -1634,7 +1731,7 @@ class Get $tab['name'] = (isset($tab['name']) && ComponentbuilderHelper::checkString($tab['name'])) ? $tab['name'] : 'Tab'; // set lang $tab['lang'] = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($tab['view'], 'U') . '_' . ComponentbuilderHelper::safeString($tab['name'], 'U'); - $this->langContent['both'][$tab['lang']] = trim($tab['name']); + $this->setLangContent('both', $tab['lang'], $tab['name']); // set code name $tab['code'] = ComponentbuilderHelper::safeString($tab['name']); // check if the permissions for the tab should be added @@ -1673,8 +1770,8 @@ class Get $tab['lang_permission'] = $tab['lang'] . '_TAB_PERMISSION'; $tab['lang_permission_desc'] = $tab['lang'] . '_TAB_PERMISSION_DESC'; $tab['lang_permission_title'] = $this->placeholders[$this->hhh . 'Views' . $this->hhh] . ' View ' . $tab['name'] . ' Tab'; - $this->langContent['both'][$tab['lang_permission']] = $tab['lang_permission_title']; - $this->langContent['both'][$tab['lang_permission_desc']] = 'Allow the users in this group to view ' . $tab['name'] . ' Tab of ' . $this->placeholders[$this->hhh . 'views' . $this->hhh]; + $this->setLangContent('both', $tab['lang_permission'], $tab['lang_permission_title']); + $this->setLangContent('both', $tab['lang_permission_desc'], 'Allow the users in this group to view ' . $tab['name'] . ' Tab of ' . $this->placeholders[$this->hhh . 'views' . $this->hhh]); // set the sort key $tab['sortKey'] = ComponentbuilderHelper::safeString($tab['lang_permission_title']); } @@ -1962,7 +2059,7 @@ class Get if ('default' !== $check_column_name) { $column_name_lang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($name_list, 'U') . '_' . ComponentbuilderHelper::safeString($relationsValue['column_name'], 'U'); - $this->langContent['admin'][$column_name_lang] = trim($relationsValue['column_name']); + $this->setLangContent('admin', $column_name_lang, $relationsValue['column_name']); $this->listHeadOverRide[$name_list][(int) $relationsValue['listfield']] = $column_name_lang; } } @@ -2046,7 +2143,7 @@ class Get } } // add_php - $addArrayP = array('php_getitem', 'php_before_save', 'php_save', 'php_getform', 'php_postsavehook', 'php_getitems', 'php_getitems_after_all', 'php_getlistquery', 'php_allowadd', 'php_allowedit', 'php_before_delete', 'php_after_delete', 'php_before_publish', 'php_after_publish', 'php_batchcopy', 'php_batchmove', 'php_document'); + $addArrayP = array('php_getitem', 'php_before_save', 'php_save', 'php_getform', 'php_postsavehook', 'php_getitems', 'php_getitems_after_all', 'php_getlistquery', 'php_allowadd', 'php_allowedit', 'php_before_cancel', 'php_after_cancel', 'php_before_delete', 'php_after_delete', 'php_before_publish', 'php_after_publish', 'php_batchcopy', 'php_batchmove', 'php_document'); foreach ($addArrayP as $scripter) { if (isset($view->{'add_' . $scripter}) && $view->{'add_' . $scripter} == 1) @@ -2205,6 +2302,10 @@ class Get // remove the table values since we moved to another object unset($view->{'mysql_table_' . $_mysqlTableKey}); } + + // Trigger Event: jcb_ce_onAfterModelViewData + $this->triggerEvent('jcb_ce_onAfterModelViewData', array(&$this->componentContext, &$view, &$this->placeholders)); + // clear placeholders unset($this->placeholders[$this->hhh . 'view' . $this->hhh]); unset($this->placeholders[$this->hhh . 'views' . $this->hhh]); @@ -2244,11 +2345,18 @@ class Get $query->from('#__componentbuilder_' . $table . ' AS a'); $query->where($this->db->quoteName('a.id') . ' = ' . (int) $id); + // Trigger Event: jcb_ce_onBeforeQueryCustomViewData + $this->triggerEvent('jcb_ce_onBeforeQueryCustomViewData', array(&$this->componentContext, &$id, &$table, &$query, &$this->db)); + // Reset the query using our newly populated query object. $this->db->setQuery($query); // Load the results as a list of stdClass objects (see later for more options on retrieving data). $view = $this->db->loadObject(); + + // Trigger Event: jcb_ce_onBeforeModelCustomViewData + $this->triggerEvent('jcb_ce_onBeforeModelCustomViewData', array(&$this->componentContext, &$view, &$id, &$table)); + if ($table === 'site_view') { $this->lang = 'site'; @@ -2485,6 +2593,10 @@ class Get } unset($view->custom_button); } + + // Trigger Event: jcb_ce_onAfterModelCustomViewData + $this->triggerEvent('jcb_ce_onAfterModelCustomViewData', array(&$this->componentContext, &$view)); + // return the found view data return $view; } @@ -2513,6 +2625,9 @@ class Get $query->join('LEFT', $this->db->quoteName('#__componentbuilder_fieldtype', 'c') . ' ON (' . $this->db->quoteName('a.fieldtype') . ' = ' . $this->db->quoteName('c.id') . ')'); $query->where($this->db->quoteName('a.id') . ' = ' . $this->db->quote($id)); + // Trigger Event: jcb_ce_onBeforeQueryFieldData + $this->triggerEvent('jcb_ce_onBeforeQueryFieldData', array(&$this->componentContext, &$id, &$query, &$this->db)); + // Reset the query using our newly populated query object. $this->db->setQuery($query); $this->db->execute(); @@ -2521,6 +2636,9 @@ class Get // Load the results as a list of stdClass objects (see later for more options on retrieving data). $field = $this->db->loadObject(); + // Trigger Event: jcb_ce_onBeforeModelFieldData + $this->triggerEvent('jcb_ce_onBeforeModelFieldData', array(&$this->componentContext, &$field)); + // adding a fix for the changed name of type to fieldtype $field->type = $field->fieldtype; @@ -2596,6 +2714,9 @@ class Get // get the last used version $field->history = $this->getHistoryWatch('field', $id); + // Trigger Event: jcb_ce_onAfterModelFieldData + $this->triggerEvent('jcb_ce_onAfterModelFieldData', array(&$this->componentContext, &$field)); + $this->_fieldData[$id] = $field; } else @@ -2854,7 +2975,7 @@ class Get * * @param object $field The field object * @param string $listViewName The list view name - * @param string $amicably The peaceful resolve + * @param string $amicably The peaceful resolve (for fields in subforms in same view :) * * @return string Success returns field name * @@ -2872,9 +2993,9 @@ class Get return 'error'; } // set the type name - $type_name = ComponentbuilderHelper::safeString($field['settings']->type_name); + $type_name = ComponentbuilderHelper::safeFieldName($field['settings']->type_name); // set the name of the field - $name = ComponentbuilderHelper::safeString($field['settings']->name); + $name = ComponentbuilderHelper::safeFieldName($field['settings']->name); // check that we have the poperties if (ComponentbuilderHelper::checkArray($field['settings']->properties)) { @@ -2900,13 +3021,15 @@ class Get if (ComponentbuilderHelper::checkString($listViewName)) { // check if we should use another Text Name as this views name - $otherName = ComponentbuilderHelper::getBetween($field['settings']->xml, 'othername="', '"'); - $otherViews = ComponentbuilderHelper::getBetween($field['settings']->xml, 'views="', '"'); - $otherView = ComponentbuilderHelper::getBetween($field['settings']->xml, 'view="', '"'); + $otherName = $this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'othername="', '"'), $this->placeholders); + $otherViews = $this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'views="', '"'), $this->placeholders); + $otherView = $this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'view="', '"'), $this->placeholders); + // This is to link other view category if (ComponentbuilderHelper::checkString($otherName) && ComponentbuilderHelper::checkString($otherViews) && ComponentbuilderHelper::checkString($otherView)) { + // set other category details $this->catOtherName[$listViewName] = array( - 'name' => ComponentbuilderHelper::safeString($otherName), + 'name' => ComponentbuilderHelper::safeFieldName($otherName), 'views' => ComponentbuilderHelper::safeString($otherViews), 'view' => ComponentbuilderHelper::safeString($otherView) ); @@ -2926,7 +3049,7 @@ class Get else { // get value from xml - $xml = ComponentbuilderHelper::safeString($this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'name="', '"'), $this->placeholders)); + $xml = ComponentbuilderHelper::safeFieldName($this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'name="', '"'), $this->placeholders)); // check if a value was found if (ComponentbuilderHelper::checkString($xml)) { @@ -2992,13 +3115,13 @@ class Get { $counter = 1; // set the unique name - $uniqueName = ComponentbuilderHelper::safeString($name . '_' . $counter); + $uniqueName = ComponentbuilderHelper::safeFieldName($name . '_' . $counter); while (isset($this->uniqueNames[$view]['names'][$uniqueName])) { // increment the number $counter++; // try again - $uniqueName = ComponentbuilderHelper::safeString($name . '_' . $counter); + $uniqueName = ComponentbuilderHelper::safeFieldName($name . '_' . $counter); } // set the new name number $this->uniqueNames[$view]['names'][$uniqueName] = $counter; @@ -4269,12 +4392,11 @@ class Get { return false; } - // only load if string is not already set + // build lang key $keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($string, 'U'); - if (!isset($this->langContent[$this->lang][$keyLang])) - { - $this->langContent[$this->lang][$keyLang] = trim($string); - } + // set the language string + $this->setLangContent($this->lang, $keyLang, $string); + return $keyLang; } @@ -5743,7 +5865,7 @@ class Get $joomla = getcwd(); $counter = array(1 => 0, 2 => 0); // file types to get - $fileTypes = array('\.php', '\.js'); + $fileTypes = array('\.php', '\.js', '\.xml'); // set some local placeholders $placeholders = array(); $placeholders[ComponentbuilderHelper::safeString($this->componentCodeName, 'F') . 'Helper::'] = $this->bbb . 'Component' . $this->ddd . 'Helper::'; @@ -5756,20 +5878,24 @@ class Get chdir($path); foreach ($fileTypes as $type) { - // get a list of files in the current directory tree (only PHP and JS for now) + // get a list of files in the current directory tree (only PHP, JS and XML for now) $files = JFolder::files('.', $type, true, true); - foreach ($files as $file) + // check if files found + if (ComponentbuilderHelper::checkArray($files)) { - $this->searchFileContent($counter, $file, $target, $this->customCodePlaceholders, $placeholders, $today); - // insert new code - if (ComponentbuilderHelper::checkArray($this->newCustomCode)) + foreach ($files as $file) { - $this->setNewCustomCode(100); - } - // update existing custom code - if (ComponentbuilderHelper::checkArray($this->existingCustomCode)) - { - $this->setExistingCustomCode(30); + $this->searchFileContent($counter, $file, $target, $this->customCodePlaceholders, $placeholders, $today); + // insert new code + if (ComponentbuilderHelper::checkArray($this->newCustomCode)) + { + $this->setNewCustomCode(100); + } + // update existing custom code + if (ComponentbuilderHelper::checkArray($this->existingCustomCode)) + { + $this->setExistingCustomCode(30); + } } } } @@ -6189,7 +6315,7 @@ class Get * @param string $updateString The string to update * @param string $string The string to use lang update * - * @return array + * @return string * */ protected function setReverseLangPlaceholders($updateString, $string) @@ -6230,12 +6356,10 @@ class Get { continue; } - // only load if string is not already set + // build lang key $keyLang = $this->langPrefix . '_' . $_keyLang; - if (!isset($this->langContent[$this->lang][$keyLang])) - { - $this->langContent[$this->lang][$keyLang] = trim($lang); - } + // set lang content string + $this->setLangContent($this->lang, $keyLang, $lang); // reverse the placeholders foreach ($langStringTargets as $langStringTarget) { @@ -6263,8 +6387,6 @@ class Get * 1 -> Just replace (default) * 2 -> Check if data string has placeholders * 3 -> Remove placeholders not in data string - * - * @param int $langSwitch The lang switch * * @return string * diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index 81cd2f8cf..d8ef5e2ef 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -19,14 +19,14 @@ class Structure extends Get { /** - * The foulder counter + * The folder counter * * @var int */ public $folderCount = 0; /** - * The foulder counter + * The file counter * * @var int */ @@ -367,6 +367,8 @@ class Structure extends Get $this->setLibaries(); // set the Joomla Version Data $this->joomlaVersionData = $this->setJoomlaVersionData(); + // Trigger Event: jcb_ce_onAfterSetJoomlaVersionData + $this->triggerEvent('jcb_ce_onAfterSetJoomlaVersionData', array(&$this->componentContext, &$this->joomlaVersionData)); // set the dashboard $this->setDynamicDashboard(); // set the new folders @@ -416,6 +418,8 @@ class Structure extends Get { if (ComponentbuilderHelper::checkArray($this->libraries)) { + // Trigger Event: jcb_ce_onBeforeSetLibaries + $this->triggerEvent('jcb_ce_onBeforeSetLibaries', array(&$this->componentContext, &$this->libraries)); // creat the main component folder if (!JFolder::exists($this->componentPath)) { @@ -774,7 +778,7 @@ class Structure extends Get { if (ComponentbuilderHelper::checkObject($this->joomlaVersionData->move->static)) { - $codeName = ComponentbuilderHelper::safeString($this->componentData->name_code); + $codeName = $this->componentCodeName; // TODO needs more looking at this must be dynamic actualy $this->notNew[] = 'PHPExcel.php'; $this->notNew[] = 'LICENSE.txt'; diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 30f8a2d5c..4eb73f5cd 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -380,42 +380,42 @@ class Fields extends Structure $langView = $this->langPrefix . '_' . $this->placeholders[$this->hhh . 'VIEW' . $this->hhh]; $langViews = $this->langPrefix . '_' . $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh]; // set default lang - $this->langContent[$this->lang][$langView] = $view['settings']->name_single; - $this->langContent[$this->lang][$langViews] = $view['settings']->name_list; + $this->setLangContent($this->lang, $langView, $view['settings']->name_single); + $this->setLangContent($this->lang, $langViews, $view['settings']->name_list); // set global item strings - $this->langContent[$this->lang][$langViews . '_N_ITEMS_ARCHIVED'] = "%s " . $view['settings']->name_list . " archived."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_ARCHIVED_1'] = "%s " . $view['settings']->name_single . " archived."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_CHECKED_IN_0'] = "No " . $view['settings']->name_single . " successfully checked in."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_CHECKED_IN_1'] = "%d " . $view['settings']->name_single . " successfully checked in."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_CHECKED_IN_MORE'] = "%d " . $view['settings']->name_list . " successfully checked in."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_DELETED'] = "%s " . $view['settings']->name_list . " deleted."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_DELETED_1'] = "%s " . $view['settings']->name_single . " deleted."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_FEATURED'] = "%s " . $view['settings']->name_list . " featured."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_FEATURED_1'] = "%s " . $view['settings']->name_single . " featured."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_PUBLISHED'] = "%s " . $view['settings']->name_list . " published."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_PUBLISHED_1'] = "%s " . $view['settings']->name_single . " published."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_TRASHED'] = "%s " . $view['settings']->name_list . " trashed."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_TRASHED_1'] = "%s " . $view['settings']->name_single . " trashed."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_UNFEATURED'] = "%s " . $view['settings']->name_list . " unfeatured."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_UNFEATURED_1'] = "%s " . $view['settings']->name_single . " unfeatured."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_UNPUBLISHED'] = "%s " . $view['settings']->name_list . " unpublished."; - $this->langContent[$this->lang][$langViews . '_N_ITEMS_UNPUBLISHED_1'] = "%s " . $view['settings']->name_single . " unpublished."; - $this->langContent[$this->lang][$langViews . '_BATCH_OPTIONS'] = "Batch process the selected " . $view['settings']->name_list; - $this->langContent[$this->lang][$langViews . '_BATCH_TIP'] = "All changes will be applied to all selected " . $view['settings']->name_list; + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_ARCHIVED', "%s " . $view['settings']->name_list . " archived."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_ARCHIVED_1', "%s " . $view['settings']->name_single . " archived."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_CHECKED_IN_0', "No " . $view['settings']->name_single . " successfully checked in."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_CHECKED_IN_1', "%d " . $view['settings']->name_single . " successfully checked in."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_CHECKED_IN_MORE', "%d " . $view['settings']->name_list . " successfully checked in."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_DELETED', "%s " . $view['settings']->name_list . " deleted."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_DELETED_1', "%s " . $view['settings']->name_single . " deleted."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_FEATURED', "%s " . $view['settings']->name_list . " featured."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_FEATURED_1', "%s " . $view['settings']->name_single . " featured."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_PUBLISHED', "%s " . $view['settings']->name_list . " published."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_PUBLISHED_1', "%s " . $view['settings']->name_single . " published."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_TRASHED', "%s " . $view['settings']->name_list . " trashed."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_TRASHED_1', "%s " . $view['settings']->name_single . " trashed."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNFEATURED', "%s " . $view['settings']->name_list . " unfeatured."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNFEATURED_1', "%s " . $view['settings']->name_single . " unfeatured."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNPUBLISHED', "%s " . $view['settings']->name_list . " unpublished."); + $this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNPUBLISHED_1', "%s " . $view['settings']->name_single . " unpublished."); + $this->setLangContent($this->lang, $langViews . '_BATCH_OPTIONS', "Batch process the selected " . $view['settings']->name_list); + $this->setLangContent($this->lang, $langViews . '_BATCH_TIP', "All changes will be applied to all selected " . $view['settings']->name_list); // set some basic defaults - $this->langContent[$this->lang][$langView . '_ERROR_UNIQUE_ALIAS'] = "Another " . $view['settings']->name_single . " has the same alias."; - $this->langContent[$this->lang][$langView . '_CREATED_DATE_LABEL'] = "Created Date"; - $this->langContent[$this->lang][$langView . '_CREATED_DATE_DESC'] = "The date this " . $view['settings']->name_single . " was created."; - $this->langContent[$this->lang][$langView . '_MODIFIED_DATE_LABEL'] = "Modified Date"; - $this->langContent[$this->lang][$langView . '_MODIFIED_DATE_DESC'] = "The date this " . $view['settings']->name_single . " was modified."; - $this->langContent[$this->lang][$langView . '_CREATED_BY_LABEL'] = "Created By"; - $this->langContent[$this->lang][$langView . '_CREATED_BY_DESC'] = "The user that created this " . $view['settings']->name_single . "."; - $this->langContent[$this->lang][$langView . '_MODIFIED_BY_LABEL'] = "Modified By"; - $this->langContent[$this->lang][$langView . '_MODIFIED_BY_DESC'] = "The last user that modified this " . $view['settings']->name_single . "."; - $this->langContent[$this->lang][$langView . '_ORDERING_LABEL'] = "Ordering"; - $this->langContent[$this->lang][$langView . '_VERSION_LABEL'] = "Revision"; - $this->langContent[$this->lang][$langView . '_VERSION_DESC'] = "A count of the number of times this " . $view['settings']->name_single . " has been revised."; - $this->langContent[$this->lang][$langView . '_SAVE_WARNING'] = "Alias already existed so a number was added at the end. You can re-edit the " . $view['settings']->name_single . " to customise the alias."; + $this->setLangContent($this->lang, $langView . '_ERROR_UNIQUE_ALIAS', "Another " . $view['settings']->name_single . " has the same alias."); + $this->setLangContent($this->lang, $langView . '_CREATED_DATE_LABEL', "Created Date"); + $this->setLangContent($this->lang, $langView . '_CREATED_DATE_DESC', "The date this " . $view['settings']->name_single . " was created."); + $this->setLangContent($this->lang, $langView . '_MODIFIED_DATE_LABEL', "Modified Date"); + $this->setLangContent($this->lang, $langView . '_MODIFIED_DATE_DESC', "The date this " . $view['settings']->name_single . " was modified."); + $this->setLangContent($this->lang, $langView . '_CREATED_BY_LABEL', "Created By"); + $this->setLangContent($this->lang, $langView . '_CREATED_BY_DESC', "The user that created this " . $view['settings']->name_single . "."); + $this->setLangContent($this->lang, $langView . '_MODIFIED_BY_LABEL', "Modified By"); + $this->setLangContent($this->lang, $langView . '_MODIFIED_BY_DESC', "The last user that modified this " . $view['settings']->name_single . "."); + $this->setLangContent($this->lang, $langView . '_ORDERING_LABEL', "Ordering"); + $this->setLangContent($this->lang, $langView . '_VERSION_LABEL', "Revision"); + $this->setLangContent($this->lang, $langView . '_VERSION_DESC', "A count of the number of times this " . $view['settings']->name_single . " has been revised."); + $this->setLangContent($this->lang, $langView . '_SAVE_WARNING', "Alias already existed so a number was added at the end. You can re-edit the " . $view['settings']->name_single . " to customise the alias."); // check what type of field builder to use if ($this->fieldBuilderType == 1) { @@ -456,11 +456,15 @@ class Fields extends Structure $dynamicFields = ''; // set the custom table key $dbkey = 'g'; + // Trigger Event: jcb_ce_onBeforeBuildFields + $this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$this->componentContext, &$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews)); // TODO we should add the global and local view switch if field for front end foreach ($view['settings']->fields as $field) { $dynamicFields .= $this->setDynamicField($field, $view, $view['settings']->type, $langView, $view_name_single, $view_name_list, $this->placeholders, $dbkey, true); } + // Trigger Event: jcb_ce_onAfterBuildFields + $this->triggerEvent('jcb_ce_onAfterBuildFields', array(&$this->componentContext, &$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews)); // set the default fields $fieldSet = array(); $fieldSet[] = '
'; @@ -724,11 +728,15 @@ class Fields extends Structure $dynamicFieldsXML = array(); // set the custom table key $dbkey = 'g'; + // Trigger Event: jcb_ce_onBeforeBuildFields + $this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews)); // TODO we should add the global and local view switch if field for front end foreach ($view['settings']->fields as $field) { $dynamicFieldsXML[] = $this->setDynamicField($field, $view, $view['settings']->type, $langView, $view_name_single, $view_name_list, $this->placeholders, $dbkey, true); } + // Trigger Event: jcb_ce_onAfterBuildFields + $this->triggerEvent('jcb_ce_onAfterBuildFields', array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews)); // set the default fields $XML = new simpleXMLElement(''); $fieldSetXML = $XML->addChild('fieldset'); @@ -1206,7 +1214,7 @@ class Fields extends Structure if ($setType === 'option') { // now add to the field set - $field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1) . ""; + $field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1) . ""; $field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1) . " $value) @@ -1228,9 +1236,9 @@ class Fields extends Structure { // has other value then text list($v, $t) = explode('|', $option); - $langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U'); + $langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true); // add to lang array - $this->langContent[$this->lang][$langValue] = $t; + $this->setLangContent($this->lang, $langValue, $t); // no add to option set $optionSet .= PHP_EOL . $this->_t(1) . $taber . $this->_t(2) . ''; $optionArray[$v] = $langValue; @@ -1238,9 +1246,9 @@ class Fields extends Structure else { // text is also the value - $langValue = $langView . '_' . ComponentbuilderHelper::safeString($option, 'U'); + $langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($option, true); // add to lang array - $this->langContent[$this->lang][$langValue] = $option; + $this->setLangContent($this->lang, $langValue, $option); // no add to option set $optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . ''; $optionArray[$option] = $langValue; @@ -1254,9 +1262,9 @@ class Fields extends Structure { // has other value then text list($v, $t) = explode('|', $value); - $langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U'); + $langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true); // add to lang array - $this->langContent[$this->lang][$langValue] = $t; + $this->setLangContent($this->lang, $langValue, $t); // no add to option set $optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . ''; $optionArray[$v] = $langValue; @@ -1264,9 +1272,9 @@ class Fields extends Structure else { // text is also the value - $langValue = $langView . '_' . ComponentbuilderHelper::safeString($value, 'U'); + $langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($value, true); // add to lang array - $this->langContent[$this->lang][$langValue] = $value; + $this->setLangContent($this->lang, $langValue, $value); // no add to option set $optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . ''; $optionArray[$value] = $langValue; @@ -1298,7 +1306,7 @@ class Fields extends Structure elseif ($setType === 'plain') { // now add to the field set - $field .= PHP_EOL . $this->_t(2) . $taber . ""; + $field .= PHP_EOL . $this->_t(2) . $taber . ""; $field .= PHP_EOL . $this->_t(2) . $taber . " $value) { @@ -1312,7 +1320,7 @@ class Fields extends Structure elseif ($setType === 'spacer') { // now add to the field set - $field .= PHP_EOL . $this->_t(2) . ""; + $field .= PHP_EOL . $this->_t(2) . ""; $field .= PHP_EOL . $this->_t(2) . " $value) { @@ -1329,7 +1337,7 @@ class Fields extends Structure if ($typeName === 'repeatable') { // now add to the field set - $field .= PHP_EOL . $this->_t(2) . ""; + $field .= PHP_EOL . $this->_t(2) . ""; $field .= PHP_EOL . $this->_t(2) . " $value) @@ -1404,9 +1412,9 @@ class Fields extends Structure // now add to the field set $field .= $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber); // set lang (just incase) - $r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U'); + $r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true); // add to lang array - $this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W'); + $this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W')); // if label was set use instead if (ComponentbuilderHelper::checkString($r_langLabel)) { @@ -1429,7 +1437,7 @@ class Fields extends Structure elseif ($typeName === 'subform') { // now add to the field set - $field .= PHP_EOL . $this->_t(2) . $taber . ""; + $field .= PHP_EOL . $this->_t(2) . $taber . ""; $field .= PHP_EOL . $this->_t(2) . $taber . " $value) @@ -1521,9 +1529,9 @@ class Fields extends Structure // now add to the field set $field .= $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber); // set lang (just incase) - $r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U'); + $r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true); // add to lang array - $this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W'); + $this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W')); // if label was set use instead if (ComponentbuilderHelper::checkString($r_langLabel)) { @@ -1545,7 +1553,7 @@ class Fields extends Structure elseif ($setType === 'custom') { // now add to the field set - $field .= PHP_EOL . $this->_t(2) . $taber . ""; + $field .= PHP_EOL . $this->_t(2) . $taber . ""; $field .= PHP_EOL . $this->_t(2) . $taber . " $value) { @@ -1594,7 +1602,7 @@ class Fields extends Structure { // now add to the field set $field->fieldXML = new SimpleXMLElement(''); - $field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)"; + $field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)"; foreach ($fieldAttributes as $property => $value) { @@ -1616,9 +1624,9 @@ class Fields extends Structure { // has other value then text list($v, $t) = explode('|', $option); - $langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U'); + $langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true); // add to lang array - $this->langContent[$this->lang][$langValue] = $t; + $this->setLangContent($this->lang, $langValue, $t); // no add to option set $optionXML->addAttribute('value', $v); $optionArray[$v] = $langValue; @@ -1626,9 +1634,9 @@ class Fields extends Structure else { // text is also the value - $langValue = $langView . '_' . ComponentbuilderHelper::safeString($option, 'U'); + $langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($option, true); // add to lang array - $this->langContent[$this->lang][$langValue] = $option; + $this->setLangContent($this->lang, $langValue, $option); // no add to option set $optionXML->addAttribute('value', $option); $optionArray[$option] = $langValue; @@ -1644,9 +1652,9 @@ class Fields extends Structure { // has other value then text list($v, $t) = explode('|', $value); - $langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U'); + $langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true); // add to lang array - $this->langContent[$this->lang][$langValue] = $t; + $this->setLangContent($this->lang, $langValue, $t); // no add to option set $optionXML->addAttribute('value', $v); $optionArray[$v] = $langValue; @@ -1654,9 +1662,9 @@ class Fields extends Structure else { // text is also the value - $langValue = $langView . '_' . ComponentbuilderHelper::safeString($value, 'U'); + $langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($value, true); // add to lang array - $this->langContent[$this->lang][$langValue] = $value; + $this->setLangContent($this->lang, $langValue, $value); // no add to option set $optionXML->addAttribute('value', $value); $optionArray[$value] = $langValue; @@ -1675,7 +1683,7 @@ class Fields extends Structure { // now add to the field set $field->fieldXML = new SimpleXMLElement(''); - $field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)"; + $field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)"; foreach ($fieldAttributes as $property => $value) { @@ -1689,7 +1697,7 @@ class Fields extends Structure { // now add to the field set $field->fieldXML = new SimpleXMLElement(''); - $field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla)"; + $field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla)"; foreach ($fieldAttributes as $property => $value) { @@ -1706,7 +1714,7 @@ class Fields extends Structure { // now add to the field set $field->fieldXML = new SimpleXMLElement(''); - $field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (depreciated)"; + $field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (depreciated)"; foreach ($fieldAttributes as $property => $value) { @@ -1783,9 +1791,9 @@ class Fields extends Structure // now add to the field set ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); // set lang (just incase) - $r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U'); + $r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true); // add to lang array - $this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W'); + $this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W')); // if label was set use instead if (ComponentbuilderHelper::checkString($r_langLabel)) { @@ -1806,7 +1814,7 @@ class Fields extends Structure { // now add to the field set $field->fieldXML = new SimpleXMLElement(''); - $field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)"; + $field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)"; // add all properties foreach ($fieldAttributes as $property => $value) { @@ -1910,9 +1918,9 @@ class Fields extends Structure // now add to the field set ComponentbuilderHelper::xmlAppend($form, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); // set lang (just incase) - $r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U'); + $r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true); // add to lang array - $this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W'); + $this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W')); // if label was set use instead if (ComponentbuilderHelper::checkString($r_langLabel)) { @@ -1934,7 +1942,7 @@ class Fields extends Structure { // now add to the field set $field->fieldXML = new SimpleXMLElement(''); - $field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom)"; + $field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom)"; foreach ($fieldAttributes as $property => $value) { if ($property != 'option') @@ -2005,7 +2013,7 @@ class Fields extends Structure { $this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']][(int) $field['order_edit']] = $name; } - // check if publishing fields were over written + // check if default fields were over written if (in_array($name, $this->defaultFields)) { // just to eliminate @@ -2047,7 +2055,7 @@ class Fields extends Structure { $this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']][(int) $field['order_edit']] = $name; } - // check if publishing fields were over written + // check if default fields were over written if (in_array($name, $this->defaultFields)) { // just to eliminate @@ -2249,14 +2257,14 @@ class Fields extends Structure } elseif ($property['name'] === 'button' && $setCustom) { - // dont load the button to repeatable + // load the button string value if found $xmlValue = (string) ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'button="', '"')); // add to custom values $fieldAttributes['custom']['add_button'] = (ComponentbuilderHelper::checkString($xmlValue) || 1 == $xmlValue) ? $xmlValue : 'false'; } - elseif ($property['name'] === 'required' && $repeatable) + elseif ($property['name'] === 'required' && 'repeatable' === $typeName) { - // dont load the required to repeatable + // dont load the required to repeatable field type $xmlValue = 'false'; } elseif ($viewType == 2 && ($property['name'] === 'readonly' || $property['name'] === 'disabled')) @@ -2320,9 +2328,9 @@ class Fields extends Structure $customLabel = $xmlValue; } // set lang key - $langValue = $langView . '_' . ComponentbuilderHelper::safeString($name . ' ' . $property['name'], 'U'); + $langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($name . ' ' . $property['name'], true); // add to lang array - $this->langContent[$this->lang][$langValue] = $xmlValue; + $this->setLangContent($this->lang, $langValue, $xmlValue); // use lang value $xmlValue = $langValue; } @@ -2552,16 +2560,16 @@ class Fields extends Structure $tempName = $view_name_single . ' category'; } // set lang - $listLangName = $langView . '_' . ComponentbuilderHelper::safeString($tempName, 'U'); + $listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($tempName, true); // add to lang array - $this->langContent[$this->lang][$listLangName] = ComponentbuilderHelper::safeString($tempName, 'W'); + $this->setLangContent($this->lang, $listLangName, ComponentbuilderHelper::safeString($tempName, 'W')); } else { // set lang (just incase) - $listLangName = $langView . '_' . ComponentbuilderHelper::safeString($name, 'U'); + $listLangName = $langView . '_' .ComponentbuilderHelper::safeFieldName($name, true); // add to lang array - $this->langContent[$this->lang][$listLangName] = ComponentbuilderHelper::safeString($name, 'W'); + $this->setLangContent($this->lang, $listLangName, ComponentbuilderHelper::safeString($name, 'W')); // if label was set use instead if (ComponentbuilderHelper::checkString($langLabel)) { @@ -2702,6 +2710,11 @@ class Fields extends Structure } // get the xml extension name $_extension = $this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'extension="', '"'), $this->placeholders); + // if they left out the extention for some reason + if (!ComponentbuilderHelper::checkString($_extension)) + { + $_extension = 'com_' . $this->componentCodeName . '.' . $otherView; + } // load the category builder $this->categoryBuilder[$view_name_list] = array('code' => $name, 'name' => $listLangName, 'extension' => $_extension); // also set code name for title alias fix @@ -2863,9 +2876,9 @@ class Fields extends Structure $this->bbb . 'CODE' . $this->ddd => $data['code'], $this->bbb . 'view_type' . $this->ddd => $view_name_single . '_' . $data['type'], $this->bbb . 'type' . $this->ddd => $data['type'], - $this->bbb . 'com_component' . $this->ddd => (isset($data['custom']['component']) && ComponentbuilderHelper::checkString($data['custom']['component'])) ? ComponentbuilderHelper::safeString($data['custom']['component']) : 'com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh], + $this->bbb . 'com_component' . $this->ddd => (isset($data['custom']['component']) && ComponentbuilderHelper::checkString($data['custom']['component'])) ? ComponentbuilderHelper::safeString($data['custom']['component']) : 'com_' . $this->componentCodeName, // set the generic values - $this->bbb . 'component' . $this->ddd => $this->fileContentStatic[$this->hhh . 'component' . $this->hhh], + $this->bbb . 'component' . $this->ddd => $this->componentCodeName, $this->bbb . 'Component' . $this->ddd => $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh], $this->bbb . 'view' . $this->ddd => (isset($data['custom']['view']) && ComponentbuilderHelper::checkString($data['custom']['view'])) ? ComponentbuilderHelper::safeString($data['custom']['view']) : $view_name_single, $this->bbb . 'views' . $this->ddd => (isset($data['custom']['views']) && ComponentbuilderHelper::checkString($data['custom']['views'])) ? ComponentbuilderHelper::safeString($data['custom']['views']) : $view_name_list @@ -2996,9 +3009,9 @@ class Fields extends Structure // temp holder for name $tempName = $data['custom']['label'] . ' Group'; // set lang - $groupLangName = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($tempName, 'U'); + $groupLangName = $this->langPrefix . '_' . ComponentbuilderHelper::safeFieldName($tempName, true); // add to lang array - $this->langContent[$this->lang][$groupLangName] = ComponentbuilderHelper::safeString($tempName, 'W'); + $this->setLangContent($this->lang, $groupLangName, ComponentbuilderHelper::safeString($tempName, 'W')); // build the Group Control $this->setGroupControl[$data['type']] = $groupLangName; // JFORM_GETGROUPS_PHP <<>> @@ -3033,7 +3046,7 @@ class Fields extends Structure ComponentbuilderHelper::checkString($fieldData['view']) && ComponentbuilderHelper::checkString($fieldData['views'])) { // set local component - $local_component = "com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]; + $local_component = "com_" . $this->componentCodeName; // check that the component value is set if (!isset($fieldData['component']) || !ComponentbuilderHelper::checkString($fieldData['component'])) { @@ -3049,6 +3062,10 @@ class Fields extends Structure { $fieldData['component'] = $this->setPlaceholders($fieldData['component'], $this->placeholders); } + // get core permissions + $coreLoad = false; + // add ref tags + $refLoad = true; // fall back on the field component $component = $fieldData['component']; // check if we should add ref tags (since it only works well on local views) @@ -3057,10 +3074,7 @@ class Fields extends Structure // do not add ref tags $refLoad = false; } - // get core permissions - $coreLoad = false; - // add ref tags - $refLoad = true; + // get core permisssions if (isset($this->permissionCore[$fieldData['view']])) { // get the core permission naming array @@ -3080,15 +3094,15 @@ class Fields extends Structure $addButton[] = $this->_t(1) . "protected function getInput()"; $addButton[] = $this->_t(1) . "{"; $addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " see if we should add buttons"; - $addButton[] = $this->_t(2) . "\$setButton = \$this->getAttribute('button');"; + $addButton[] = $this->_t(2) . "\$set_button = \$this->getAttribute('button');"; $addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " get html"; $addButton[] = $this->_t(2) . "\$html = parent::getInput();"; $addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " if true set button"; - $addButton[] = $this->_t(2) . "if (\$setButton === 'true')"; + $addButton[] = $this->_t(2) . "if (\$set_button === 'true')"; $addButton[] = $this->_t(2) . "{"; $addButton[] = $this->_t(3) . "\$button = array();"; $addButton[] = $this->_t(3) . "\$script = array();"; - $addButton[] = $this->_t(3) . "\$buttonName = \$this->getAttribute('name');"; + $addButton[] = $this->_t(3) . "\$button_code_name = \$this->getAttribute('name');"; $addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " get the input from url"; $addButton[] = $this->_t(3) . "\$app = JFactory::getApplication();"; $addButton[] = $this->_t(3) . "\$jinput = \$app->input;"; @@ -3130,6 +3144,13 @@ class Fields extends Structure $addButton[] = $this->_t(4) . "\$refJ = '&return=' . \$_return;"; $addButton[] = $this->_t(3) . "}"; } + $addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " get button label"; + $addButton[] = $this->_t(3) . "\$button_label = trim(\$button_code_name);"; + $addButton[] = $this->_t(3) . "\$button_label = preg_replace('/_+/', ' ', \$button_label);"; + $addButton[] = $this->_t(3) . "\$button_label = preg_replace('/\s+/', ' ', \$button_label);"; + $addButton[] = $this->_t(3) . "\$button_label = preg_replace(\"/[^A-Za-z ]/\", '', \$button_label);"; + $addButton[] = $this->_t(3) . "\$button_label = ucfirst(strtolower(\$button_label));"; + $addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " get user object"; $addButton[] = $this->_t(3) . "\$user = JFactory::getUser();"; $addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " only add if user allowed to create " . $fieldData['view']; // check if the item has permissions. @@ -3143,12 +3164,7 @@ class Fields extends Structure } $addButton[] = $this->_t(3) . "{"; $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " build Create button"; - $addButton[] = $this->_t(4) . "\$buttonNamee = trim(\$buttonName);"; - $addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);"; - $addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);"; - $addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);"; - $addButton[] = $this->_t(4) . "\$buttonNamee = ucfirst(strtolower(\$buttonNamee));"; - $addButton[] = $this->_t(4) . "\$button[] = 'langPrefix . "_CREATE_NEW_S', \$buttonNamee).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\""; + $addButton[] = $this->_t(4) . "\$button[] = 'langPrefix . "_CREATE_NEW_S', \$button_label).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\""; $addButton[] = $this->_t(5) . "href=\"index.php?option=" . $fieldData['component'] . "&view=" . $fieldData['view'] . "&layout=edit'.\$ref.'\" >"; $addButton[] = $this->_t(5) . "';"; $addButton[] = $this->_t(3) . "}"; @@ -3156,45 +3172,40 @@ class Fields extends Structure // check if the item has permissions. if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($fieldData['view'], $this->permissionBuilder['global'][$core['core.edit']])) { - $addButton[] = $this->_t(3) . "if ((\$buttonName === '" . $fieldData['view'] . "' || \$buttonName === '" . $fieldData['views'] . "') && \$user->authorise('" . $core['core.edit'] . "', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area."; + $addButton[] = $this->_t(3) . "if (\$user->authorise('" . $core['core.edit'] . "', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area."; } else { - $addButton[] = $this->_t(3) . "if ((\$buttonName === '" . $fieldData['view'] . "' || \$buttonName === '" . $fieldData['views'] . "') && \$user->authorise('core.edit', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area."; + $addButton[] = $this->_t(3) . "if (\$user->authorise('core.edit', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area."; } $addButton[] = $this->_t(3) . "{"; $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " build edit button"; - $addButton[] = $this->_t(4) . "\$buttonNamee = trim(\$buttonName);"; - $addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);"; - $addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);"; - $addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);"; - $addButton[] = $this->_t(4) . "\$buttonNamee = ucfirst(strtolower(\$buttonNamee));"; - $addButton[] = $this->_t(4) . "\$button[] = 'langPrefix . "_EDIT_S', \$buttonNamee).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >"; + $addButton[] = $this->_t(4) . "\$button[] = 'langPrefix . "_EDIT_S', \$button_label).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >"; $addButton[] = $this->_t(5) . "';"; $addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " build script"; $addButton[] = $this->_t(4) . "\$script[] = \""; $addButton[] = $this->_t(5) . "jQuery(document).ready(function() {"; - $addButton[] = $this->_t(6) . "jQuery('#adminForm').on('change', '#jform_\".\$buttonName.\"',function (e) {"; + $addButton[] = $this->_t(6) . "jQuery('#adminForm').on('change', '#jform_\".\$button_code_name.\"',function (e) {"; $addButton[] = $this->_t(7) . "e.preventDefault();"; - $addButton[] = $this->_t(7) . "var \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();"; - $addButton[] = $this->_t(7) . "\".\$buttonName.\"Button(\".\$buttonName.\"Value);"; + $addButton[] = $this->_t(7) . "var \".\$button_code_name.\"Value = jQuery('#jform_\".\$button_code_name.\"').val();"; + $addButton[] = $this->_t(7) . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; $addButton[] = $this->_t(6) . "});"; - $addButton[] = $this->_t(6) . "var \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();"; - $addButton[] = $this->_t(6) . "\".\$buttonName.\"Button(\".\$buttonName.\"Value);"; + $addButton[] = $this->_t(6) . "var \".\$button_code_name.\"Value = jQuery('#jform_\".\$button_code_name.\"').val();"; + $addButton[] = $this->_t(6) . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; $addButton[] = $this->_t(5) . "});"; - $addButton[] = $this->_t(5) . "function \".\$buttonName.\"Button(value) {"; + $addButton[] = $this->_t(5) . "function \".\$button_code_name.\"Button(value) {"; $addButton[] = $this->_t(6) . "if (value > 0) {"; // TODO not ideal since value may not be an (int) $addButton[] = $this->_t(7) . "// hide the create button"; - $addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Create').hide();"; + $addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Create').hide();"; $addButton[] = $this->_t(7) . "// show edit button"; - $addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Edit').show();"; + $addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Edit').show();"; $addButton[] = $this->_t(7) . "var url = 'index.php?option=" . $fieldData['component'] . "&view=" . $fieldData['views'] . "&task=" . $fieldData['view'] . ".edit&id='+value+'\".\$refJ.\"';"; // TODO this value may not be the ID - $addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Edit').attr('href', url);"; + $addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Edit').attr('href', url);"; $addButton[] = $this->_t(6) . "} else {"; $addButton[] = $this->_t(7) . "// show the create button"; - $addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Create').show();"; + $addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Create').show();"; $addButton[] = $this->_t(7) . "// hide edit button"; - $addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Edit').hide();"; + $addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Edit').hide();"; $addButton[] = $this->_t(6) . "}"; $addButton[] = $this->_t(5) . "}\";"; $addButton[] = $this->_t(3) . "}"; diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 04443a66f..cc60884ad 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -201,6 +201,13 @@ class Interpretation extends Fields protected $hasIdRequest = array(); protected $libwarning = array(); + /** + * alignment names + * + * @var array + */ + protected $alignmentOptions = array(1 => 'left', 2 => 'right', 3 => 'fullwidth', 4 => 'above', 5 => 'under', 6 => 'leftside', 7 => 'rightside'); + /** * Constructor */ @@ -238,7 +245,7 @@ class Interpretation extends Fields if (isset($this->componentData->add_email_helper) && $this->componentData->add_email_helper) { // set email helper in place with component name - $component = $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]; + $component = $this->componentCodeName; $Component = $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh]; $target = array('admin' => 'emailer'); $done = $this->buildDynamique($target, 'emailer', $component); @@ -355,12 +362,12 @@ class Interpretation extends Fields $bool[] = $this->_t(3) . "return \$this->" . $globalbool . ";"; $bool[] = $this->_t(2) . "}"; $bool[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get the global params"; - $bool[] = $this->_t(2) . "\$params = JComponentHelper::getParams('com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "', true);"; + $bool[] = $this->_t(2) . "\$params = JComponentHelper::getParams('com_" . $this->componentCodeName . "', true);"; $bool[] = $this->_t(2) . "\$whmcs_key = \$params->get('whmcs_key', null);"; $bool[] = $this->_t(2) . "if (\$whmcs_key)"; $bool[] = $this->_t(2) . "{"; $bool[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " load the file"; - $bool[] = $this->_t(3) . "JLoader::import( 'whmcs', JPATH_ADMINISTRATOR .'/components/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "');"; + $bool[] = $this->_t(3) . "JLoader::import( 'whmcs', JPATH_ADMINISTRATOR .'/components/com_" . $this->componentCodeName . "');"; $bool[] = $this->_t(3) . "\$the = new WHMCS(\$whmcs_key);"; $bool[] = $this->_t(3) . "\$this->" . $globalbool . " = \$the->_is;"; $bool[] = $this->_t(3) . "return \$this->" . $globalbool . ";"; @@ -387,12 +394,12 @@ class Interpretation extends Fields $helper[] = $this->_t(1) . "public static function isGenuine()"; $helper[] = $this->_t(1) . "{"; $helper[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get the global params"; - $helper[] = $this->_t(2) . "\$params = JComponentHelper::getParams('com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "', true);"; + $helper[] = $this->_t(2) . "\$params = JComponentHelper::getParams('com_" . $this->componentCodeName . "', true);"; $helper[] = $this->_t(2) . "\$whmcs_key = \$params->get('whmcs_key', null);"; $helper[] = $this->_t(2) . "if (\$whmcs_key)"; $helper[] = $this->_t(2) . "{"; $helper[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " load the file"; - $helper[] = $this->_t(3) . "JLoader::import( 'whmcs', JPATH_ADMINISTRATOR .'/components/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "');"; + $helper[] = $this->_t(3) . "JLoader::import( 'whmcs', JPATH_ADMINISTRATOR .'/components/com_" . $this->componentCodeName . "');"; $helper[] = $this->_t(3) . "\$the = new WHMCS(\$whmcs_key);"; $helper[] = $this->_t(3) . "return \$the->_is;"; $helper[] = $this->_t(2) . "}"; @@ -644,7 +651,7 @@ class Interpretation extends Fields $this->fileContentStatic[$this->hhh . 'WHMCS_ENCRYPT_FILE' . $this->hhh] = PHP_EOL . $this->_t(3) . "whmcs.php"; } // get component name - $component = $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]; + $component = $this->componentCodeName; // set the getCryptKey function to the helper class $function = array(); // start building the getCryptKey function/class method @@ -850,7 +857,7 @@ class Interpretation extends Fields // UPDATESERVER $updateServer = array(); $updateServer[] = PHP_EOL . $this->_t(1) . ""; - $updateServer[] = $this->_t(2) . '' . $this->componentData->update_server_url . ''; + $updateServer[] = $this->_t(2) . '' . $this->componentData->update_server_url . ''; $updateServer[] = $this->_t(1) . ''; // return the array to string $updateServer = implode(PHP_EOL, $updateServer); @@ -1001,7 +1008,7 @@ class Interpretation extends Fields $updateXML[] = $this->_t(1) . ""; $updateXML[] = $this->_t(2) . "" . $this->fileContentStatic[$this->hhh . 'Component_name' . $this->hhh] . ""; $updateXML[] = $this->_t(2) . "" . $this->fileContentStatic[$this->hhh . 'SHORT_DESCRIPTION' . $this->hhh] . ""; - $updateXML[] = $this->_t(2) . "com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . ""; + $updateXML[] = $this->_t(2) . "com_" . $this->componentCodeName . ""; $updateXML[] = $this->_t(2) . "component"; $updateXML[] = $this->_t(2) . "" . $update['version'] . ""; $updateXML[] = $this->_t(2) . '' . $this->fileContentStatic[$this->hhh . 'AUTHORWEBSITE' . $this->hhh] . ''; @@ -1084,7 +1091,7 @@ class Interpretation extends Fields $help[] = $this->_t(2) . "\$db = JFactory::getDbo();"; $help[] = $this->_t(2) . "\$query = \$db->getQuery(true);"; $help[] = $this->_t(2) . "\$query->select(array('a.id','a.groups','a.target','a.type','a.article','a.url'));"; - $help[] = $this->_t(2) . "\$query->from('#__" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "_help_document AS a');"; + $help[] = $this->_t(2) . "\$query->from('#__" . $this->componentCodeName . "_help_document AS a');"; $help[] = $this->_t(2) . "\$query->where('a." . $target . " = '.\$db->quote(\$view));"; $help[] = $this->_t(2) . "\$query->where('a.location = " . (int) $location . "');"; $help[] = $this->_t(2) . "\$query->where('a.published = 1');"; @@ -1141,7 +1148,7 @@ class Interpretation extends Fields $help[] = $this->_t(1) . "protected static function loadHelpTextLink(\$id)"; $help[] = $this->_t(1) . "{"; $help[] = $this->_t(2) . "\$token = JSession::getFormToken();"; - $help[] = $this->_t(2) . "return 'index.php?option=com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "&task=help.getText&id=' . (int) \$id . '&token=' . \$token;"; + $help[] = $this->_t(2) . "return 'index.php?option=com_" . $this->componentCodeName . "&task=help.getText&id=' . (int) \$id . '&token=' . \$token;"; $help[] = $this->_t(1) . "}"; // return the help methods return implode(PHP_EOL, $help); @@ -1479,10 +1486,10 @@ class Interpretation extends Fields if ($this->buildDynamique($target, 'admin_menu')) { // set the lang - $lang = ComponentbuilderHelper::safeString('com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '_menu_' . $viewName_single, 'U'); - $this->langContent['adminsys'][$lang . '_TITLE'] = 'Create ' . $view['settings']->name_single; - $this->langContent['adminsys'][$lang . '_OPTION'] = 'Create ' . $view['settings']->name_single; - $this->langContent['adminsys'][$lang . '_DESC'] = $view['settings']->short_description; + $lang = ComponentbuilderHelper::safeString('com_' . $this->componentCodeName . '_menu_' . $viewName_single, 'U'); + $this->setLangContent('adminsys', $lang . '_TITLE', 'Create ' . $view['settings']->name_single); + $this->setLangContent('adminsys', $lang . '_OPTION', 'Create ' . $view['settings']->name_single); + $this->setLangContent('adminsys', $lang . '_DESC', $view['settings']->short_description); //start loading xml $xml = ''; $xml .= PHP_EOL . ''; @@ -1509,10 +1516,10 @@ class Interpretation extends Fields if ($this->buildDynamique($target, 'menu')) { // set the lang - $lang = ComponentbuilderHelper::safeString('com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '_menu_' . $view['settings']->code, 'U'); - $this->langContent['adminsys'][$lang . '_TITLE'] = $view['settings']->name; - $this->langContent['adminsys'][$lang . '_OPTION'] = $view['settings']->name; - $this->langContent['adminsys'][$lang . '_DESC'] = $view['settings']->description; + $lang = ComponentbuilderHelper::safeString('com_' . $this->componentCodeName . '_menu_' . $view['settings']->code, 'U'); + $this->setLangContent('adminsys', $lang . '_TITLE', $view['settings']->name); + $this->setLangContent('adminsys', $lang . '_OPTION', $view['settings']->name); + $this->setLangContent('adminsys', $lang . '_DESC', $view['settings']->description); //start loading xml $xml = ''; $xml .= PHP_EOL . ''; @@ -1526,8 +1533,8 @@ class Interpretation extends Fields $xml .= PHP_EOL . $this->_t(1) . ''; $xml .= PHP_EOL . $this->_t(1) . ''; $xml .= PHP_EOL . $this->_t(2) . '
_t(3) . 'addrulepath="/administrator/components/com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '/models/rules"'; - $xml .= PHP_EOL . $this->_t(3) . 'addfieldpath="/administrator/components/com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '/models/fields">'; + $xml .= PHP_EOL . $this->_t(3) . 'addrulepath="/administrator/components/com_' . $this->componentCodeName . '/models/rules"'; + $xml .= PHP_EOL . $this->_t(3) . 'addfieldpath="/administrator/components/com_' . $this->componentCodeName . '/models/fields">'; if (isset($this->hasIdRequest[$view['settings']->code]) && ComponentbuilderHelper::checkArray($this->hasIdRequest[$view['settings']->code])) { foreach ($this->hasIdRequest[$view['settings']->code] as $requestFieldXML) @@ -1555,8 +1562,8 @@ class Interpretation extends Fields $xml .= PHP_EOL . $this->_t(1) . ''; $xml .= PHP_EOL . $this->_t(1) . ''; $xml .= PHP_EOL . $this->_t(2) . '
_t(3) . 'addrulepath="/administrator/components/com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '/models/rules"'; - $xml .= PHP_EOL . $this->_t(3) . 'addfieldpath="/administrator/components/com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '/models/fields">'; + $xml .= PHP_EOL . $this->_t(3) . 'addrulepath="/administrator/components/com_' . $this->componentCodeName . '/models/rules"'; + $xml .= PHP_EOL . $this->_t(3) . 'addfieldpath="/administrator/components/com_' . $this->componentCodeName . '/models/fields">'; $xml .= implode($this->_t(3), $params); $xml .= PHP_EOL . $this->_t(2) . '
'; $xml .= PHP_EOL . $this->_t(1) . '
'; @@ -1857,7 +1864,7 @@ class Interpretation extends Fields $Component = $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh]; // set context $context = (isset($get['context'])) ? $get['context'] : $code; - $context = 'com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '.' . $context; + $context = 'com_' . $this->componentCodeName . '.' . $context; // load parms builder only once $params = false; foreach ($checker as $field => $array) @@ -2310,7 +2317,7 @@ class Interpretation extends Fields if (isset($this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW' . $this->hhh]) && $this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW' . $this->hhh] != $view['settings']->code) { $redirectMessage = $this->_t(3) . "//" . $this->setLine(__LINE__) . " redirect away to the default view if no access allowed."; - $redirectString = "JRoute::_('index.php?option=com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "&view=" . $this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW' . $this->hhh] . "')"; + $redirectString = "JRoute::_('index.php?option=com_" . $this->componentCodeName . "&view=" . $this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW' . $this->hhh] . "')"; } else { @@ -2318,15 +2325,12 @@ class Interpretation extends Fields $redirectString = 'JURI::root()'; } $accessCheck[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " check if this user has permission to access item"; - $accessCheck[] = $this->_t(2) . "if (!" . $userString . "->authorise('site." . $view['settings']->code . ".access', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "'))"; + $accessCheck[] = $this->_t(2) . "if (!" . $userString . "->authorise('site." . $view['settings']->code . ".access', 'com_" . $this->componentCodeName . "'))"; $accessCheck[] = $this->_t(2) . "{"; $accessCheck[] = $this->_t(3) . "\$app = JFactory::getApplication();"; // set lang $langKeyWord = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Not authorised to view ' . $view['settings']->code . '!', 'U'); - if (!isset($this->langContent['site'][$langKeyWord])) - { - $this->langContent['site'][$langKeyWord] = 'Not authorised to view ' . $view['settings']->code . '!'; - } + $this->setLangContent('site', $langKeyWord, 'Not authorised to view ' . $view['settings']->code . '!'); $accessCheck[] = $this->_t(3) . "\$app->enqueueMessage(JText:" . ":_('" . $langKeyWord . "'), 'error');"; $accessCheck[] = $redirectMessage; $accessCheck[] = $this->_t(3) . "\$app->redirect(" . $redirectString . ");"; @@ -2405,10 +2409,7 @@ class Interpretation extends Fields { $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2) . "\$app = JFactory::getApplication();"; $langKeyWoord = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Not found or access denied', 'U'); - if (!isset($this->langContent[$this->lang][$langKeyWoord])) - { - $this->langContent[$this->lang][$langKeyWoord] = 'Not found, or access denied.'; - } + $this->setLangContent($this->lang, $langKeyWoord, 'Not found, or access denied.'); $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2) . "//" . $this->setLine(__LINE__) . " If no data is found redirect to default page and show warning."; $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2) . "\$app->enqueueMessage(JText:" . ":_('" . $langKeyWoord . "'), 'warning');"; if ('site' === $this->target) @@ -2416,7 +2417,7 @@ class Interpretation extends Fields // check that the default and the redirect page is not the same if (isset($this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW' . $this->hhh]) && $this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW' . $this->hhh] != $code) { - $redirectString = "JRoute::_('index.php?option=com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "&view=" . $this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW' . $this->hhh] . "')"; + $redirectString = "JRoute::_('index.php?option=com_" . $this->componentCodeName . "&view=" . $this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW' . $this->hhh] . "')"; } else { @@ -2426,7 +2427,7 @@ class Interpretation extends Fields } else { - $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2) . "\$app->redirect('index.php?option=com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "');"; + $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2) . "\$app->redirect('index.php?option=com_" . $this->componentCodeName . "');"; } $getItem .= PHP_EOL . $this->_t(1) . $tab . $this->_t(2) . "return false;"; } @@ -2581,7 +2582,7 @@ class Interpretation extends Fields $main .= PHP_EOL . $this->_t(3) . "\$this->initSet = true;"; $main .= PHP_EOL . $this->_t(2) . "}"; $main .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get the global params"; - $main .= PHP_EOL . $this->_t(2) . "\$globalParams = JComponentHelper::getParams('com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "', true);"; + $main .= PHP_EOL . $this->_t(2) . "\$globalParams = JComponentHelper::getParams('com_" . $this->componentCodeName . "', true);"; // set php before listquery if (isset($view->add_php_getlistquery) && $view->add_php_getlistquery == 1 && isset($view->php_getlistquery) && ComponentbuilderHelper::checkString($view->php_getlistquery)) { @@ -3346,11 +3347,13 @@ class Interpretation extends Fields if ($view['settings']->main_get->gettype == 1 && ComponentbuilderHelper::checkArray($view['settings']->main_get->plugin_events)) { $method .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Process the content plugins."; - $method .= PHP_EOL . $this->_t(2) . "JPluginHelper::importPlugin('content');"; - $method .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Setup Event Object."; - $method .= PHP_EOL . $this->_t(2) . "\$this->item->event = new stdClass;"; - $method .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Check if item has params, or pass global params"; - $method .= PHP_EOL . $this->_t(2) . "\$params = (isset(\$this->item->params) && " . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::checkJson(\$this->item->params)) ? json_decode(\$this->item->params) : \$this->params;"; + $method .= PHP_EOL . $this->_t(2) . "if (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::checkObject(\$this->item))"; + $method .= PHP_EOL . $this->_t(2) . "{"; + $method .= PHP_EOL . $this->_t(3) . "JPluginHelper::importPlugin('content');"; + $method .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Setup Event Object."; + $method .= PHP_EOL . $this->_t(3) . "\$this->item->event = new stdClass;"; + $method .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Check if item has params, or pass global params"; + $method .= PHP_EOL . $this->_t(3) . "\$params = (isset(\$this->item->params) && " . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::checkJson(\$this->item->params)) ? json_decode(\$this->item->params) : \$this->params;"; // load the defaults foreach ($view['settings']->main_get->plugin_events as $plugin_event) { @@ -3359,15 +3362,16 @@ class Interpretation extends Fields { // TODO the onContentPrepare already gets triggered on the fields of its relation // $method .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " onContentPrepare Event Trigger."; - // $method .= PHP_EOL . $this->_t(2) . "\$dispatcher->trigger('onContentPrepare', array ('com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . ".article', &\$this->item, &\$this->params, 0));"; + // $method .= PHP_EOL . $this->_t(2) . "\$dispatcher->trigger('onContentPrepare', array ('com_" . $this->componentCodeName . ".article', &\$this->item, &\$this->params, 0));"; } else { - $method .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " " . $plugin_event . " Event Trigger."; - $method .= PHP_EOL . $this->_t(2) . "\$results = \$dispatcher->trigger('" . $plugin_event . "', array('com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $view['settings']->context . "', &\$this->item, &\$params, 0));"; - $method .= PHP_EOL . $this->_t(2) . '$this->item->event->' . $plugin_event . ' = trim(implode("\n", $results));'; + $method .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " " . $plugin_event . " Event Trigger."; + $method .= PHP_EOL . $this->_t(3) . "\$results = \$dispatcher->trigger('" . $plugin_event . "', array('com_" . $this->componentCodeName . "." . $view['settings']->context . "', &\$this->item, &\$params, 0));"; + $method .= PHP_EOL . $this->_t(3) . '$this->item->event->' . $plugin_event . ' = trim(implode("\n", $results));'; } } + $method .= PHP_EOL . $this->_t(2) . "}"; } $method .= PHP_EOL . PHP_EOL . $this->_t(2) . "parent::display(\$tpl);"; } @@ -3598,14 +3602,14 @@ class Interpretation extends Fields // Load to lang $keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($custom_button['name'], 'U'); $keyCode = ComponentbuilderHelper::safeString($custom_button['name']); - $this->langContent[$this->lang][$keyLang] = trim($custom_button['name']); + $this->setLangContent($this->lang, $keyLang, $custom_button['name']); // load the button if (3 !== $type && ($custom_button['target'] != 2 || $this->target === 'site')) { // add cpanel button TODO does not work well on site with permissions if ($custom_button['target'] == 2 || $this->target === 'site') { - $buttons[] = $this->_t(1) . $tab . $this->_t(1) . "if (\$this->user->authorise('" . $viewName . "." . $keyCode . "', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "'))"; + $buttons[] = $this->_t(1) . $tab . $this->_t(1) . "if (\$this->user->authorise('" . $viewName . "." . $keyCode . "', 'com_" . $this->componentCodeName . "'))"; } else { @@ -3626,7 +3630,7 @@ class Interpretation extends Fields { $this->onlyFunctionButton[$viewsName] = array(); } - $this->onlyFunctionButton[$viewsName][] = $this->_t(1) . $tab . "if (\$this->user->authorise('" . $viewName . "." . $keyCode . "', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "'))"; + $this->onlyFunctionButton[$viewsName][] = $this->_t(1) . $tab . "if (\$this->user->authorise('" . $viewName . "." . $keyCode . "', 'com_" . $this->componentCodeName . "'))"; $this->onlyFunctionButton[$viewsName][] = $this->_t(1) . $tab . "{"; $this->onlyFunctionButton[$viewsName][] = $this->_t(1) . $tab . $this->_t(1) . "//" . $this->setLine(__LINE__) . " add " . $custom_button['name'] . " button."; $this->onlyFunctionButton[$viewsName][] = $this->_t(1) . $tab . $this->_t(1) . "JToolBarHelper::custom('" . $viewsName . "." . $custom_button['method'] . "', '" . $custom_button['icomoon'] . "', '', '" . $keyLang . "', false);"; @@ -3634,7 +3638,7 @@ class Interpretation extends Fields } else { - $buttons[] = $this->_t(1) . $tab . $this->_t(1) . "if (\$this->user->authorise('" . $viewName . "." . $keyCode . "', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "'))"; + $buttons[] = $this->_t(1) . $tab . $this->_t(1) . "if (\$this->user->authorise('" . $viewName . "." . $keyCode . "', 'com_" . $this->componentCodeName . "'))"; $buttons[] = $this->_t(1) . $tab . $this->_t(1) . "{"; $buttons[] = $this->_t(1) . $tab . $this->_t(2) . "//" . $this->setLine(__LINE__) . " add " . $custom_button['name'] . " button."; $buttons[] = $this->_t(1) . $tab . $this->_t(2) . "JToolBarHelper::custom('" . $viewsName . "." . $custom_button['method'] . "', '" . $custom_button['icomoon'] . "', '', '" . $keyLang . "', '" . $validateSelection . "');"; @@ -3762,11 +3766,11 @@ class Interpretation extends Fields // set path if ('site' === $this->target) { - $path = '/components/com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '/assets/js/' . $view['settings']->code . '.js'; + $path = '/components/com_' . $this->componentCodeName . '/assets/js/' . $view['settings']->code . '.js'; } else { - $path = '/administrator/components/com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '/assets/js/' . $view['settings']->code . '.js'; + $path = '/administrator/components/com_' . $this->componentCodeName . '/assets/js/' . $view['settings']->code . '.js'; } // add script to file $this->fileContentDynamic[$view['settings']->code][$this->hhh . $TARGET . '_JAVASCRIPT_FILE' . $this->hhh] = $this->setPlaceholders($view['settings']->javascript_file, $this->placeholders); @@ -3922,7 +3926,7 @@ class Interpretation extends Fields $chart[] = PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " add the google chart builder class."; $chart[] = $this->_t(2) . "require_once JPATH_COMPONENT_ADMINISTRATOR.'/helpers/chartbuilder.php';"; $chart[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " load the google chart js."; - $chart[] = $this->_t(2) . "\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/js/google.jsapi.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; + $chart[] = $this->_t(2) . "\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->componentCodeName . "/js/google.jsapi.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; $chart[] = $this->_t(2) . "\$this->document->addScript('https://canvg.googlecode.com/svn/trunk/rgbcolor.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; $chart[] = $this->_t(2) . "\$this->document->addScript('https://canvg.googlecode.com/svn/trunk/canvg.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; return implode(PHP_EOL, $chart); @@ -3947,7 +3951,7 @@ class Interpretation extends Fields $setter .= PHP_EOL . $this->_t(2) . "require_once( JPATH_COMPONENT_ADMINISTRATOR.'/helpers/headercheck.php' );"; } $setter .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Initialize the header checker."; - $setter .= PHP_EOL . $this->_t(2) . "\$HeaderCheck = new " . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "HeaderCheck;"; + $setter .= PHP_EOL . $this->_t(2) . "\$HeaderCheck = new " . $this->componentCodeName . "HeaderCheck;"; // check if this view should get libraries if (isset($this->libManager[$this->target][$view['settings']->code]) && ComponentbuilderHelper::checkArray($this->libManager[$this->target][$view['settings']->code])) { @@ -4150,15 +4154,15 @@ class Interpretation extends Fields { if (strpos($root, '/media/') !== false && strpos($root, '/admin/') === false && strpos($root, '/site/') === false) { - return str_replace('/media/', '/media/com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '/', $root); + return str_replace('/media/', '/media/com_' . $this->componentCodeName . '/', $root); } elseif (strpos($root, '/media/') === false && strpos($root, '/admin/') !== false && strpos($root, '/site/') === false) { - return str_replace('/admin/', '/administrator/components/com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '/', $root); + return str_replace('/admin/', '/administrator/components/com_' . $this->componentCodeName . '/', $root); } elseif (strpos($root, '/media/') === false && strpos($root, '/admin/') === false && strpos($root, '/site/') !== false) { - return str_replace('/site/', '/components/com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '/', $root); + return str_replace('/site/', '/components/com_' . $this->componentCodeName . '/', $root); } return $root; } @@ -4195,12 +4199,12 @@ class Interpretation extends Fields $setter .= PHP_EOL . PHP_EOL . $tabV . $this->_t(2) . "//" . $this->setLine(__LINE__) . " The uikit css."; $setter .= PHP_EOL . $tabV . $this->_t(2) . "if ((!\$HeaderCheck->css_loaded('uikit.min') || \$uikit == 1) && \$uikit != 2 && \$uikit != 3)"; $setter .= PHP_EOL . $tabV . $this->_t(2) . "{"; - $setter .= PHP_EOL . $tabV . $this->_t(3) . "\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/uikit-v2/css/uikit'.\$style.\$size.'.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; + $setter .= PHP_EOL . $tabV . $this->_t(3) . "\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->componentCodeName . "/uikit-v2/css/uikit'.\$style.\$size.'.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $setter .= PHP_EOL . $tabV . $this->_t(2) . "}"; $setter .= PHP_EOL . $tabV . $this->_t(2) . "//" . $this->setLine(__LINE__) . " The uikit js."; $setter .= PHP_EOL . $tabV . $this->_t(2) . "if ((!\$HeaderCheck->js_loaded('uikit.min') || \$uikit == 1) && \$uikit != 2 && \$uikit != 3)"; $setter .= PHP_EOL . $tabV . $this->_t(2) . "{"; - $setter .= PHP_EOL . $tabV . $this->_t(3) . "\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/uikit-v2/js/uikit'.\$size.'.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; + $setter .= PHP_EOL . $tabV . $this->_t(3) . "\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->componentCodeName . "/uikit-v2/js/uikit'.\$size.'.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; $setter .= PHP_EOL . $tabV . $this->_t(2) . "}"; } // load the components need @@ -4245,16 +4249,16 @@ class Interpretation extends Fields $setter .= PHP_EOL . $tabV . $this->_t(4) . "foreach (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::\$uk_components[\$class] as \$name)"; $setter .= PHP_EOL . $tabV . $this->_t(4) . "{"; $setter .= PHP_EOL . $tabV . $this->_t(5) . "//" . $this->setLine(__LINE__) . " check if the CSS file exists."; - $setter .= PHP_EOL . $tabV . $this->_t(5) . "if (JFile::exists(JPATH_ROOT.'/media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))"; + $setter .= PHP_EOL . $tabV . $this->_t(5) . "if (JFile::exists(JPATH_ROOT.'/media/com_" . $this->componentCodeName . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))"; $setter .= PHP_EOL . $tabV . $this->_t(5) . "{"; $setter .= PHP_EOL . $tabV . $this->_t(6) . "//" . $this->setLine(__LINE__) . " load the css."; - $setter .= PHP_EOL . $tabV . $this->_t(6) . "\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; + $setter .= PHP_EOL . $tabV . $this->_t(6) . "\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->componentCodeName . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $setter .= PHP_EOL . $tabV . $this->_t(5) . "}"; $setter .= PHP_EOL . $tabV . $this->_t(5) . "//" . $this->setLine(__LINE__) . " check if the JavaScript file exists."; - $setter .= PHP_EOL . $tabV . $this->_t(5) . "if (JFile::exists(JPATH_ROOT.'/media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/uikit-v2/js/components/'.\$name.\$size.'.js'))"; + $setter .= PHP_EOL . $tabV . $this->_t(5) . "if (JFile::exists(JPATH_ROOT.'/media/com_" . $this->componentCodeName . "/uikit-v2/js/components/'.\$name.\$size.'.js'))"; $setter .= PHP_EOL . $tabV . $this->_t(5) . "{"; $setter .= PHP_EOL . $tabV . $this->_t(6) . "//" . $this->setLine(__LINE__) . " load the js."; - $setter .= PHP_EOL . $tabV . $this->_t(6) . "\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/uikit-v2/js/components/'.\$name.\$size.'.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);"; + $setter .= PHP_EOL . $tabV . $this->_t(6) . "\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->componentCodeName . "/uikit-v2/js/components/'.\$name.\$size.'.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);"; $setter .= PHP_EOL . $tabV . $this->_t(5) . "}"; $setter .= PHP_EOL . $tabV . $this->_t(4) . "}"; $setter .= PHP_EOL . $tabV . $this->_t(3) . "}"; @@ -4274,16 +4278,16 @@ class Interpretation extends Fields $setter .= PHP_EOL . $tabV . $this->_t(4) . "foreach (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::\$uk_components[\$class] as \$name)"; $setter .= PHP_EOL . $tabV . $this->_t(4) . "{"; $setter .= PHP_EOL . $tabV . $this->_t(5) . "//" . $this->setLine(__LINE__) . " check if the CSS file exists."; - $setter .= PHP_EOL . $tabV . $this->_t(5) . "if (JFile::exists(JPATH_ROOT.'/media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))"; + $setter .= PHP_EOL . $tabV . $this->_t(5) . "if (JFile::exists(JPATH_ROOT.'/media/com_" . $this->componentCodeName . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))"; $setter .= PHP_EOL . $tabV . $this->_t(5) . "{"; $setter .= PHP_EOL . $tabV . $this->_t(6) . "//" . $this->setLine(__LINE__) . " load the css."; - $setter .= PHP_EOL . $tabV . $this->_t(6) . "\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; + $setter .= PHP_EOL . $tabV . $this->_t(6) . "\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->componentCodeName . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $setter .= PHP_EOL . $tabV . $this->_t(5) . "}"; $setter .= PHP_EOL . $tabV . $this->_t(5) . "//" . $this->setLine(__LINE__) . " check if the JavaScript file exists."; - $setter .= PHP_EOL . $tabV . $this->_t(5) . "if (JFile::exists(JPATH_ROOT.'/media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/uikit-v2/js/components/'.\$name.\$size.'.js'))"; + $setter .= PHP_EOL . $tabV . $this->_t(5) . "if (JFile::exists(JPATH_ROOT.'/media/com_" . $this->componentCodeName . "/uikit-v2/js/components/'.\$name.\$size.'.js'))"; $setter .= PHP_EOL . $tabV . $this->_t(5) . "{"; $setter .= PHP_EOL . $tabV . $this->_t(6) . "//" . $this->setLine(__LINE__) . " load the js."; - $setter .= PHP_EOL . $tabV . $this->_t(6) . "\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/uikit-v2/js/components/'.\$name.\$size.'.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);"; + $setter .= PHP_EOL . $tabV . $this->_t(6) . "\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->componentCodeName . "/uikit-v2/js/components/'.\$name.\$size.'.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);"; $setter .= PHP_EOL . $tabV . $this->_t(5) . "}"; $setter .= PHP_EOL . $tabV . $this->_t(4) . "}"; $setter .= PHP_EOL . $tabV . $this->_t(3) . "}"; @@ -4303,12 +4307,12 @@ class Interpretation extends Fields $setter .= PHP_EOL . $tabV . $this->_t(2) . "//" . $this->setLine(__LINE__) . " The uikit css."; $setter .= PHP_EOL . $tabV . $this->_t(2) . "if ((!\$HeaderCheck->css_loaded('uikit.min') || \$uikit == 1) && \$uikit != 2 && \$uikit != 3)"; $setter .= PHP_EOL . $tabV . $this->_t(2) . "{"; - $setter .= PHP_EOL . $tabV . $this->_t(3) . "\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/uikit-v3/css/uikit'.\$size.'.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; + $setter .= PHP_EOL . $tabV . $this->_t(3) . "\$this->document->addStyleSheet(JURI::root(true) .'/media/com_" . $this->componentCodeName . "/uikit-v3/css/uikit'.\$size.'.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $setter .= PHP_EOL . $tabV . $this->_t(2) . "}"; $setter .= PHP_EOL . $tabV . $this->_t(2) . "//" . $this->setLine(__LINE__) . " The uikit js."; $setter .= PHP_EOL . $tabV . $this->_t(2) . "if ((!\$HeaderCheck->js_loaded('uikit.min') || \$uikit == 1) && \$uikit != 2 && \$uikit != 3)"; $setter .= PHP_EOL . $tabV . $this->_t(2) . "{"; - $setter .= PHP_EOL . $tabV . $this->_t(3) . "\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/uikit-v3/js/uikit'.\$size.'.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; + $setter .= PHP_EOL . $tabV . $this->_t(3) . "\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->componentCodeName . "/uikit-v3/js/uikit'.\$size.'.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; $setter .= PHP_EOL . $tabV . $this->_t(2) . "}"; if (2 == $this->uikit) { @@ -4378,7 +4382,7 @@ class Interpretation extends Fields { case 1: // top - return '
' . PHP_EOL; + return '' . PHP_EOL; break; case 2: // bottom @@ -4649,7 +4653,7 @@ class Interpretation extends Fields $script = ''; // get component name $Component = $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh]; - $component = $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]; + $component = $this->componentCodeName; // check if there was script added before modeling of data $script .= $this->getCustomScriptBuilder('php_before_save', $view, PHP_EOL . PHP_EOL); // turn array into JSON string @@ -4739,7 +4743,7 @@ class Interpretation extends Fields // reset $oserver = ""; // set component name - $component = $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]; + $component = $this->componentCodeName; // add the tags observer if (isset($this->tagsBuilder[$view]) && ComponentbuilderHelper::checkString($this->tagsBuilder[$view])) { @@ -4772,7 +4776,7 @@ class Interpretation extends Fields if (isset($this->componentData->admin_views) && ComponentbuilderHelper::checkArray($this->componentData->admin_views)) { // set component name - $component = $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]; + $component = $this->componentCodeName; // reset $dbStuff = array(); // start loading the content type data @@ -4859,7 +4863,7 @@ class Interpretation extends Fields $script = $this->setComponentToContentTypes('install'); // set the component name - $component = $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]; + $component = $this->componentCodeName; // add the assets table update for permissions rules if (isset($this->assetsRules) && ComponentbuilderHelper::checkArray($this->assetsRules)) @@ -4934,7 +4938,7 @@ class Interpretation extends Fields if (isset($this->componentData->admin_views) && ComponentbuilderHelper::checkArray($this->componentData->admin_views)) { $script .= PHP_EOL . $this->_t(3) . 'echo \''; - $script .= PHP_EOL . $this->_t(4) . ''; + $script .= PHP_EOL . $this->_t(4) . ''; $script .= PHP_EOL . $this->_t(4) . ''; $script .= PHP_EOL . $this->_t(4) . "

Upgrade to Version " . $this->fileContentStatic[$this->hhh . 'ACTUALVERSION' . $this->hhh] . " Was Successful! Let us know if anything is not working as expected.

';"; } @@ -4952,7 +4956,7 @@ class Interpretation extends Fields $script = ''; if (isset($this->uninstallScriptBuilder) && ComponentbuilderHelper::checkArray($this->uninstallScriptBuilder)) { - $component = $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]; + $component = $this->componentCodeName; // start loading the data to delet $script .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get Application object"; $script .= PHP_EOL . $this->_t(2) . "\$app = JFactory::getApplication();"; @@ -5358,7 +5362,7 @@ class Interpretation extends Fields $routeHelper[] = $this->_t(4) . "'" . $viewName_single . "' => array((int) \$id)"; $routeHelper[] = $this->_t(3) . ");"; $routeHelper[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Create the link"; - $routeHelper[] = $this->_t(3) . "\$link = 'index.php?option=com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "&view=" . $viewName_single . "&id='. \$id;"; + $routeHelper[] = $this->_t(3) . "\$link = 'index.php?option=com_" . $this->componentCodeName . "&view=" . $viewName_single . "&id='. \$id;"; $routeHelper[] = $this->_t(2) . "}"; $routeHelper[] = $this->_t(2) . "else"; $routeHelper[] = $this->_t(2) . "{"; @@ -5367,13 +5371,13 @@ class Interpretation extends Fields $routeHelper[] = $this->_t(4) . "'" . $viewName_single . "' => array()"; $routeHelper[] = $this->_t(3) . ");"; $routeHelper[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Create the link but don't add the id."; - $routeHelper[] = $this->_t(3) . "\$link = 'index.php?option=com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "&view=" . $viewName_single . "';"; + $routeHelper[] = $this->_t(3) . "\$link = 'index.php?option=com_" . $this->componentCodeName . "&view=" . $viewName_single . "';"; $routeHelper[] = $this->_t(2) . "}"; if ('category' != $viewName_single && 'categories' != $viewName_single) { $routeHelper[] = $this->_t(2) . "if (\$catid > 1)"; $routeHelper[] = $this->_t(2) . "{"; - $routeHelper[] = $this->_t(3) . "\$categories = JCategories::getInstance('" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $viewName_list . "');"; + $routeHelper[] = $this->_t(3) . "\$categories = JCategories::getInstance('" . $this->componentCodeName . "." . $viewName_list . "');"; $routeHelper[] = $this->_t(3) . "\$category = \$categories->get(\$catid);"; $routeHelper[] = $this->_t(3) . "if (\$category)"; $routeHelper[] = $this->_t(3) . "{"; @@ -5436,7 +5440,7 @@ class Interpretation extends Fields { if (isset($get['selection']['table'])) { - $viewTable = str_replace('#__' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '_', '', $get['selection']['table']); + $viewTable = str_replace('#__' . $this->componentCodeName . '_', '', $get['selection']['table']); } } break; @@ -6038,7 +6042,7 @@ class Interpretation extends Fields $fixUniqe[] = $this->_t(4) . "{"; $fixUniqe[] = $this->_t(5) . "\$data['" . $alias . "'] = JFilterOutput::stringURLSafe(" . implode(' . " " . ', $titleData) . ");"; $fixUniqe[] = $this->_t(4) . "}"; - $fixUniqe[] = PHP_EOL . $this->_t(4) . "\$table = JTable::getInstance('" . $viewName_single . "', '" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "Table');"; + $fixUniqe[] = PHP_EOL . $this->_t(4) . "\$table = JTable::getInstance('" . $viewName_single . "', '" . $this->componentCodeName . "Table');"; if ($setCategory && count($titles) == 1) { $fixUniqe[] = PHP_EOL . $this->_t(4) . "if (\$table->load(array('" . $alias . "' => \$data['" . $alias . "'], '" . $category . "' => \$data['" . $category . "'])) && (\$table->id != \$data['id'] || \$data['id'] == 0))"; @@ -6233,7 +6237,7 @@ class Interpretation extends Fields if (isset($this->queryBuilder) && ComponentbuilderHelper::checkArray($this->queryBuilder)) { // set the main db prefix - $component = $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]; + $component = $this->componentCodeName; // start building the db $db = ''; foreach ($this->queryBuilder as $view => $fields) @@ -6528,83 +6532,86 @@ class Interpretation extends Fields { // add final list of needed lang strings $componentName = JFilterOutput::cleanText($this->componentData->name); - $this->langContent['adminsys'][$this->langPrefix] = $componentName; - $this->langContent['adminsys'][$this->langPrefix . '_CONFIGURATION'] = $componentName . ' Configuration'; - $this->langContent['admin'][$this->langPrefix] = $componentName; - $this->langContent['admin'][$this->langPrefix . '_BACK'] = 'Back'; - $this->langContent['admin'][$this->langPrefix . '_DASH'] = 'Dashboard'; - $this->langContent['admin'][$this->langPrefix . '_VERSION'] = 'Version'; - $this->langContent['admin'][$this->langPrefix . '_DATE'] = 'Date'; - $this->langContent['admin'][$this->langPrefix . '_AUTHOR'] = 'Author'; - $this->langContent['admin'][$this->langPrefix . '_WEBSITE'] = 'Website'; - $this->langContent['admin'][$this->langPrefix . '_LICENSE'] = 'License'; - $this->langContent['admin'][$this->langPrefix . '_CONTRIBUTORS'] = 'Contributors'; - $this->langContent['admin'][$this->langPrefix . '_CONTRIBUTOR'] = 'Contributor'; - $this->langContent['admin'][$this->langPrefix . '_DASHBOARD'] = $componentName . ' Dashboard'; - $this->langContent['admin'][$this->langPrefix . '_SAVE_SUCCESS'] = "Great! Item successfully saved."; - $this->langContent['admin'][$this->langPrefix . '_SAVE_WARNING'] = "The value already existed so please select another."; - $this->langContent['admin'][$this->langPrefix . '_HELP_MANAGER'] = "Help"; - $this->langContent['admin'][$this->langPrefix . '_NEW'] = "New"; - $this->langContent['admin'][$this->langPrefix . '_CLOSE_NEW'] = "Close & New"; - $this->langContent['admin'][$this->langPrefix . '_CREATE_NEW_S'] = "Create New %s"; - $this->langContent['admin'][$this->langPrefix . '_EDIT_S'] = "Edit %s"; - $this->langContent['admin'][$this->langPrefix . '_KEEP_ORIGINAL_STATE'] = "- Keep Original State -"; - $this->langContent['admin'][$this->langPrefix . '_KEEP_ORIGINAL_ACCESS'] = "- Keep Original Access -"; - $this->langContent['admin'][$this->langPrefix . '_KEEP_ORIGINAL_CATEGORY'] = "- Keep Original Category -"; - $this->langContent['admin'][$this->langPrefix . '_PUBLISHED'] = 'Published'; - $this->langContent['admin'][$this->langPrefix . '_INACTIVE'] = 'Inactive'; - $this->langContent['admin'][$this->langPrefix . '_ARCHIVED'] = 'Archived'; - $this->langContent['admin'][$this->langPrefix . '_TRASHED'] = 'Trashed'; - $this->langContent['admin'][$this->langPrefix . '_NO_ACCESS_GRANTED'] = "No Access Granted!"; - $this->langContent['admin'][$this->langPrefix . '_NOT_FOUND_OR_ACCESS_DENIED'] = "Not found or access denied!"; + // Trigger Event: jcb_ce_onBeforeBuildAdminLang + $this->triggerEvent('jcb_ce_onBeforeBuildAdminLang', array(&$this->componentContext, &$this->langContent['admin'], &$this->langPrefix, &$componentName)); + // start loding the defaults + $this->setLangContent('adminsys', $this->langPrefix, $componentName); + $this->setLangContent('adminsys', $this->langPrefix . '_CONFIGURATION', $componentName . ' Configuration'); + $this->setLangContent('admin', $this->langPrefix, $componentName); + $this->setLangContent('admin', $this->langPrefix . '_BACK', 'Back'); + $this->setLangContent('admin', $this->langPrefix . '_DASH', 'Dashboard'); + $this->setLangContent('admin', $this->langPrefix . '_VERSION', 'Version'); + $this->setLangContent('admin', $this->langPrefix . '_DATE', 'Date'); + $this->setLangContent('admin', $this->langPrefix . '_AUTHOR', 'Author'); + $this->setLangContent('admin', $this->langPrefix . '_WEBSITE', 'Website'); + $this->setLangContent('admin', $this->langPrefix . '_LICENSE', 'License'); + $this->setLangContent('admin', $this->langPrefix . '_CONTRIBUTORS', 'Contributors'); + $this->setLangContent('admin', $this->langPrefix . '_CONTRIBUTOR', 'Contributor'); + $this->setLangContent('admin', $this->langPrefix . '_DASHBOARD', $componentName . ' Dashboard'); + $this->setLangContent('admin', $this->langPrefix . '_SAVE_SUCCESS', "Great! Item successfully saved."); + $this->setLangContent('admin', $this->langPrefix . '_SAVE_WARNING', "The value already existed so please select another."); + $this->setLangContent('admin', $this->langPrefix . '_HELP_MANAGER', "Help"); + $this->setLangContent('admin', $this->langPrefix . '_NEW', "New"); + $this->setLangContent('admin', $this->langPrefix . '_CLOSE_NEW', "Close & New"); + $this->setLangContent('admin', $this->langPrefix . '_CREATE_NEW_S', "Create New %s"); + $this->setLangContent('admin', $this->langPrefix . '_EDIT_S', "Edit %s"); + $this->setLangContent('admin', $this->langPrefix . '_KEEP_ORIGINAL_STATE', "- Keep Original State -"); + $this->setLangContent('admin', $this->langPrefix . '_KEEP_ORIGINAL_ACCESS', "- Keep Original Access -"); + $this->setLangContent('admin', $this->langPrefix . '_KEEP_ORIGINAL_CATEGORY', "- Keep Original Category -"); + $this->setLangContent('admin', $this->langPrefix . '_PUBLISHED', 'Published'); + $this->setLangContent('admin', $this->langPrefix . '_INACTIVE', 'Inactive'); + $this->setLangContent('admin', $this->langPrefix . '_ARCHIVED', 'Archived'); + $this->setLangContent('admin', $this->langPrefix . '_TRASHED', 'Trashed'); + $this->setLangContent('admin', $this->langPrefix . '_NO_ACCESS_GRANTED', "No Access Granted!"); + $this->setLangContent('admin', $this->langPrefix . '_NOT_FOUND_OR_ACCESS_DENIED', "Not found or access denied!"); if ($this->componentData->add_license && $this->componentData->license_type == 3) { - $this->langContent['admin']['NIE_REG_NIE'] = "

License not set for " . $componentName . ".

Notify your administrator!
The license can be obtained from " . $this->componentData->companyname . ".

"; + $this->setLangContent('admin', 'NIE_REG_NIE', "

License not set for " . $componentName . ".

Notify your administrator!
The license can be obtained from " . $this->componentData->companyname . ".

"); } // add the langug files needed to import and export data if ($this->addEximport) { - $this->langContent['admin'][$this->langPrefix . '_EXPORT_FAILED'] = "Export Failed"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_FAILED'] = "Import Failed"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_TITLE'] = "Data Importer"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_NO_IMPORT_TYPE_FOUND'] = "Import type not found."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE'] = "Package to import not found."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_ERROR'] = "Import error."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_SUCCESS'] = "Great! Import successful."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_MSG_WARNIMPORTFILE'] = "Warning, import file error."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_MSG_NO_FILE_SELECTED'] = "No import file selected."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_MSG_PLEASE_SELECT_A_FILE'] = "Please select a file to import."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS'] = "Please link all columns."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_MSG_PLEASE_SELECT_A_DIRECTORY'] = "Please enter the file directory."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_MSG_WARNIMPORTUPLOADERROR'] = "Warning, import upload error."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'] = "Please enter the file directory."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'] = "Path does not have a valid file."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'] = "Does not have a valid file type."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_MSG_ENTER_A_URL'] = "Please enter a url."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_MSG_INVALID_URL'] = "Invalid url."; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_CONTINUE'] = "Continue"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_FROM_UPLOAD'] = "Upload"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_SELECT_FILE'] = "Select File"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_UPLOAD_BOTTON'] = "Upload File"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_FROM_DIRECTORY'] = "Directory"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_SELECT_FILE_DIRECTORY'] = "Set the path to file"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_GET_BOTTON'] = "Get File"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_FROM_URL'] = "URL"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_SELECT_FILE_URL'] = "Enter file URL"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_UPDATE_DATA'] = "Import Data"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_FORMATS_ACCEPTED'] = "formats accepted"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_LINK_FILE_TO_TABLE_COLUMNS'] = "Link File to Table Columns"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_TABLE_COLUMNS'] = "Table Columns"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_FILE_COLUMNS'] = "File Columns"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_PLEASE_SELECT_COLUMN'] = "-- Please Select Column --"; - $this->langContent['admin'][$this->langPrefix . '_IMPORT_IGNORE_COLUMN'] = "-- Ignore This Column --"; + $this->setLangContent('admin', $this->langPrefix . '_EXPORT_FAILED', "Export Failed"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_FAILED', "Import Failed"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_TITLE', "Data Importer"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_NO_IMPORT_TYPE_FOUND', "Import type not found."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE', "Package to import not found."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_ERROR', "Import error."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_SUCCESS', "Great! Import successful."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_MSG_WARNIMPORTFILE', "Warning, import file error."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_MSG_NO_FILE_SELECTED', "No import file selected."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_MSG_PLEASE_SELECT_A_FILE', "Please select a file to import."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS', "Please link all columns."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_MSG_PLEASE_SELECT_A_DIRECTORY', "Please enter the file directory."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_MSG_WARNIMPORTUPLOADERROR', "Warning, import upload error."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY', "Please enter the file directory."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE', "Path does not have a valid file."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE', "Does not have a valid file type."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_MSG_ENTER_A_URL', "Please enter a url."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_MSG_INVALID_URL', "Invalid url."); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_CONTINUE', "Continue"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_FROM_UPLOAD', "Upload"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_SELECT_FILE', "Select File"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_UPLOAD_BOTTON', "Upload File"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_FROM_DIRECTORY', "Directory"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_SELECT_FILE_DIRECTORY', "Set the path to file"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_GET_BOTTON', "Get File"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_FROM_URL', "URL"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_SELECT_FILE_URL', "Enter file URL"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_UPDATE_DATA', "Import Data"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_FORMATS_ACCEPTED', "formats accepted"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_LINK_FILE_TO_TABLE_COLUMNS', "Link File to Table Columns"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_TABLE_COLUMNS', "Table Columns"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_FILE_COLUMNS', "File Columns"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_PLEASE_SELECT_COLUMN', "-- Please Select Column --"); + $this->setLangContent('admin', $this->langPrefix . '_IMPORT_IGNORE_COLUMN', "-- Ignore This Column --"); } // check if the both array is set if (isset($this->langContent['both']) && ComponentbuilderHelper::checkArray($this->langContent['both'])) { foreach ($this->langContent['both'] as $keylang => $langval) { - $this->langContent['admin'][$keylang] = $langval; + $this->setLangContent('admin', $keylang, $langval); } } // check if the both admin array is set @@ -6612,11 +6619,14 @@ class Interpretation extends Fields { foreach ($this->langContent['bothadmin'] as $keylang => $langval) { - $this->langContent['admin'][$keylang] = $langval; + $this->setLangContent('admin', $keylang, $langval); } } if (isset($this->langContent['admin']) && ComponentbuilderHelper::checkArray($this->langContent['admin'])) { + // Trigger Event: jcb_ce_onAfterBuildAdminLang + $this->triggerEvent('jcb_ce_onAfterBuildAdminLang', array(&$this->componentContext, &$this->langContent['admin'], &$this->langPrefix, &$componentName)); + // sort the strings ksort($this->langContent['admin']); // load to global languages $this->languages[$this->langTag]['admin'] = $this->langContent['admin']; @@ -6631,33 +6641,37 @@ class Interpretation extends Fields public function setLangSite() { // add final list of needed lang strings - $this->langContent['site'][$this->langPrefix] = ComponentbuilderHelper::safeString($this->componentData->name, 'W'); + $componentName = JFilterOutput::cleanText($this->componentData->name); + // Trigger Event: jcb_ce_onBeforeBuildSiteLang + $this->triggerEvent('jcb_ce_onBeforeBuildSiteLang', array(&$this->componentContext, &$this->langContent['site'], &$this->langPrefix, &$componentName)); + // add final list of needed lang strings + $this->setLangContent('site', $this->langPrefix, $componentName); // some more defaults - $this->langContent['site']['JTOOLBAR_APPLY'] = "Save"; - $this->langContent['site']['JTOOLBAR_SAVE_AS_COPY'] = "Save as Copy"; - $this->langContent['site']['JTOOLBAR_SAVE'] = "Save & Close"; - $this->langContent['site']['JTOOLBAR_SAVE_AND_NEW'] = "Save & New"; - $this->langContent['site']['JTOOLBAR_CANCEL'] = "Cancel"; - $this->langContent['site']['JTOOLBAR_CLOSE'] = "Close"; - $this->langContent['site']['JTOOLBAR_HELP'] = "Help"; - $this->langContent['site']['JGLOBAL_FIELD_ID_LABEL'] = "ID"; - $this->langContent['site']['JGLOBAL_FIELD_ID_DESC'] = "Record number in the database."; - $this->langContent['site']['JGLOBAL_FIELD_MODIFIED_LABEL'] = "Modified Date"; - $this->langContent['site']['COM_CONTENT_FIELD_MODIFIED_DESC'] = "The last date this item was modified."; - $this->langContent['site']['JGLOBAL_FIELD_MODIFIED_BY_LABEL'] = "Modified By"; - $this->langContent['site']['JGLOBAL_FIELD_MODIFIED_BY_DESC'] = "The user who did the last modification."; - $this->langContent['site'][$this->langPrefix . '_NEW'] = "New"; - $this->langContent['site'][$this->langPrefix . '_CREATE_NEW_S'] = "Create New %s"; - $this->langContent['site'][$this->langPrefix . '_EDIT_S'] = "Edit %s"; - $this->langContent['site'][$this->langPrefix . '_NO_ACCESS_GRANTED'] = "No Access Granted!"; - $this->langContent['site'][$this->langPrefix . '_NOT_FOUND_OR_ACCESS_DENIED'] = "Not found or access denied!"; + $this->setLangContent('site', 'JTOOLBAR_APPLY', "Save"); + $this->setLangContent('site', 'JTOOLBAR_SAVE_AS_COPY', "Save as Copy"); + $this->setLangContent('site', 'JTOOLBAR_SAVE', "Save & Close"); + $this->setLangContent('site', 'JTOOLBAR_SAVE_AND_NEW', "Save & New"); + $this->setLangContent('site', 'JTOOLBAR_CANCEL', "Cancel"); + $this->setLangContent('site', 'JTOOLBAR_CLOSE', "Close"); + $this->setLangContent('site', 'JTOOLBAR_HELP', "Help"); + $this->setLangContent('site', 'JGLOBAL_FIELD_ID_LABEL', "ID"); + $this->setLangContent('site', 'JGLOBAL_FIELD_ID_DESC', "Record number in the database."); + $this->setLangContent('site', 'JGLOBAL_FIELD_MODIFIED_LABEL', "Modified Date"); + $this->setLangContent('site', 'COM_CONTENT_FIELD_MODIFIED_DESC', "The last date this item was modified."); + $this->setLangContent('site', 'JGLOBAL_FIELD_MODIFIED_BY_LABEL', "Modified By"); + $this->setLangContent('site', 'JGLOBAL_FIELD_MODIFIED_BY_DESC', "The user who did the last modification."); + $this->setLangContent('site', $this->langPrefix . '_NEW', "New"); + $this->setLangContent('site', $this->langPrefix . '_CREATE_NEW_S', "Create New %s"); + $this->setLangContent('site', $this->langPrefix . '_EDIT_S', "Edit %s"); + $this->setLangContent('site', $this->langPrefix . '_NO_ACCESS_GRANTED', "No Access Granted!"); + $this->setLangContent('site', $this->langPrefix . '_NOT_FOUND_OR_ACCESS_DENIED', "Not found or access denied!"); // check if the both array is set if (isset($this->langContent['both']) && ComponentbuilderHelper::checkArray($this->langContent['both'])) { foreach ($this->langContent['both'] as $keylang => $langval) { - $this->langContent['site'][$keylang] = $langval; + $this->setLangContent('site', $keylang, $langval); } } // check if the both site array is set @@ -6665,11 +6679,14 @@ class Interpretation extends Fields { foreach ($this->langContent['bothsite'] as $keylang => $langval) { - $this->langContent['site'][$keylang] = $langval; + $this->setLangContent('site', $keylang, $langval); } } if (isset($this->langContent['site']) && ComponentbuilderHelper::checkArray($this->langContent['site'])) { + // Trigger Event: jcb_ce_onAfterBuildSiteLang + $this->triggerEvent('jcb_ce_onAfterBuildSiteLang', array(&$this->componentContext, &$this->langContent['site'], &$this->langPrefix, &$componentName)); + // sort the strings ksort($this->langContent['site']); // load to global languages $this->languages[$this->langTag]['site'] = $this->langContent['site']; @@ -6684,20 +6701,27 @@ class Interpretation extends Fields public function setLangSiteSys() { // add final list of needed lang strings - $this->langContent['sitesys'][$this->langPrefix] = ComponentbuilderHelper::safeString($this->componentData->name, 'W'); - $this->langContent['sitesys'][$this->langPrefix . '_NO_ACCESS_GRANTED'] = "No Access Granted!"; - $this->langContent['sitesys'][$this->langPrefix . '_NOT_FOUND_OR_ACCESS_DENIED'] = "Not found or access denied!"; + $componentName = JFilterOutput::cleanText($this->componentData->name); + // Trigger Event: jcb_ce_onBeforeBuildSiteSysLang + $this->triggerEvent('jcb_ce_onBeforeBuildSiteSysLang', array(&$this->componentContext, &$this->langContent['sitesys'], &$this->langPrefix, &$componentName)); + // add final list of needed lang strings + $this->setLangContent('sitesys', $this->langPrefix, $componentName); + $this->setLangContent('sitesys', $this->langPrefix . '_NO_ACCESS_GRANTED', "No Access Granted!"); + $this->setLangContent('sitesys', $this->langPrefix . '_NOT_FOUND_OR_ACCESS_DENIED', "Not found or access denied!"); // check if the both site array is set if (isset($this->langContent['bothsite']) && ComponentbuilderHelper::checkArray($this->langContent['bothsite'])) { foreach ($this->langContent['bothsite'] as $keylang => $langval) { - $this->langContent['sitesys'][$keylang] = $langval; + $this->setLangContent('sitesys', $keylang, $langval); } } if (isset($this->langContent['sitesys']) && ComponentbuilderHelper::checkArray($this->langContent['sitesys'])) { + // Trigger Event: jcb_ce_onAfterBuildSiteSysLang + $this->triggerEvent('jcb_ce_onAfterBuildSiteSysLang', array(&$this->componentContext, &$this->langContent['sitesys'], &$this->langPrefix, &$componentName)); + // sort strings ksort($this->langContent['sitesys']); // load to global languages $this->languages[$this->langTag]['sitesys'] = $this->langContent['sitesys']; @@ -6711,16 +6735,23 @@ class Interpretation extends Fields public function setLangAdminSys() { + // add final list of needed lang strings + $componentName = JFilterOutput::cleanText($this->componentData->name); + // Trigger Event: jcb_ce_onBeforeBuildAdminSysLang + $this->triggerEvent('jcb_ce_onBeforeBuildAdminSysLang', array(&$this->componentContext, &$this->langContent['adminsys'], &$this->langPrefix, &$componentName)); // check if the both admin array is set if (isset($this->langContent['bothadmin']) && ComponentbuilderHelper::checkArray($this->langContent['bothadmin'])) { foreach ($this->langContent['bothadmin'] as $keylang => $langval) { - $this->langContent['adminsys'][$keylang] = $langval; + $this->setLangContent('adminsys', $keylang, $langval); } } if (isset($this->langContent['adminsys']) && ComponentbuilderHelper::checkArray($this->langContent['adminsys'])) { + // Trigger Event: jcb_ce_onAfterBuildAdminSysLang + $this->triggerEvent('jcb_ce_onAfterBuildAdminSysLang', array(&$this->componentContext, &$this->langContent['adminsys'], &$this->langPrefix, &$componentName)); + // sort strings ksort($this->langContent['adminsys']); // load to global languages $this->languages[$this->langTag]['adminsys'] = $this->langContent['adminsys']; @@ -7132,7 +7163,7 @@ class Interpretation extends Fields foreach ($this->customAdminViewListLink[$viewName_list] as $customLinkView) { $customAdminViewButton .= PHP_EOL . $this->_t(3) . "get('" . $customLinkView['link'] . ".access')): ?>"; - $customAdminViewButton .= PHP_EOL . $this->_t(4) . 'fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] . '_' . $customLinkView['NAME'] . "'" . '); ?>" >'; + $customAdminViewButton .= PHP_EOL . $this->_t(4) . 'fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] . '_' . $customLinkView['NAME'] . "'" . '); ?>" >'; $customAdminViewButton .= PHP_EOL . $this->_t(3) . ""; $customAdminViewButton .= PHP_EOL . $this->_t(4) . 'fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] . '_' . $customLinkView['NAME'] . "'" . '); ?>">'; $customAdminViewButton .= PHP_EOL . $this->_t(3) . ""; @@ -7230,7 +7261,7 @@ class Interpretation extends Fields // get the other view $otherViews = $this->catCodeBuilder[$viewName_single]['views']; // return the link to category - return 'index.php?option=com_categories&task=category.edit&id=' . $item['code'] . '; ?>&extension=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '.' . $otherViews; + return 'index.php?option=com_categories&task=category.edit&id=' . $item['code'] . '; ?>&extension=com_' . $this->componentCodeName . '.' . $otherViews; } elseif ($item['type'] === 'user' && !$item['title']) { @@ -7274,7 +7305,7 @@ class Interpretation extends Fields // get the other view $otherViews = $this->catCodeBuilder[$viewName_single]['views']; // return the authority to category - return $user . "->authorise('core.edit', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $otherViews . ".category.' . (int)\$item->" . $item['code'] . ")"; + return $user . "->authorise('core.edit', 'com_" . $this->componentCodeName . "." . $otherViews . ".category.' . (int)\$item->" . $item['code'] . ")"; } elseif ($item['type'] === 'user' && !$item['title']) { @@ -7293,10 +7324,10 @@ class Interpretation extends Fields // check if the item has permissions. if ($coreLoadLink && (isset($coreLink['core.edit']) && isset($this->permissionBuilder[$coreLink['core.edit']])) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$coreLink['core.edit']]) && in_array($item['custom']['view'], $this->permissionBuilder[$coreLink['core.edit']])) { - return $user . "->authorise('" . $coreLink['core.edit'] . "', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $item['custom']['view'] . ".' . (int)\$item->" . $item['id_code'] . ")"; + return $user . "->authorise('" . $coreLink['core.edit'] . "', 'com_" . $this->componentCodeName . "." . $item['custom']['view'] . ".' . (int)\$item->" . $item['id_code'] . ")"; } // return default for this external item - return $user . "->authorise('core.edit', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $item['custom']['view'] . ".' . (int)\$item->" . $item['id_code'] . ")"; + return $user . "->authorise('core.edit', 'com_" . $this->componentCodeName . "." . $item['custom']['view'] . ".' . (int)\$item->" . $item['id_code'] . ")"; } elseif (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['extends'] === 'user' && !$item['title'] && isset($item['id_code'])) { @@ -7347,15 +7378,9 @@ class Interpretation extends Fields // set id lang $idLangName = $langView . '_ID'; // add to lang array - if (!isset($this->langContent[$this->lang][$statusLangName])) - { - $this->langContent[$this->lang][$statusLangName] = 'Status'; - } + $this->setLangContent($this->lang, $statusLangName, 'Status'); // add to lang array - if (!isset($this->langContent[$this->lang][$idLangName])) - { - $this->langContent[$this->lang][$idLangName] = 'Id'; - } + $this->setLangContent($this->lang, $idLangName, 'Id'); // set default $head = ''; $head .= PHP_EOL . $this->_t(1) . "canEdit&& \$this->canState): ?>"; @@ -7445,215 +7470,79 @@ class Interpretation extends Fields return ''; } + /** + * set Tabs Layouts Fields Array + * + * @param string $view_name_single The single view name + * + * @return string The array + * + */ + public function getTabLayoutFieldsArray($view_name_single) + { + // check if the load build is set for this view + if (isset($this->layoutBuilder[$view_name_single]) && ComponentbuilderHelper::checkArray($this->layoutBuilder[$view_name_single])) + { + $layoutArray = array(); + foreach ($this->layoutBuilder[$view_name_single] as $layout => $alignments) + { + // sort the alignments + ksort($alignments); + $alignmentArray= array(); + foreach ($alignments as $alignment => $fields) + { + // sort the fields + ksort($fields); + $fieldArray= array(); + foreach ($fields as $field) + { + // add each field + $fieldArray[] = PHP_EOL . $this->_t(4) . "'" . $field . "'"; + } + // add the alignemnt key + $alignmentArray[] = PHP_EOL . $this->_t(3) . "'" . $this->alignmentOptions[$alignment] . "' => array(" . implode(',', $fieldArray) . PHP_EOL . $this->_t(3) . ")"; + } + // add the layout key + $layoutArray[] = PHP_EOL . $this->_t(2) . "'" . ComponentbuilderHelper::safeString($layout) . "' => array(" . implode(',', $alignmentArray) . PHP_EOL . $this->_t(2) . ")"; + } + return 'array(' . implode(',', $layoutArray) . PHP_EOL . $this->_t(1) . ")"; + } + return 'array()'; + } + + /** + * set Edit Body + * + * @param array $view The view data + * + * @return string The edit body + * + */ public function setEditBody(&$view) { // set view name - $viewName_single = ComponentbuilderHelper::safeString($view['settings']->name_single); - // alignment - $alignmentNames = array(1 => 'left', 2 => 'right', 3 => 'fullwidth', 4 => 'above', 5 => 'under', 6 => 'leftside', 7 => 'rightside'); + $view_name_single = ComponentbuilderHelper::safeString($view['settings']->name_single); // main lang prefix - $langView = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($viewName_single, 'U'); - - if (isset($this->layoutBuilder[$viewName_single]) && ComponentbuilderHelper::checkArray($this->layoutBuilder[$viewName_single])) + $langView = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($view_name_single, 'U'); + // check if the load build is set for this view + if (isset($this->layoutBuilder[$view_name_single]) && ComponentbuilderHelper::checkArray($this->layoutBuilder[$view_name_single])) { - // set the linked view tabs - $linkedTab = array(); + // reset the linked keys $keys = array(); - // setup correct core target - $coreLoad = false; - if (isset($this->permissionCore[$viewName_single])) - { - $core = $this->permissionCore[$viewName_single]; - $coreLoad = true; - } - if (isset($this->linkedAdminViews[$viewName_single]) && ComponentbuilderHelper::checkArray($this->linkedAdminViews[$viewName_single])) - { - foreach ($this->linkedAdminViews[$viewName_single] as $linkedView) - { - $tabName = $view['settings']->tabs[(int) $linkedView['tab']]; - $this->tabCounter[$viewName_single][$linkedView['tab']] = $tabName; - $linkedTab[$linkedView['adminview']] = $linkedView['tab']; - if (ComponentbuilderHelper::checkString($linkedView['key']) && ComponentbuilderHelper::checkString($linkedView['parentkey'])) - { - $keys[$linkedView['adminview']] = array('key' => $linkedView['key'], 'parentKey' => $linkedView['parentkey']); - } - else - { - $keys[$linkedView['adminview']] = array('key' => null, 'parentKey' => null); - } - if (isset($linkedView['addnew'])) - { - $keys[$linkedView['adminview']]['addNewButton'] = (int) $linkedView['addnew']; - } - else - { - $keys[$linkedView['adminview']]['addNewButton'] = 0; - } - } - } + $linkedViewIdentifier = array(); + // set the linked view tabs + $linkedTab = $this->getEditBodyLinkedAdminViewsTabs($view, $view_name_single, $keys, $linkedViewIdentifier); // custom tab searching array $searchTabs = array(); - // start tab set - $bucket = array(); + // reset tab values $leftside = ''; $rightside = ''; $footer = ''; $header = ''; $mainwidth = 12; $sidewidth = 0; - ksort($this->tabCounter[$viewName_single]); - foreach ($this->tabCounter[$viewName_single] as $tabNr => $tabName) - { - // check if we must load a custom tab - - $tabWidth = 12; - $lrCounter = 0; - // set tab lang - $tabLangName = $langView . '_' . ComponentbuilderHelper::safeString($tabName, 'U'); - // set tab code name - $tabCodeName = ComponentbuilderHelper::safeString($tabName); - /// set the values to use in search latter - $searchTabs[$tabCodeName] = $tabNr; - // add to lang array - if (!isset($this->langContent[$this->lang][$tabLangName])) - { - $this->langContent[$this->lang][$tabLangName] = $tabName; - } - // check if linked view belongs to this tab - $buildLayout = true; - $linkedViewId = ''; - if (ComponentbuilderHelper::checkArray($linkedTab)) - { - if (($linkedViewId = array_search($tabNr, $linkedTab)) !== false) - { - // don't build - $buildLayout = false; - } - } - if ($buildLayout) - { - // sort to make sure it loads left first - $alignments = $this->layoutBuilder[$viewName_single][$tabName]; - ksort($alignments); - foreach ($alignments as $alignment => $names) - { - // set layout code name - $layoutCodeName = $tabCodeName . '_' . $alignmentNames[$alignment]; - // reset each time - $items = ''; - $itemCounter = 0; - ksort($names); - foreach ($names as $nr => $name) - { - if ($itemCounter == 0) - { - $items .= "'" . $name . "'"; - } - else - { - $items .= "," . PHP_EOL . $this->_t(1) . "'" . $name . "'"; - } - $itemCounter++; - } - switch ($alignment) - { - case 1: // left - case 2: // right - // count - $lrCounter++; - // set as items layout - $this->setLayout($viewName_single, $layoutCodeName, $items, 'layoutitems'); - // set the lang to tab - $bucket[$tabCodeName]['lang'] = $tabLangName; - // load the body - if (!isset($bucket[$tabCodeName][(int) $alignment])) - { - $bucket[$tabCodeName][(int) $alignment] = ''; - } - $bucket[$tabCodeName][(int) $alignment] .= ""; - break; - case 3: // fullwidth - // set as items layout - $this->setLayout($viewName_single, $layoutCodeName, $items, 'layoutfull'); - // set the lang to tab - $bucket[$tabCodeName]['lang'] = $tabLangName; - // load the body - if (!isset($bucket[$tabCodeName][(int) $alignment])) - { - $bucket[$tabCodeName][(int) $alignment] = ''; - } - $bucket[$tabCodeName][(int) $alignment] .= ""; - break; - case 4: // above - // set as title layout - $this->setLayout($viewName_single, $layoutCodeName, $items, 'layouttitle'); - // load to header - $header .= PHP_EOL . $this->_t(1) . ""; - break; - case 5: // under - // set as title layout - $this->setLayout($viewName_single, $layoutCodeName, $items, 'layouttitle'); - // load to footer - $footer .= PHP_EOL . PHP_EOL . "
" . PHP_EOL . ""; - break; - case 6: // left side - $tabWidth = $tabWidth - 2; - // set as items layout - $this->setLayout($viewName_single, $layoutCodeName, $items, 'layoutitems'); - // load the body - $leftside .= PHP_EOL . $this->_t(1) . ""; - break; - case 7: // right side - $tabWidth = $tabWidth - 2; - // set as items layout - $this->setLayout($viewName_single, $layoutCodeName, $items, 'layoutitems'); - // load the body - $rightside .= PHP_EOL . $this->_t(1) . ""; - break; - } - } - } - else - { - // set layout code name - $layoutCodeName = $tabCodeName . '_fullwidth'; - // set identifiers - $linkedViewIdentifier[$linkedViewId] = $tabCodeName; - //set function name - $codeName = ComponentbuilderHelper::safeString($this->uniquekey(3) . $tabCodeName); - // set as items layout - $this->setLayout($viewName_single, $layoutCodeName, $codeName, 'layoutlinkedview'); - // set the lang to tab - $bucket[$tabCodeName]['lang'] = $tabLangName; - // set all the linked view stuff - $this->secondRunAdmin['setLinkedView'][] = array( - 'viewId' => $linkedViewId, - 'viewName_single' => $viewName_single, - 'codeName' => $codeName, - 'layoutCodeName' => $layoutCodeName, - 'key' => $keys[$linkedViewId]['key'], - 'parentKey' => $keys[$linkedViewId]['parentKey'], - 'addNewButon' => $keys[$linkedViewId]['addNewButton']); - // load the body - if (!isset($bucket[$tabCodeName][3])) - { - $bucket[$tabCodeName][3] = ''; - } - $bucket[$tabCodeName][3] .= ""; - } - // width calculator :) - if ($tabWidth == 8) - { - $mainwidth = 8; - $sidewidth = 2; - } - elseif ($tabWidth == 10 && $mainwidth != 8) - { - $mainwidth = 9; - $sidewidth = 3; - } - $bucket[$tabCodeName]['lr'] = $lrCounter; - } + // get the tabs with positions + $tabBucket = $this->getEditBodyTabs($view_name_single, $langView, $linkedTab, $keys, $linkedViewIdentifier, $searchTabs, $leftside, $rightside, $footer, $header, $mainwidth, $sidewidth); // tab counter $tabCounter = 0; // check if width is still 12 @@ -7668,64 +7557,28 @@ class Interpretation extends Fields { $body .= PHP_EOL . $this->_t(1) . '
'; } - // now build the template - foreach ($bucket as $tabCodeName => $posions) + // now build the dynamic tabs + foreach ($tabBucket as $tabCodeName => $positions) { - // check main if both left and right is set - $lrCounter = $posions['lr']; // get lang string - $tabLangName = $posions['lang']; - // build main center + $tabLangName = $positions['lang']; + // build main center position $main = ''; $mainbottom = ''; - foreach ($posions as $posion => $string) - { - if ($lrCounter == 2) - { - switch ($posion) - { - case 1: // left - case 2: // right - $main .= PHP_EOL . $this->_t(3) . '
'; - $main .= PHP_EOL . $this->_t(4) . $string; - $main .= PHP_EOL . $this->_t(3) . '
'; - break; - } - } - else - { - switch ($posion) - { - case 1: // left - case 2: // right - $main .= PHP_EOL . $this->_t(3) . '
'; - $main .= PHP_EOL . $this->_t(4) . $string; - $main .= PHP_EOL . $this->_t(3) . '
'; - break; - } - } - switch ($posion) - { - case 3: // fullwidth - $mainbottom .= PHP_EOL . $this->_t(3) . '
'; - $mainbottom .= PHP_EOL . $this->_t(4) . $string; - $mainbottom .= PHP_EOL . $this->_t(3) . '
'; - break; - } - } - // set acctive tab + $this->setEditBodyTabMainCenterPositionDiv($main, $mainbottom, $positions); + // set acctive tab (must be in side foreach loop to get active tab code name) if ($tabCounter == 0) { - $body .= PHP_EOL . PHP_EOL . $this->_t(1) . " '" . $tabCodeName . "')); ?>"; + $body .= PHP_EOL . PHP_EOL . $this->_t(1) . " '" . $tabCodeName . "')); ?>"; } // check if custom tab must be added - if (($_customTabHTML = $this->addCustomTabs($searchTabs[$tabCodeName], $viewName_single, 1)) !== false) + if (($_customTabHTML = $this->addCustomTabs($searchTabs[$tabCodeName], $view_name_single, 1)) !== false) { $body .= $_customTabHTML; } // if this is a linked view set permissions $closeIT = false; - if (isset($linkedViewIdentifier) && ComponentbuilderHelper::checkArray($linkedViewIdentifier) && in_array($tabCodeName, $linkedViewIdentifier)) + if (ComponentbuilderHelper::checkArray($linkedViewIdentifier) && in_array($tabCodeName, $linkedViewIdentifier)) { // get view name $linkedViewId = array_search($tabCodeName, $linkedViewIdentifier); @@ -7755,12 +7608,13 @@ class Interpretation extends Fields { $body .= PHP_EOL; } - // start tab - $body .= PHP_EOL . $this->_t(1) . ""; + // start addtab body + $body .= PHP_EOL . $this->_t(1) . ""; // add the main $body .= PHP_EOL . $this->_t(2) . '
'; $body .= $main; $body .= PHP_EOL . $this->_t(2) . "
"; + // add main body bottom div if needed if (strlen($mainbottom) > 0) { // add the main bottom @@ -7768,255 +7622,38 @@ class Interpretation extends Fields $body .= $mainbottom; $body .= PHP_EOL . $this->_t(2) . "
"; } + // end addtab body $body .= PHP_EOL . $this->_t(1) . ""; + // if we had permissions added if ($closeIT) { $body .= PHP_EOL . $this->_t(1) . ""; } // check if custom tab must be added - if (($_customTabHTML = $this->addCustomTabs($searchTabs[$tabCodeName], $viewName_single, 2)) !== false) + if (($_customTabHTML = $this->addCustomTabs($searchTabs[$tabCodeName], $view_name_single, 2)) !== false) { $body .= $_customTabHTML; } // set counter $tabCounter++; } - // add option to load forms loded in via plugins (TODO) we may want to move these tab locations + // add option to load forms loaded in via plugins (TODO) we may want to move these tab locations $body .= PHP_EOL . PHP_EOL . $this->_t(1) . "ignore_fieldsets = array('details','metadata','vdmmetadata','accesscontrol'); ?>"; - $body .= PHP_EOL . $this->_t(1) . "tab_name = '" . $viewName_single . "Tab'; ?>"; + $body .= PHP_EOL . $this->_t(1) . "tab_name = '" . $view_name_single . "Tab'; ?>"; $body .= PHP_EOL . $this->_t(1) . ""; - // set default publishing tab lang - $tabLangName = $langView . '_PUBLISHING'; - // add to lang array - if (!isset($this->langContent[$this->lang][$tabLangName])) - { - $this->langContent[$this->lang][$tabLangName] = 'Publishing'; - } - // the default publishing items - $items = array('left' => array(), 'right' => array()); - // Setup the default (custom) fields - // only load (1 => 'left', 2 => 'right') - $fieldsAddedRight = false; - if (isset($this->newPublishingFields[$viewName_single])) - { - foreach ($this->newPublishingFields[$viewName_single] as $df_alignment => $df_items) - { - foreach ($df_items as $df_order => $df_name) - { - if ($df_alignment == 2 || $df_alignment == 1) - { - $items[$alignmentNames[$df_alignment]][$df_order] = $df_name; - } - else - { - $this->app->enqueueMessage(JText::_('

Field Warning

'), 'Warning'); - $this->app->enqueueMessage(JText::sprintf('Your %s field could not be added, since the %s alignment position is not available in the %s (publishing) tab. Please only target Left or right in the publishing tab.', $df_name, $alignmentNames[$df_alignment], $viewName_single), 'Warning'); - } - } - } - // set switch to trigger notice if custom fields added to right - if (ComponentbuilderHelper::checkArray($items['right'])) - { - $fieldsAddedRight = true; - } - } - // load all defaults - $loadDefaultFields = array( - 'left' => array('created', 'created_by', 'modified', 'modified_by'), - 'right' => array('published', 'ordering', 'access', 'version', 'hits', 'id') - ); - foreach ($loadDefaultFields as $d_alignment => $defaultFields) - { - foreach ($defaultFields as $defaultField) - { - if (!isset($this->movedPublishingFields[$viewName_single][$defaultField])) - { - if ($defaultField != 'access') - { - $items[$d_alignment][] = $defaultField; - } - elseif ($defaultField === 'access' && isset($this->accessBuilder[$viewName_single]) && ComponentbuilderHelper::checkString($this->accessBuilder[$viewName_single])) - { - $items[$d_alignment][] = $defaultField; - } - } - } - } - // check if metadata is added to this view - if (isset($this->metadataBuilder[$viewName_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$viewName_single])) - { - // set default publishing tab code name - $tabCodeNameLeft = 'publishing'; - $tabCodeNameRight = 'metadata'; - // the default publishing tiems - if (ComponentbuilderHelper::checkArray($items['left']) || ComponentbuilderHelper::checkArray($items['right'])) - { - $items_one = ''; - // load the items into one side - if (ComponentbuilderHelper::checkArray($items['left'])) - { - $items_one .= "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['left']) . "'"; - } - if (ComponentbuilderHelper::checkArray($items['right'])) - { - // there is already fields just add these - if (strlen($items_one) > 3) - { - $items_one .= "," . PHP_EOL . $this->_t(1) . "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; - } - // no fields has been added yet - else - { - $items_one .= "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; - } - } - // only triger the info notice if there were custom fields targeted to the right alignment position. - if ($fieldsAddedRight) - { - $this->app->enqueueMessage(JText::_('

Field Notice

'), 'Notice'); - $this->app->enqueueMessage(JText::sprintf('Your field/s added to the right alignment position in the %s (publishing) tab was added to the left. Since we have metadata fields on the right. Fields can only be loaded to the right of the publishing tab if there is no metadata fields.', $viewName_single), 'Notice'); - } - // set the publishing layout - $this->setLayout($viewName_single, $tabCodeNameLeft, $items_one, 'layoutpublished'); - $items_one = true; - } - else - { - $items_one = false; - } - // set the metadata layout - $this->setLayout($viewName_single, $tabCodeNameRight, false, 'layoutmetadata'); - $items_two = true; - } - else - { - // set default publishing tab code name - $tabCodeNameLeft = 'publishing'; - $tabCodeNameRight = 'publlshing'; - // the default publishing tiems - if (ComponentbuilderHelper::checkArray($items['left']) || ComponentbuilderHelper::checkArray($items['right'])) - { - // load left items that remain - if (ComponentbuilderHelper::checkArray($items['left'])) - { - // load all items - $items_one = "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['left']) . "'"; - // set the publishing layout - $this->setLayout($viewName_single, $tabCodeNameLeft, $items_one, 'layoutpublished'); - $items_one = true; - } - // load right items that remain - if (ComponentbuilderHelper::checkArray($items['right'])) - { - // load all items - $items_two = "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; - // set the publishing layout - $this->setLayout($viewName_single, $tabCodeNameRight, $items_two, 'layoutpublished'); - $items_two = true; - } - } - else - { - $items_one = false; - $items_two = false; - } - } - if ($items_one && $items_two) - { - $classs = "span6"; - } - elseif ($items_one || $items_two) - { - $classs = "span12"; - } - // only load this if needed - if ($items_one || $items_two) - { - // check if the item has permissions. - $publishingPer = array(); - $allToBeChekced = array('core.delete', 'core.edit.created_by', 'core.edit.state', 'core.edit.created'); - foreach ($allToBeChekced as $core_permission) - { - if ($coreLoad && isset($core[$core_permission]) && isset($this->permissionBuilder['global'][$core[$core_permission]]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core[$core_permission]]) && in_array($viewName_single, $this->permissionBuilder['global'][$core[$core_permission]])) - { - // set permissions. - $publishingPer[] = "\$this->canDo->get('" . $core[$core_permission] . "')"; - } - else - { - // set permissions. - $publishingPer[] = "\$this->canDo->get('" . $core_permission . "')"; - } - } - // check if custom tab must be added - if (($_customTabHTML = $this->addCustomTabs(15, $viewName_single, 1)) !== false) - { - $body .= $_customTabHTML; - } - $body .= PHP_EOL . PHP_EOL . $this->_t(1) . ""; - // set the default publishing tab - $body .= PHP_EOL . $this->_t(1) . ""; - $body .= PHP_EOL . $this->_t(2) . '
'; - if ($items_one) - { - $body .= PHP_EOL . $this->_t(3) . '
'; - $body .= PHP_EOL . $this->_t(4) . ""; - $body .= PHP_EOL . $this->_t(3) . "
"; - } - if ($items_two) - { - $body .= PHP_EOL . $this->_t(3) . '
'; - $body .= PHP_EOL . $this->_t(4) . ""; - $body .= PHP_EOL . $this->_t(3) . "
"; - } - $body .= PHP_EOL . $this->_t(2) . "
"; - $body .= PHP_EOL . $this->_t(1) . ""; - $body .= PHP_EOL . $this->_t(1) . ""; - // check if custom tab must be added - if (($_customTabHTML = $this->addCustomTabs(15, $viewName_single, 2)) !== false) - { - $body .= $_customTabHTML; - } - } - // make sure we dont load it to a view with the name component - if ($viewName_single != 'component') - { - // set permissions tab lang - $tabLangName = $langView . '_PERMISSION'; - // set permissions tab code name - $tabCodeName = 'permissions'; - // add to lang array - if (!isset($this->langContent[$this->lang][$tabLangName])) - { - $this->langContent[$this->lang][$tabLangName] = 'Permissions'; - } - // set the permissions tab - $body .= PHP_EOL . PHP_EOL . $this->_t(1) . "canDo->get('core.admin')) : ?>"; - $body .= PHP_EOL . $this->_t(1) . ""; - $body .= PHP_EOL . $this->_t(2) . '
'; - $body .= PHP_EOL . $this->_t(3) . '
'; - $body .= PHP_EOL . $this->_t(4) . '
'; - $body .= PHP_EOL . $this->_t(5) . '
'; - $body .= PHP_EOL . $this->_t(5) . "form->getFieldset('accesscontrol') as \$field): ?>"; - $body .= PHP_EOL . $this->_t(6) . "
"; - $body .= PHP_EOL . $this->_t(7) . "label; echo \$field->input;?>"; - $body .= PHP_EOL . $this->_t(6) . "
"; - $body .= PHP_EOL . $this->_t(6) . '
'; - $body .= PHP_EOL . $this->_t(5) . ""; - $body .= PHP_EOL . $this->_t(5) . "
"; - $body .= PHP_EOL . $this->_t(4) . "
"; - $body .= PHP_EOL . $this->_t(3) . "
"; - $body .= PHP_EOL . $this->_t(2) . "
"; - $body .= PHP_EOL . $this->_t(1) . ""; - $body .= PHP_EOL . $this->_t(1) . ""; - } + // add the publish and meta data tabs + $body .= $this->getEditBodyPublishMetaTabs($view_name_single, $langView); // end the tab set $body .= PHP_EOL . PHP_EOL . $this->_t(1) . ""; $body .= PHP_EOL . PHP_EOL . $this->_t(1) . "
"; - $body .= PHP_EOL . $this->_t(2) . ''; + $body .= PHP_EOL . $this->_t(2) . ''; $body .= PHP_EOL . $this->_t(2) . ""; $body .= PHP_EOL . $this->_t(1) . "
"; - $body .= PHP_EOL . $this->_t(1) . ""; + // close divs + if (ComponentbuilderHelper::checkString($span)) + { + $body .= PHP_EOL . $this->_t(1) . ""; + } $body .= PHP_EOL . ""; // check if left has been set if (strlen($leftside) > 0) @@ -8042,6 +7679,527 @@ class Interpretation extends Fields return ''; } + /** + * get Edit Body Linked Admin Views + * + * @param array $view The view data + * @param string $view_name_single The single view name + * @param array $keys The tabs to add in layout + * @param array $linkedViewIdentifier The linked view identifier + * + * @return array The linked Admin Views tabs + * + */ + protected function getEditBodyLinkedAdminViewsTabs(&$view, &$view_name_single, &$keys, &$linkedViewIdentifier) + { + // start linked tabs bucket + $linkedTab = array(); + // check if the view has linked admin view + if (isset($this->linkedAdminViews[$view_name_single]) && ComponentbuilderHelper::checkArray($this->linkedAdminViews[$view_name_single])) + { + foreach ($this->linkedAdminViews[$view_name_single] as $linkedView) + { + // get the tab name + $tabName = $view['settings']->tabs[(int) $linkedView['tab']]; + // update the tab counter + $this->tabCounter[$view_name_single][$linkedView['tab']] = $tabName; + // add the linked view + $linkedTab[$linkedView['adminview']] = $linkedView['tab']; + // set the keys if values are set + if (ComponentbuilderHelper::checkString($linkedView['key']) && ComponentbuilderHelper::checkString($linkedView['parentkey'])) + { + $keys[$linkedView['adminview']] = array('key' => $linkedView['key'], 'parentKey' => $linkedView['parentkey']); + } + else + { + $keys[$linkedView['adminview']] = array('key' => null, 'parentKey' => null); + } + // set the button switches + if (isset($linkedView['addnew'])) + { + $keys[$linkedView['adminview']]['addNewButton'] = (int) $linkedView['addnew']; + } + else + { + $keys[$linkedView['adminview']]['addNewButton'] = 0; + } + } + } + return $linkedTab; + } + + /** + * get Edit Body Tabs + * + * @param string $view_name_single The single view name + * @param string $langView The main lang prefix + * @param array $linkedTab The linked admin view tabs + * @param array $keys The tabs to add in layout + * @param array $linkedViewIdentifier The linked view identifier + * @param array $searchTabs The tabs to add in layout + * @param string $leftside The left side html string + * @param string $rightside The right side html string + * @param string $footer The footer html string + * @param string $header The header html string + * @param int $mainwidth The main width value + * @param int $sidewidth The side width value + * + * @return array The linked tabs + * + */ + protected function getEditBodyTabs(&$view_name_single, &$langView, &$linkedTab, &$keys, &$linkedViewIdentifier, &$searchTabs, &$leftside, &$rightside, &$footer, &$header, &$mainwidth, &$sidewidth) + { + // start tabs + $tabs = array(); + // sort the tabs based on key order + ksort($this->tabCounter[$view_name_single]); + // start tab builinging loop + foreach ($this->tabCounter[$view_name_single] as $tabNr => $tabName) + { + $tabWidth = 12; + $lrCounter = 0; + // set tab lang + $tabLangName = $langView . '_' . ComponentbuilderHelper::safeString($tabName, 'U'); + // set tab code name + $tabCodeName = ComponentbuilderHelper::safeString($tabName); + /// set the values to use in search latter + $searchTabs[$tabCodeName] = $tabNr; + // add to lang array + $this->setLangContent($this->lang, $tabLangName, $tabName); + // check if linked view belongs to this tab + $buildLayout = true; + $linkedViewId = ''; + if (ComponentbuilderHelper::checkArray($linkedTab)) + { + if (($linkedViewId = array_search($tabNr, $linkedTab)) !== false) + { + // don't build (since this is a linked view) + $buildLayout = false; + } + } + // build layout these are actual fields + if ($buildLayout) + { + // sort to make sure it loads left first + $alignments = $this->layoutBuilder[$view_name_single][$tabName]; + ksort($alignments); + foreach ($alignments as $alignment => $names) + { + // set layout code name + $layoutCodeName = $tabCodeName . '_' . $this->alignmentOptions[$alignment]; + // reset each time + $items = ''; + $itemCounter = 0; + // sort the names based on order of keys + ksort($names); + // build the items array for this alignment + foreach ($names as $nr => $name) + { + if ($itemCounter == 0) + { + $items .= "'" . $name . "'"; + } + else + { + $items .= "," . PHP_EOL . $this->_t(1) . "'" . $name . "'"; + } + $itemCounter++; + } + // based on alignment build the layout + switch ($alignment) + { + case 1: // left + case 2: // right + // count + $lrCounter++; + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layoutitems'); + // set the lang to tab + $tabs[$tabCodeName]['lang'] = $tabLangName; + // load the body + if (!isset($tabs[$tabCodeName][(int) $alignment])) + { + $tabs[$tabCodeName][(int) $alignment] = ''; + } + $tabs[$tabCodeName][(int) $alignment] .= ""; + break; + case 3: // fullwidth + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layoutfull'); + // set the lang to tab + $tabs[$tabCodeName]['lang'] = $tabLangName; + // load the body + if (!isset($tabs[$tabCodeName][(int) $alignment])) + { + $tabs[$tabCodeName][(int) $alignment] = ''; + } + $tabs[$tabCodeName][(int) $alignment] .= ""; + break; + case 4: // above + // set as title layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layouttitle'); + // load to header + $header .= PHP_EOL . $this->_t(1) . ""; + break; + case 5: // under + // set as title layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layouttitle'); + // load to footer + $footer .= PHP_EOL . PHP_EOL . "
" . PHP_EOL . ""; + break; + case 6: // left side + $tabWidth = $tabWidth - 2; + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layoutitems'); + // load the body + $leftside .= PHP_EOL . $this->_t(1) . ""; + break; + case 7: // right side + $tabWidth = $tabWidth - 2; + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $items, 'layoutitems'); + // load the body + $rightside .= PHP_EOL . $this->_t(1) . ""; + break; + } + } + } + else + { + // set layout code name + $layoutCodeName = $tabCodeName . '_fullwidth'; + // set identifiers + $linkedViewIdentifier[$linkedViewId] = $tabCodeName; + //set function name + $codeName = ComponentbuilderHelper::safeString($this->uniquekey(3) . $tabCodeName); + // set as items layout + $this->setLayout($view_name_single, $layoutCodeName, $codeName, 'layoutlinkedview'); + // set the lang to tab + $tabs[$tabCodeName]['lang'] = $tabLangName; + // set all the linked view stuff + $this->secondRunAdmin['setLinkedView'][] = array( + 'viewId' => $linkedViewId, + 'view_name_single' => $view_name_single, + 'codeName' => $codeName, + 'layoutCodeName' => $layoutCodeName, + 'key' => $keys[$linkedViewId]['key'], + 'parentKey' => $keys[$linkedViewId]['parentKey'], + 'addNewButon' => $keys[$linkedViewId]['addNewButton']); + // load the body + if (!isset($tabs[$tabCodeName][3])) + { + $tabs[$tabCodeName][3] = ''; + } + $tabs[$tabCodeName][3] .= ""; + } + // width calculator :) + if ($tabWidth == 8) + { + $mainwidth = 8; + $sidewidth = 2; + } + elseif ($tabWidth == 10 && $mainwidth != 8) + { + $mainwidth = 9; + $sidewidth = 3; + } + $tabs[$tabCodeName]['lr'] = $lrCounter; + } + return $tabs; + } + + /** + * set Edit Body Main Center Positions Div + * + * @param string $main The main position of this tab + * @param string $mainbottom The main bottom position of this tab + * @param array $positions The build positions of this tab + * + * @return array The linked Admin Views tabs + * + */ + protected function setEditBodyTabMainCenterPositionDiv(&$main, &$mainbottom, &$positions) + { + foreach ($positions as $position => $string) + { + if ($positions['lr'] == 2) + { + switch ($position) + { + case 1: // left + case 2: // right + $main .= PHP_EOL . $this->_t(3) . '
'; + $main .= PHP_EOL . $this->_t(4) . $string; + $main .= PHP_EOL . $this->_t(3) . '
'; + break; + } + } + else + { + switch ($position) + { + case 1: // left + case 2: // right + $main .= PHP_EOL . $this->_t(3) . '
'; + $main .= PHP_EOL . $this->_t(4) . $string; + $main .= PHP_EOL . $this->_t(3) . '
'; + break; + } + } + switch ($position) + { + case 3: // fullwidth + $mainbottom .= PHP_EOL . $this->_t(3) . '
'; + $mainbottom .= PHP_EOL . $this->_t(4) . $string; + $mainbottom .= PHP_EOL . $this->_t(3) . '
'; + break; + } + } + } + + /** + * get Edit Body Publish and Meta Tab + * + * @param string $view_name_single The single view name + * @param string $langView The main lang prefix + * + * @return string The published and Meta Data Tabs + * + */ + protected function getEditBodyPublishMetaTabs(&$view_name_single, &$langView) + { + // build the two tabs + $tabs = ''; + // set default publishing tab lang + $tabLangName = $langView . '_PUBLISHING'; + // add to lang array + $this->setLangContent($this->lang, $tabLangName, 'Publishing'); + // the default publishing items + $items = array('left' => array(), 'right' => array()); + // Setup the default (custom) fields + // only load (1 => 'left', 2 => 'right') + $fieldsAddedRight = false; + if (isset($this->newPublishingFields[$view_name_single])) + { + foreach ($this->newPublishingFields[$view_name_single] as $df_alignment => $df_items) + { + foreach ($df_items as $df_order => $df_name) + { + if ($df_alignment == 2 || $df_alignment == 1) + { + $items[$this->alignmentOptions[$df_alignment]][$df_order] = $df_name; + } + else + { + $this->app->enqueueMessage(JText::_('

Field Warning

'), 'Warning'); + $this->app->enqueueMessage(JText::sprintf('Your %s field could not be added, since the %s alignment position is not available in the %s (publishing) tab. Please only target Left or right in the publishing tab.', $df_name, $this->alignmentOptions[$df_alignment], $view_name_single), 'Warning'); + } + } + } + // set switch to trigger notice if custom fields added to right + if (ComponentbuilderHelper::checkArray($items['right'])) + { + $fieldsAddedRight = true; + } + } + // load all defaults + $loadDefaultFields = array( + 'left' => array('created', 'created_by', 'modified', 'modified_by'), + 'right' => array('published', 'ordering', 'access', 'version', 'hits', 'id') + ); + foreach ($loadDefaultFields as $d_alignment => $defaultFields) + { + foreach ($defaultFields as $defaultField) + { + if (!isset($this->movedPublishingFields[$view_name_single][$defaultField])) + { + if ($defaultField != 'access') + { + $items[$d_alignment][] = $defaultField; + } + elseif ($defaultField === 'access' && isset($this->accessBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->accessBuilder[$view_name_single])) + { + $items[$d_alignment][] = $defaultField; + } + } + } + } + // check if metadata is added to this view + if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single])) + { + // set default publishing tab code name + $tabCodeNameLeft = 'publishing'; + $tabCodeNameRight = 'metadata'; + // the default publishing tiems + if (ComponentbuilderHelper::checkArray($items['left']) || ComponentbuilderHelper::checkArray($items['right'])) + { + $items_one = ''; + // load the items into one side + if (ComponentbuilderHelper::checkArray($items['left'])) + { + $items_one .= "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['left']) . "'"; + } + if (ComponentbuilderHelper::checkArray($items['right'])) + { + // there is already fields just add these + if (strlen($items_one) > 3) + { + $items_one .= "," . PHP_EOL . $this->_t(1) . "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; + } + // no fields has been added yet + else + { + $items_one .= "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; + } + } + // only triger the info notice if there were custom fields targeted to the right alignment position. + if ($fieldsAddedRight) + { + $this->app->enqueueMessage(JText::_('

Field Notice

'), 'Notice'); + $this->app->enqueueMessage(JText::sprintf('Your field/s added to the right alignment position in the %s (publishing) tab was added to the left. Since we have metadata fields on the right. Fields can only be loaded to the right of the publishing tab if there is no metadata fields.', $view_name_single), 'Notice'); + } + // set the publishing layout + $this->setLayout($view_name_single, $tabCodeNameLeft, $items_one, 'layoutpublished'); + $items_one = true; + } + else + { + $items_one = false; + } + // set the metadata layout + $this->setLayout($view_name_single, $tabCodeNameRight, false, 'layoutmetadata'); + $items_two = true; + } + else + { + // set default publishing tab code name + $tabCodeNameLeft = 'publishing'; + $tabCodeNameRight = 'publlshing'; + // the default publishing tiems + if (ComponentbuilderHelper::checkArray($items['left']) || ComponentbuilderHelper::checkArray($items['right'])) + { + // load left items that remain + if (ComponentbuilderHelper::checkArray($items['left'])) + { + // load all items + $items_one = "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['left']) . "'"; + // set the publishing layout + $this->setLayout($view_name_single, $tabCodeNameLeft, $items_one, 'layoutpublished'); + $items_one = true; + } + // load right items that remain + if (ComponentbuilderHelper::checkArray($items['right'])) + { + // load all items + $items_two = "'" . implode("'," . PHP_EOL . $this->_t(1) . "'", $items['right']) . "'"; + // set the publishing layout + $this->setLayout($view_name_single, $tabCodeNameRight, $items_two, 'layoutpublished'); + $items_two = true; + } + } + else + { + $items_one = false; + $items_two = false; + } + } + if ($items_one && $items_two) + { + $classs = "span6"; + } + elseif ($items_one || $items_two) + { + $classs = "span12"; + } + // setup correct core target + $coreLoad = false; + if (isset($this->permissionCore[$view_name_single])) + { + $core = $this->permissionCore[$view_name_single]; + $coreLoad = true; + } + // only load this if needed + if ($items_one || $items_two) + { + // check if the item has permissions. + $publishingPer = array(); + $allToBeChekced = array('core.delete', 'core.edit.created_by', 'core.edit.state', 'core.edit.created'); + foreach ($allToBeChekced as $core_permission) + { + if ($coreLoad && isset($core[$core_permission]) && isset($this->permissionBuilder['global'][$core[$core_permission]]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core[$core_permission]]) && in_array($view_name_single, $this->permissionBuilder['global'][$core[$core_permission]])) + { + // set permissions. + $publishingPer[] = "\$this->canDo->get('" . $core[$core_permission] . "')"; + } + else + { + // set permissions. + $publishingPer[] = "\$this->canDo->get('" . $core_permission . "')"; + } + } + // check if custom tab must be added + if (($_customTabHTML = $this->addCustomTabs(15, $view_name_single, 1)) !== false) + { + $tabs .= $_customTabHTML; + } + $tabs .= PHP_EOL . PHP_EOL . $this->_t(1) . ""; + // set the default publishing tab + $tabs .= PHP_EOL . $this->_t(1) . ""; + $tabs .= PHP_EOL . $this->_t(2) . '
'; + if ($items_one) + { + $tabs .= PHP_EOL . $this->_t(3) . '
'; + $tabs .= PHP_EOL . $this->_t(4) . ""; + $tabs .= PHP_EOL . $this->_t(3) . "
"; + } + if ($items_two) + { + $tabs .= PHP_EOL . $this->_t(3) . '
'; + $tabs .= PHP_EOL . $this->_t(4) . ""; + $tabs .= PHP_EOL . $this->_t(3) . "
"; + } + $tabs .= PHP_EOL . $this->_t(2) . "
"; + $tabs .= PHP_EOL . $this->_t(1) . ""; + $tabs .= PHP_EOL . $this->_t(1) . ""; + // check if custom tab must be added + if (($_customTabHTML = $this->addCustomTabs(15, $view_name_single, 2)) !== false) + { + $tabs .= $_customTabHTML; + } + } + + // make sure we dont load it to a view with the name component (as this will cause conflict with Joomla conventions) + if ($view_name_single != 'component') + { + // set permissions tab lang + $tabLangName = $langView . '_PERMISSION'; + // set permissions tab code name + $tabCodeName = 'permissions'; + // add to lang array + $this->setLangContent($this->lang, $tabLangName, 'Permissions'); + // set the permissions tab + $tabs .= PHP_EOL . PHP_EOL . $this->_t(1) . "canDo->get('core.admin')) : ?>"; + $tabs .= PHP_EOL . $this->_t(1) . ""; + $tabs .= PHP_EOL . $this->_t(2) . '
'; + $tabs .= PHP_EOL . $this->_t(3) . '
'; + $tabs .= PHP_EOL . $this->_t(4) . '
'; + $tabs .= PHP_EOL . $this->_t(5) . '
'; + $tabs .= PHP_EOL . $this->_t(5) . "form->getFieldset('accesscontrol') as \$field): ?>"; + $tabs .= PHP_EOL . $this->_t(6) . "
"; + $tabs .= PHP_EOL . $this->_t(7) . "label; echo \$field->input;?>"; + $tabs .= PHP_EOL . $this->_t(6) . "
"; + $tabs .= PHP_EOL . $this->_t(6) . '
'; + $tabs .= PHP_EOL . $this->_t(5) . ""; + $tabs .= PHP_EOL . $this->_t(5) . "
"; + $tabs .= PHP_EOL . $this->_t(4) . "
"; + $tabs .= PHP_EOL . $this->_t(3) . "
"; + $tabs .= PHP_EOL . $this->_t(2) . "
"; + $tabs .= PHP_EOL . $this->_t(1) . ""; + $tabs .= PHP_EOL . $this->_t(1) . ""; + } + return $tabs; + } + protected function addCustomTabs($nr, $name_single, $target) { // check if this view is having custom tabs @@ -8078,7 +8236,7 @@ class Interpretation extends Fields $fadein[] = $this->_t(1) . "// waiting spinner"; $fadein[] = $this->_t(1) . "var outerDiv = jQuery('body');"; $fadein[] = $this->_t(1) . "jQuery('
')"; - $fadein[] = $this->_t(2) . ".css(\"background\", \"rgba(255, 255, 255, .8) url('components/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/assets/images/import.gif') 50% 15% no-repeat\")"; + $fadein[] = $this->_t(2) . ".css(\"background\", \"rgba(255, 255, 255, .8) url('components/com_" . $this->componentCodeName . "/assets/images/import.gif') 50% 15% no-repeat\")"; $fadein[] = $this->_t(2) . ".css(\"top\", outerDiv.position().top - jQuery(window).scrollTop())"; $fadein[] = $this->_t(2) . ".css(\"left\", outerDiv.position().left - jQuery(window).scrollLeft())"; $fadein[] = $this->_t(2) . ".css(\"width\", outerDiv.width())"; @@ -8092,15 +8250,15 @@ class Interpretation extends Fields $fadein[] = $this->_t(1) . "jQuery('#loading').show();"; $fadein[] = $this->_t(1) . "// when page is ready remove and show"; $fadein[] = $this->_t(1) . "jQuery(window).load(function() {"; - $fadein[] = $this->_t(2) . "jQuery('#" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "_loader').fadeIn('fast');"; + $fadein[] = $this->_t(2) . "jQuery('#" . $this->componentCodeName . "_loader').fadeIn('fast');"; $fadein[] = $this->_t(2) . "jQuery('#loading').hide();"; $fadein[] = $this->_t(1) . "});"; $fadein[] = ""; - $fadein[] = "
fileContentStatic[$this->hhh . 'component' . $this->hhh] . "_loader\" style=\"display: none;\">"; + $fadein[] = "
componentCodeName . "_loader\" style=\"display: none;\">"; return implode(PHP_EOL, $fadein); } - return "
fileContentStatic[$this->hhh . 'component' . $this->hhh] . "_loader\">"; + return "
componentCodeName . "_loader\">"; } /** @@ -8139,7 +8297,7 @@ class Interpretation extends Fields { /** * @var $viewId - * @var $viewName_single + * @var $view_name_single * @var $codeName * @var $layoutCodeName * @var $key @@ -8160,16 +8318,16 @@ class Interpretation extends Fields } if (ComponentbuilderHelper::checkString($single) && ComponentbuilderHelper::checkString($list)) { - $head = $this->setListHeadLinked($single, $list, $addNewButon, $viewName_single); - $body = $this->setListBodyLinked($single, $list, $viewName_single); + $head = $this->setListHeadLinked($single, $list, $addNewButon, $view_name_single); + $body = $this->setListBodyLinked($single, $list, $view_name_single); $functionName = ComponentbuilderHelper::safeString($codeName, 'F'); // LAYOUTITEMSTABLE <<>> - $this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh] = $head . $body; + $this->fileContentDynamic[$view_name_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh] = $head . $body; // LAYOUTITEMSHEADER <<>> $headerscript = '//' . $this->setLine(__LINE__) . ' set the edit URL'; - $headerscript .= PHP_EOL . '$edit = "index.php?option=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '&view=' . $list . '&task=' . $single . '.edit";'; + $headerscript .= PHP_EOL . '$edit = "index.php?option=com_' . $this->componentCodeName . '&view=' . $list . '&task=' . $single . '.edit";'; $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' set a return value'; - $headerscript .= PHP_EOL . '$return = ($id) ? "index.php?option=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '&view=' . $viewName_single . '&layout=edit&id=" . $id : "";'; + $headerscript .= PHP_EOL . '$return = ($id) ? "index.php?option=com_' . $this->componentCodeName . '&view=' . $view_name_single . '&layout=edit&id=" . $id : "";'; $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' check for a return value'; $headerscript .= PHP_EOL . '$jinput = JFactory::getApplication()->input;'; $headerscript .= PHP_EOL . "if (\$_return = \$jinput->get('return', null, 'base64'))"; @@ -8180,11 +8338,11 @@ class Interpretation extends Fields $headerscript .= PHP_EOL . 'if (' . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . 'Helper::checkString($return))'; $headerscript .= PHP_EOL . '{'; $headerscript .= PHP_EOL . $this->_t(1) . '//' . $this->setLine(__LINE__) . ' set the referral values'; - $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref=' . $viewName_single . '&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));'; + $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref=' . $view_name_single . '&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));'; $headerscript .= PHP_EOL . '}'; $headerscript .= PHP_EOL . 'else'; $headerscript .= PHP_EOL . '{'; - $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref=' . $viewName_single . '&refid=" . $id : "";'; + $headerscript .= PHP_EOL . $this->_t(1) . '$ref = ($id) ? "&ref=' . $view_name_single . '&refid=" . $id : "";'; $headerscript .= PHP_EOL . '}'; if ($addNewButon > 0) { @@ -8192,22 +8350,22 @@ class Interpretation extends Fields if ($addNewButon == 1 || $addNewButon == 2) { $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' set the create new URL'; - $headerscript .= PHP_EOL . '$new = "index.php?option=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '&view=' . $list . '&task=' . $single . '.edit" . $ref;'; + $headerscript .= PHP_EOL . '$new = "index.php?option=com_' . $this->componentCodeName . '&view=' . $list . '&task=' . $single . '.edit" . $ref;'; } // and the link for close and new if ($addNewButon == 2 || $addNewButon == 3) { $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' set the create new and close URL'; - $headerscript .= PHP_EOL . '$close_new = "index.php?option=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '&view=' . $list . '&task=' . $single . '.edit";'; + $headerscript .= PHP_EOL . '$close_new = "index.php?option=com_' . $this->componentCodeName . '&view=' . $list . '&task=' . $single . '.edit";'; } $headerscript .= PHP_EOL . '//' . $this->setLine(__LINE__) . ' load the action object'; $headerscript .= PHP_EOL . '$can = ' . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . 'Helper::getActions(' . "'" . $single . "'" . ');'; } - $this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh] = $headerscript; + $this->fileContentDynamic[$view_name_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh] = $headerscript; // LINKEDVIEWITEMS <<>> - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWITEMS' . $this->hhh] .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get Linked view data" . PHP_EOL . $this->_t(2) . "\$this->" . $codeName . " = \$this->get('" . $functionName . "');"; + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWITEMS' . $this->hhh] .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get Linked view data" . PHP_EOL . $this->_t(2) . "\$this->" . $codeName . " = \$this->get('" . $functionName . "');"; // LINKEDVIEWTABLESCRIPTS <<>> - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWTABLESCRIPTS' . $this->hhh] = $this->setFootableScripts(); + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWTABLESCRIPTS' . $this->hhh] = $this->setFootableScripts(); if (strpos($parentKey, '-R>') !== false || strpos($parentKey, '-A>') !== false) { list($parent_key) = explode('-', $parentKey); @@ -8241,22 +8399,22 @@ class Interpretation extends Fields foreach ($parent_keys as $parent_key) { $globalKey[$parent_key] = ComponentbuilderHelper::safeString($_key . $this->uniquekey(4)); - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey[$parent_key] . " = \$item->" . $parent_key . ";"; + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey[$parent_key] . " = \$item->" . $parent_key . ";"; } } else { // set the global key $globalKey = ComponentbuilderHelper::safeString($_key . $this->uniquekey(4)); - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey . " = \$item->" . $parent_key . ";"; + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWGLOBAL' . $this->hhh] .= PHP_EOL . $this->_t(2) . "\$this->" . $globalKey . " = \$item->" . $parent_key . ";"; } // LINKEDVIEWMETHODS <<>> - $this->fileContentDynamic[$viewName_single][$this->hhh . 'LINKEDVIEWMETHODS' . $this->hhh] .= $this->setListQueryLinked($single, $list, $functionName, $key, $_key, $parentKey, $parent_key, $globalKey); + $this->fileContentDynamic[$view_name_single][$this->hhh . 'LINKEDVIEWMETHODS' . $this->hhh] .= $this->setListQueryLinked($single, $list, $functionName, $key, $_key, $parentKey, $parent_key, $globalKey); } else { - $this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh] = 'oops! error.....'; - $this->fileContentDynamic[$viewName_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh] = ''; + $this->fileContentDynamic[$view_name_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSTABLE' . $this->hhh] = 'oops! error.....'; + $this->fileContentDynamic[$view_name_single . '_' . $layoutCodeName][$this->hhh . 'LAYOUTITEMSHEADER' . $this->hhh] = ''; } } @@ -8269,22 +8427,22 @@ class Interpretation extends Fields if (!isset($this->footableVersion) || 2 == $this->footableVersion) // loading version 2 { $foo = PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Add the CSS for Footable."; - $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/footable-v2/css/footable.core.min.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; + $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->componentCodeName . "/footable-v2/css/footable.core.min.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $foo .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Use the Metro Style"; $foo .= PHP_EOL . $this->_t(2) . "if (!isset(\$this->fooTableStyle) || 0 == \$this->fooTableStyle)"; $foo .= PHP_EOL . $this->_t(2) . "{"; - $foo .= PHP_EOL . $this->_t(3) . "\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/footable-v2/css/footable.metro.min.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; + $foo .= PHP_EOL . $this->_t(3) . "\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->componentCodeName . "/footable-v2/css/footable.metro.min.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $foo .= PHP_EOL . $this->_t(2) . "}"; $foo .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Use the Legacy Style."; $foo .= PHP_EOL . $this->_t(2) . "elseif (isset(\$this->fooTableStyle) && 1 == \$this->fooTableStyle)"; $foo .= PHP_EOL . $this->_t(2) . "{"; - $foo .= PHP_EOL . $this->_t(3) . "\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/footable-v2/css/footable.standalone.min.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; + $foo .= PHP_EOL . $this->_t(3) . "\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->componentCodeName . "/footable-v2/css/footable.standalone.min.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $foo .= PHP_EOL . $this->_t(2) . "}"; $foo .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Add the JavaScript for Footable"; - $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/footable-v2/js/footable.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; - $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/footable-v2/js/footable.sort.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; - $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/footable-v2/js/footable.filter.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; - $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/footable-v2/js/footable.paginate.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; + $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addScript(JURI::root() .'media/com_" . $this->componentCodeName . "/footable-v2/js/footable.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; + $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addScript(JURI::root() .'media/com_" . $this->componentCodeName . "/footable-v2/js/footable.sort.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; + $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addScript(JURI::root() .'media/com_" . $this->componentCodeName . "/footable-v2/js/footable.filter.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; + $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addScript(JURI::root() .'media/com_" . $this->componentCodeName . "/footable-v2/js/footable.paginate.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; if ($init) { $foo .= PHP_EOL . PHP_EOL . $this->_t(2) . '$footable = "jQuery(document).ready(function() { jQuery(function () { jQuery(' . "'.footable'" . ').footable(); }); jQuery(' . "'.nav-tabs'" . ').on(' . "'click'" . ', ' . "'li'" . ', function() { setTimeout(tableFix, 10); }); }); function tableFix() { jQuery(' . "'.footable'" . ').trigger(' . "'footable_resize'" . '); }";'; @@ -8296,9 +8454,9 @@ class Interpretation extends Fields $foo = PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Add the CSS for Footable"; $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css');"; - $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/footable-v3/css/footable.standalone.min.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; + $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addStyleSheet(JURI::root() .'media/com_" . $this->componentCodeName . "/footable-v3/css/footable.standalone.min.css', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');"; $foo .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Add the JavaScript for Footable (adding all funtions)"; - $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addScript(JURI::root() .'media/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/footable-v3/js/footable.min.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; + $foo .= PHP_EOL . $this->_t(2) . "\$this->document->addScript(JURI::root() .'media/com_" . $this->componentCodeName . "/footable-v3/js/footable.min.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; if ($init) { $foo .= PHP_EOL . PHP_EOL . $this->_t(2) . '$footable = "jQuery(document).ready(function() { jQuery(function () { jQuery(' . "'.footable'" . ').footable();});});";'; @@ -8526,15 +8684,9 @@ class Interpretation extends Fields // make sure only first link is used as togeler $firstLink = true; // add to lang array - if (!isset($this->langContent[$this->lang][$statusLangName])) - { - $this->langContent[$this->lang][$statusLangName] = 'Status'; - } + $this->setLangContent($this->lang, $statusLangName, 'Status'); // add to lang array - if (!isset($this->langContent[$this->lang][$idLangName])) - { - $this->langContent[$this->lang][$idLangName] = 'Id'; - } + $this->setLangContent($this->lang, $idLangName, 'Id'); $head .= PHP_EOL . $this->_t(1) . ""; // set controller for data hiding options $controller = 1; @@ -8632,8 +8784,8 @@ class Interpretation extends Fields { $query .= PHP_EOL . $this->_t(2) . "\$query->select(\$db->quoteName('c.title','category_title'));"; } - $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " From the " . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "_" . $viewName_single . " table"; - $query .= PHP_EOL . $this->_t(2) . "\$query->from(\$db->quoteName('#__" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "_" . $viewName_single . "', 'a'));"; + $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " From the " . $this->componentCodeName . "_" . $viewName_single . " table"; + $query .= PHP_EOL . $this->_t(2) . "\$query->from(\$db->quoteName('#__" . $this->componentCodeName . "_" . $viewName_single . "', 'a'));"; // add the category if ($addCategory) { @@ -8715,7 +8867,7 @@ class Interpretation extends Fields $query .= PHP_EOL . $this->_t(3) . "\$query->where('a.access = ' . (int) \$access);"; $query .= PHP_EOL . $this->_t(2) . "}"; $query .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Implement View Level Access"; - $query .= PHP_EOL . $this->_t(2) . "if (!\$user->authorise('core.options', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "'))"; + $query .= PHP_EOL . $this->_t(2) . "if (!\$user->authorise('core.options', 'com_" . $this->componentCodeName . "'))"; $query .= PHP_EOL . $this->_t(2) . "{"; $query .= PHP_EOL . $this->_t(3) . "\$groups = implode(',', \$user->getAuthorisedViewLevels());"; $query .= PHP_EOL . $this->_t(3) . "\$query->where('a.access IN (' . \$groups . ')');"; @@ -8910,7 +9062,7 @@ class Interpretation extends Fields { // Load to lang $keyLang = $this->langPrefix . '_' . $custom_button['NAME']; - $this->langContent[$this->lang][$keyLang] = ComponentbuilderHelper::safeString($custom_button['name'], 'Ww'); + $this->setLangContent($this->lang, $keyLang, ComponentbuilderHelper::safeString($custom_button['name'], 'Ww')); // add cpanel button $buttons[] = $this->_t(2) . "if (\$this->canDo->get('" . $custom_button['link'] . ".access'))"; $buttons[] = $this->_t(2) . "{"; @@ -8945,7 +9097,7 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "JSession::checkToken() or die(JText:" . ":_('JINVALID_TOKEN'));"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " check if export is allowed for this user."; $method[] = $this->_t(2) . "\$user = JFactory::getUser();"; - $method[] = $this->_t(2) . "if (\$user->authorise('" . $custom_button['link'] . ".access', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "'))"; + $method[] = $this->_t(2) . "if (\$user->authorise('" . $custom_button['link'] . ".access', 'com_" . $this->componentCodeName . "'))"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Get the input"; $method[] = $this->_t(3) . "\$input = JFactory::getApplication()->input;"; @@ -8954,20 +9106,17 @@ class Interpretation extends Fields $method[] = $this->_t(3) . "JArrayHelper::toInteger(\$pks);"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " convert to string"; $method[] = $this->_t(3) . "\$ids = implode('_', \$pks);"; - $method[] = $this->_t(3) . "\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "&view=" . $custom_button['link'] . "&cid='.\$ids, false));"; + $method[] = $this->_t(3) . "\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->componentCodeName . "&view=" . $custom_button['link'] . "&cid='.\$ids, false));"; $method[] = $this->_t(3) . "return;"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Redirect to the list screen with error."; $method[] = $this->_t(2) . "\$message = JText:" . ":_('" . $this->langPrefix . "_ACCESS_TO_" . $custom_button['NAME'] . "_FAILED');"; - $method[] = $this->_t(2) . "\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "&view=" . $viewName_list . "', false), \$message, 'error');"; + $method[] = $this->_t(2) . "\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->componentCodeName . "&view=" . $viewName_list . "', false), \$message, 'error');"; $method[] = $this->_t(2) . "return;"; $method[] = $this->_t(1) . "}"; // add to lang array $lankey = $this->langPrefix . "_ACCESS_TO_" . $custom_button['NAME'] . "_FAILED"; - if (!isset($this->langContent[$this->lang][$lankey])) - { - $this->langContent[$this->lang][$lankey] = 'Access to ' . $custom_button['link'] . ' was denied.'; - } + $this->setLangContent($this->lang, $lankey, 'Access to ' . $custom_button['link'] . ' was denied.'); } return implode(PHP_EOL, $method); @@ -9004,8 +9153,8 @@ class Interpretation extends Fields $query .= PHP_EOL . $this->_t(3) . "\$query = \$db->getQuery(true);"; $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Select some fields"; $query .= PHP_EOL . $this->_t(3) . "\$query->select('a.*');"; - $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " From the " . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "_" . $viewName_single . " table"; - $query .= PHP_EOL . $this->_t(3) . "\$query->from(\$db->quoteName('#__" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "_" . $viewName_single . "', 'a'));"; + $query .= PHP_EOL . PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " From the " . $this->componentCodeName . "_" . $viewName_single . " table"; + $query .= PHP_EOL . $this->_t(3) . "\$query->from(\$db->quoteName('#__" . $this->componentCodeName . "_" . $viewName_single . "', 'a'));"; $query .= PHP_EOL . $this->_t(3) . "\$query->where('a.id IN (' . implode(',',\$pks) . ')');"; // add custom filtering php $query .= $this->getCustomScriptBuilder('php_getlistquery', $viewName_single, PHP_EOL . PHP_EOL . $this->_t(1)); @@ -9013,7 +9162,7 @@ class Interpretation extends Fields if (isset($this->accessBuilder[$viewName_single]) && ComponentbuilderHelper::checkString($this->accessBuilder[$viewName_single])) { $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Implement View Level Access"; - $query .= PHP_EOL . $this->_t(3) . "if (!\$user->authorise('core.options', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "'))"; + $query .= PHP_EOL . $this->_t(3) . "if (!\$user->authorise('core.options', 'com_" . $this->componentCodeName . "'))"; $query .= PHP_EOL . $this->_t(3) . "{"; $query .= PHP_EOL . $this->_t(4) . "\$groups = implode(',', \$user->getAuthorisedViewLevels());"; $query .= PHP_EOL . $this->_t(4) . "\$query->where('a.access IN (' . \$groups . ')');"; @@ -9061,7 +9210,7 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "JSession::checkToken() or die(JText:" . ":_('JINVALID_TOKEN'));"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " check if export is allowed for this user."; $method[] = $this->_t(2) . "\$user = JFactory::getUser();"; - $method[] = $this->_t(2) . "if (\$user->authorise('" . $viewName_single . ".export', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "') && \$user->authorise('core.export', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "'))"; + $method[] = $this->_t(2) . "if (\$user->authorise('" . $viewName_single . ".export', 'com_" . $this->componentCodeName . "') && \$user->authorise('core.export', 'com_" . $this->componentCodeName . "'))"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Get the input"; $method[] = $this->_t(3) . "\$input = JFactory::getApplication()->input;"; @@ -9081,7 +9230,7 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Redirect to the list screen with error."; $method[] = $this->_t(2) . "\$message = JText:" . ":_('" . $this->langPrefix . "_EXPORT_FAILED');"; - $method[] = $this->_t(2) . "\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "&view=" . $viewName_list . "', false), \$message, 'error');"; + $method[] = $this->_t(2) . "\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->componentCodeName . "&view=" . $viewName_list . "', false), \$message, 'error');"; $method[] = $this->_t(2) . "return;"; $method[] = $this->_t(1) . "}"; @@ -9092,7 +9241,7 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "JSession::checkToken() or die(JText:" . ":_('JINVALID_TOKEN'));"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " check if import is allowed for this user."; $method[] = $this->_t(2) . "\$user = JFactory::getUser();"; - $method[] = $this->_t(2) . "if (\$user->authorise('" . $viewName_single . ".import', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "') && \$user->authorise('core.import', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "'))"; + $method[] = $this->_t(2) . "if (\$user->authorise('" . $viewName_single . ".import', 'com_" . $this->componentCodeName . "') && \$user->authorise('core.import', 'com_" . $this->componentCodeName . "'))"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Get the import model"; $method[] = $this->_t(3) . "\$model = \$this->getModel('" . ComponentbuilderHelper::safeString($viewName_list, 'F') . "');"; @@ -9109,26 +9258,23 @@ class Interpretation extends Fields $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Redirect to import view."; // add to lang array $selectImportFileNote = $this->langPrefix . "_IMPORT_SELECT_FILE_FOR_" . ComponentbuilderHelper::safeString($viewName_list, 'U'); - if (!isset($this->langContent[$this->lang][$selectImportFileNote])) - { - $this->langContent[$this->lang][$selectImportFileNote] = 'Select the file to import data to ' . $viewName_list . '.'; - } + $this->setLangContent($this->lang, $selectImportFileNote, 'Select the file to import data to ' . $viewName_list . '.'); $method[] = $this->_t(4) . "\$message = JText:" . ":_('" . $selectImportFileNote . "');"; // if this view has custom script it must have as custom import (model, veiw, controller) if (isset($this->importCustomScripts[$viewName_list]) && $this->importCustomScripts[$viewName_list]) { - $method[] = $this->_t(4) . "\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "&view=import_" . $viewName_list . "', false), \$message);"; + $method[] = $this->_t(4) . "\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->componentCodeName . "&view=import_" . $viewName_list . "', false), \$message);"; } else { - $method[] = $this->_t(4) . "\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "&view=import', false), \$message);"; + $method[] = $this->_t(4) . "\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->componentCodeName . "&view=import', false), \$message);"; } $method[] = $this->_t(4) . "return;"; $method[] = $this->_t(3) . "}"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Redirect to the list screen with error."; $method[] = $this->_t(2) . "\$message = JText:" . ":_('" . $this->langPrefix . "_IMPORT_FAILED');"; - $method[] = $this->_t(2) . "\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "&view=" . $viewName_list . "', false), \$message, 'error');"; + $method[] = $this->_t(2) . "\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->componentCodeName . "&view=" . $viewName_list . "', false), \$message, 'error');"; $method[] = $this->_t(2) . "return;"; $method[] = $this->_t(1) . "}"; return implode(PHP_EOL, $method); @@ -9144,10 +9290,7 @@ class Interpretation extends Fields // main lang prefix $langExport = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Export Data', 'U'); // add to lang array - if (!isset($this->langContent[$this->lang][$langExport])) - { - $this->langContent[$this->lang][$langExport] = 'Export Data'; - } + $this->setLangContent($this->lang, $langExport, 'Export Data'); $button = array(); $button[] = PHP_EOL . PHP_EOL . $this->_t(3) . "if (\$this->canDo->get('core.export') && \$this->canDo->get('" . $viewName_single . ".export'))"; $button[] = $this->_t(3) . "{"; @@ -9166,10 +9309,7 @@ class Interpretation extends Fields // main lang prefix $langImport = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Import Data', 'U'); // add to lang array - if (!isset($this->langContent[$this->lang][$langImport])) - { - $this->langContent[$this->lang][$langImport] = 'Import Data'; - } + $this->setLangContent($this->lang, $langImport, 'Import Data'); $button = array(); $button[] = PHP_EOL . PHP_EOL . $this->_t(2) . "if (\$this->canDo->get('core.import') && \$this->canDo->get('" . $viewName_single . ".import'))"; $button[] = $this->_t(2) . "{"; @@ -9233,8 +9373,8 @@ class Interpretation extends Fields { $query .= PHP_EOL . $this->_t(2) . "\$query->select(\$db->quoteName('c.title','category_title'));"; } - $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " From the " . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "_item table"; - $query .= PHP_EOL . $this->_t(2) . "\$query->from(\$db->quoteName('#__" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "_" . $viewName_single . "', 'a'));"; + $query .= PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " From the " . $this->componentCodeName . "_item table"; + $query .= PHP_EOL . $this->_t(2) . "\$query->from(\$db->quoteName('#__" . $this->componentCodeName . "_" . $viewName_single . "', 'a'));"; // add the category if ($addCategory) { @@ -9265,7 +9405,7 @@ class Interpretation extends Fields $query .= PHP_EOL . $this->_t(3) . "\$query->where('a.access = ' . (int) \$access);"; $query .= PHP_EOL . $this->_t(2) . "}"; $query .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Implement View Level Access"; - $query .= PHP_EOL . $this->_t(2) . "if (!\$user->authorise('core.options', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "'))"; + $query .= PHP_EOL . $this->_t(2) . "if (!\$user->authorise('core.options', 'com_" . $this->componentCodeName . "'))"; $query .= PHP_EOL . $this->_t(2) . "{"; $query .= PHP_EOL . $this->_t(3) . "\$groups = implode(',', \$user->getAuthorisedViewLevels());"; $query .= PHP_EOL . $this->_t(3) . "\$query->where('a.access IN (' . \$groups . ')');"; @@ -9774,7 +9914,7 @@ class Interpretation extends Fields $_config = array($this->hhh . 'CREATIONDATE' . $this->hhh => $_created, $this->hhh . 'BUILDDATE' . $this->hhh => $_modified, $this->hhh . 'VERSION' . $this->hhh => $viewArray['settings']->version); $this->buildDynamique($_target, 'javascript_file', false, $_config); // set path - $_path = '/administrator/components/com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '/assets/js/' . $viewName_list . '.js'; + $_path = '/administrator/components/com_' . $this->componentCodeName . '/assets/js/' . $viewName_list . '.js'; // load the file to the list view $this->fileContentDynamic[$viewName_list][$this->hhh . 'ADMIN_ADD_JAVASCRIPT_FILE' . $this->hhh] = PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Add List View JavaScript File" . PHP_EOL . $this->_t(2) . $this->setIncludeLibScript($_path); } @@ -10651,7 +10791,7 @@ class Interpretation extends Fields { $function = array(); // set component name - $component = ComponentbuilderHelper::safeString($this->componentData->name_code); + $component = $this->componentCodeName; foreach ($this->filterBuilder[$viewName_list] as $filter) { if ($filter['type'] != 'category' && ComponentbuilderHelper::checkArray($filter['custom']) && $filter['custom']['extends'] === 'user') @@ -10854,6 +10994,8 @@ class Interpretation extends Fields { if (isset($this->filterBuilder[$view]) && ComponentbuilderHelper::checkArray($this->filterBuilder[$view])) { + // get component name + $Component = $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh]; $otherFilter = array(); foreach ($this->filterBuilder[$view] as $filter) { @@ -10864,7 +11006,15 @@ class Interpretation extends Fields $type = ComponentbuilderHelper::safeString($filter['custom']['type'], 'F'); $otherFilter[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Set " . $CodeName . " Selection"; $otherFilter[] = $this->_t(2) . "\$this->" . $codeName . "Options = JFormHelper::loadFieldType('" . $type . "')->options;"; - $otherFilter[] = $this->_t(2) . "if (\$this->" . $codeName . "Options)"; + $otherFilter[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " We do some sanitation for " . $CodeName . " filter"; + $otherFilter[] = $this->_t(2) . "if (" . $Component . "Helper::checkArray(\$this->" . $codeName . "Options) &&"; + $otherFilter[] = $this->_t(3) . "isset(\$this->" . $codeName . "Options[0]->value) &&"; + $otherFilter[] = $this->_t(3) . "!" . $Component . "Helper::checkString(\$this->" . $codeName . "Options[0]->value))"; + $otherFilter[] = $this->_t(2) . "{"; + $otherFilter[] = $this->_t(3) . "unset(\$this->" . $codeName . "Options[0]);"; + $otherFilter[] = $this->_t(2) . "}"; + $otherFilter[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Only load " . $CodeName . " filter if it has values"; + $otherFilter[] = $this->_t(2) . "if (" . $Component . "Helper::checkArray(\$this->" . $codeName . "Options))"; $otherFilter[] = $this->_t(2) . "{"; $otherFilter[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " " . $CodeName . " Filter"; $otherFilter[] = $this->_t(3) . "JHtmlSidebar::addFilter("; @@ -10898,7 +11048,15 @@ class Interpretation extends Fields } $otherFilter[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Set " . $Codename . " Selection"; $otherFilter[] = $this->_t(2) . "\$this->" . $filter['code'] . "Options = " . $functionName; - $otherFilter[] = $this->_t(2) . "if (\$this->" . $filter['code'] . "Options)"; + $otherFilter[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " We do some sanitation for " . $Codename . " filter"; + $otherFilter[] = $this->_t(2) . "if (" . $Component . "Helper::checkArray(\$this->" . $filter['code'] . "Options) &&"; + $otherFilter[] = $this->_t(3) . "isset(\$this->" . $filter['code'] . "Options[0]->value) &&"; + $otherFilter[] = $this->_t(3) . "!" . $Component . "Helper::checkString(\$this->" . $filter['code'] . "Options[0]->value))"; + $otherFilter[] = $this->_t(2) . "{"; + $otherFilter[] = $this->_t(3) . "unset(\$this->" . $filter['code'] . "Options[0]);"; + $otherFilter[] = $this->_t(2) . "}"; + $otherFilter[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Only load " . $Codename . " filter if it has values"; + $otherFilter[] = $this->_t(2) . "if (" . $Component . "Helper::checkArray(\$this->" . $filter['code'] . "Options))"; $otherFilter[] = $this->_t(2) . "{"; $otherFilter[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " " . $Codename . " Filter"; $otherFilter[] = $this->_t(3) . "JHtmlSidebar::addFilter("; @@ -10931,27 +11089,19 @@ class Interpretation extends Fields public function setCategoryFilter($viewName_list) { - if (isset($this->categoryBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$viewName_list])) + if (isset($this->categoryBuilder[$viewName_list]) + && ComponentbuilderHelper::checkArray($this->categoryBuilder[$viewName_list]) + && isset($this->categoryBuilder[$viewName_list]['extension'])) { - // check if category has another name - if (isset($this->catOtherName[$viewName_list]) && ComponentbuilderHelper::checkArray($this->catOtherName[$viewName_list])) - { - $otherViews = $this->catOtherName[$viewName_list]['views']; - } - else - { - $otherViews = $viewName_list; - } // set component name - $component = ComponentbuilderHelper::safeString($this->componentData->name_code); - $COMONENT = ComponentbuilderHelper::safeString($this->componentData->name_code, 'U'); + $COPMONENT = ComponentbuilderHelper::safeString($this->componentData->name_code, 'U'); // set filter $filter = array(); $filter[] = PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Category Filter."; $filter[] = $this->_t(2) . "JHtmlSidebar::addFilter("; $filter[] = $this->_t(3) . "JText:" . ":_('JOPTION_SELECT_CATEGORY'),"; $filter[] = $this->_t(3) . "'filter_category_id',"; - $filter[] = $this->_t(3) . "JHtml::_('select.options', JHtml::_('category.options', 'com_" . $component . "." . $otherViews . "'), 'value', 'text', \$this->state->get('filter.category_id'))"; + $filter[] = $this->_t(3) . "JHtml::_('select.options', JHtml::_('category.options', '" . $this->categoryBuilder[$viewName_list]['extension'] . "'), 'value', 'text', \$this->state->get('filter.category_id'))"; $filter[] = $this->_t(2) . ");"; @@ -10959,9 +11109,9 @@ class Interpretation extends Fields $filter[] = $this->_t(2) . "{"; $filter[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Category Batch selection."; $filter[] = $this->_t(3) . "JHtmlBatch_::addListSelection("; - $filter[] = $this->_t(4) . "JText:" . ":_('COM_" . $COMONENT . "_KEEP_ORIGINAL_CATEGORY'),"; + $filter[] = $this->_t(4) . "JText:" . ":_('COM_" . $COPMONENT . "_KEEP_ORIGINAL_CATEGORY'),"; $filter[] = $this->_t(4) . "'batch[category]',"; - $filter[] = $this->_t(4) . "JHtml::_('select.options', JHtml::_('category.options', 'com_" . $component . "." . $otherViews . "'), 'value', 'text')"; + $filter[] = $this->_t(4) . "JHtml::_('select.options', JHtml::_('category.options', '" . $this->categoryBuilder[$viewName_list]['extension'] . "'), 'value', 'text')"; $filter[] = $this->_t(3) . ");"; $filter[] = $this->_t(2) . "}"; @@ -10975,8 +11125,18 @@ class Interpretation extends Fields { if (isset($this->categoryBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$viewName_list])) { + // get the actual extention + $_extension = $this->categoryBuilder[$viewName_list]['extension']; + $_extension = explode('.', $_extension); // set component name - $component = ComponentbuilderHelper::safeString($this->componentData->name_code); + if (ComponentbuilderHelper::checkArray($_extension)) + { + $component = str_replace('com_', '', $_extension[0]); + } + else + { + $component = $this->componentCodeName; + } // check if category has another name if (isset($this->catOtherName[$viewName_list]) && ComponentbuilderHelper::checkArray($this->catOtherName[$viewName_list])) { @@ -11002,10 +11162,10 @@ class Interpretation extends Fields // set script to global helper file $includeHelper = array(); $includeHelper[] = "\n//" . $this->setLine(__LINE__) . "Insure this view category file is loaded."; - $includeHelper[] = "\$classname = '" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . ucfirst($viewName_list) . "Categories';"; + $includeHelper[] = "\$classname = '" . ucfirst( $component ) . ucfirst($viewName_list) . "Categories';"; $includeHelper[] = "if (!class_exists(\$classname))"; $includeHelper[] = "{"; - $includeHelper[] = $this->_t(1) . "\$path = JPATH_SITE . '/components/com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "/helpers/category" . $viewName_list . ".php';"; + $includeHelper[] = $this->_t(1) . "\$path = JPATH_SITE . '/components/com_" . $component . "/helpers/category" . $viewName_list . ".php';"; $includeHelper[] = $this->_t(1) . "if (is_file(\$path))"; $includeHelper[] = $this->_t(1) . "{"; $includeHelper[] = $this->_t(2) . "include_once \$path;"; @@ -11016,11 +11176,11 @@ class Interpretation extends Fields // return category view string if (isset($this->fileContentStatic[$this->hhh . 'ROUTER_CATEGORY_VIEWS' . $this->hhh]) && ComponentbuilderHelper::checkString($this->fileContentStatic[$this->hhh . 'ROUTER_CATEGORY_VIEWS' . $this->hhh])) { - return "," . PHP_EOL . $this->_t(3) . '"com_' . $component . '.' . $otherViews . '" => "' . $otherView . '"'; + return "," . PHP_EOL . $this->_t(3) . '"' . $this->categoryBuilder[$viewName_list]['extension'] . '" => "' . $otherView . '"'; } else { - return PHP_EOL . $this->_t(3) . '"com_' . $component . '.' . $otherViews . '" => "' . $otherView . '"'; + return PHP_EOL . $this->_t(3) . '"' . $this->categoryBuilder[$viewName_list]['extension'] . '" => "' . $otherView . '"'; } } return ''; @@ -11030,7 +11190,7 @@ class Interpretation extends Fields { $allow = array(); // set component name - $component = ComponentbuilderHelper::safeString($this->componentData->name_code); + $component = $this->componentCodeName; // prepare custom permission script $customAllow = $this->getCustomScriptBuilder('php_allowadd', $viewName_single, '', null, true); // setup correct core target @@ -11132,7 +11292,7 @@ class Interpretation extends Fields { $allow = array(); // set component name - $component = ComponentbuilderHelper::safeString($this->componentData->name_code); + $component = $this->componentCodeName; // prepare custom permission script $customAllow = $this->getCustomScriptBuilder('php_allowedit', $viewName_single, '', null, true); // setup correct core target @@ -11342,7 +11502,7 @@ class Interpretation extends Fields public function setJmodelAdminGetForm($viewName_single, $viewName_list) { // set component name - $component = ComponentbuilderHelper::safeString($this->componentData->name_code); + $component = $this->componentCodeName; // allways load these $allow = array(); $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get the form."; @@ -11645,7 +11805,7 @@ class Interpretation extends Fields { $allow = array(); // set component name - $component = ComponentbuilderHelper::safeString($this->componentData->name_code); + $component = $this->componentCodeName; // prepare custom permission script $customAllow = $this->getCustomScriptBuilder('php_allowedit', $viewName_single, $this->_t(2) . "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;" . PHP_EOL); // setup correct core target @@ -11683,7 +11843,7 @@ class Interpretation extends Fields { $allow = array(); // set component name - $component = ComponentbuilderHelper::safeString($this->componentData->name_code); + $component = $this->componentCodeName; // setup correct core target $coreLoad = false; if (isset($this->permissionCore[$viewName_single])) @@ -11767,7 +11927,7 @@ class Interpretation extends Fields { $allow = array(); // set component name - $component = ComponentbuilderHelper::safeString($this->componentData->name_code); + $component = $this->componentCodeName; // setup correct core target $coreLoad = false; if (isset($this->permissionCore[$viewName_single])) @@ -11868,7 +12028,7 @@ class Interpretation extends Fields { $allow = array(); // set component name - $component = ComponentbuilderHelper::safeString($this->componentData->name_code); + $component = $this->componentCodeName; // setup correct core target $coreLoad = false; if (isset($this->permissionCore[$viewName_single])) @@ -11931,7 +12091,7 @@ class Interpretation extends Fields if ($view != 'component') { // set component name - $component = ComponentbuilderHelper::safeString($this->componentData->name_code); + $component = $this->componentCodeName; // set label $label = 'Permissions in relation to this ' . $view; // set the access fieldset @@ -12131,7 +12291,7 @@ class Interpretation extends Fields // set lang strings $viewNameLang_readonly = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($view['settings']->name_single . ' readonly', 'U'); // load to lang - $this->langContent[$this->lang][$viewNameLang_readonly] = $view['settings']->name_single . ' :: Readonly'; + $this->setLangContent($this->lang, $viewNameLang_readonly, $view['settings']->name_single . ' :: Readonly'); // build toolbar $toolBar = "JFactory::getApplication()->input->set('hidemainmenu', true);"; @@ -12144,8 +12304,8 @@ class Interpretation extends Fields $viewNameLang_new = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($view['settings']->name_single . ' New', 'U'); $viewNameLang_edit = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($view['settings']->name_single . ' Edit', 'U'); // load to lang - $this->langContent[$this->lang][$viewNameLang_new] = 'A New ' . $view['settings']->name_single; - $this->langContent[$this->lang][$viewNameLang_edit] = 'Editing the ' . $view['settings']->name_single; + $this->setLangContent($this->lang, $viewNameLang_new, 'A New ' . $view['settings']->name_single); + $this->setLangContent($this->lang, $viewNameLang_edit, 'Editing the ' . $view['settings']->name_single); // build toolbar $toolBar = "JFactory::getApplication()->input->set('hidemainmenu', true);"; $toolBar .= PHP_EOL . $this->_t(2) . "\$user = JFactory::getUser();"; @@ -12245,7 +12405,7 @@ class Interpretation extends Fields $toolBar .= PHP_EOL . $this->_t(4) . "\$canVersion = (\$this->canDo->get('core.version') && \$this->canDo->get('" . $core['core.version'] . "'));"; $toolBar .= PHP_EOL . $this->_t(4) . "if (\$this->state->params->get('save_history', 1) && \$this->canDo->get('" . $core['core.edit'] . "') && \$canVersion)"; $toolBar .= PHP_EOL . $this->_t(4) . "{"; - $toolBar .= PHP_EOL . $this->_t(5) . "JToolbarHelper::versions('com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $viewName . "', \$this->item->id);"; + $toolBar .= PHP_EOL . $this->_t(5) . "JToolbarHelper::versions('com_" . $this->componentCodeName . "." . $viewName . "', \$this->item->id);"; $toolBar .= PHP_EOL . $this->_t(4) . "}"; } } @@ -12256,7 +12416,7 @@ class Interpretation extends Fields $toolBar .= PHP_EOL . $this->_t(4) . "\$canVersion = (\$this->canDo->get('core.version') && \$this->canDo->get('" . $core['core.version'] . "'));"; $toolBar .= PHP_EOL . $this->_t(4) . "if (\$this->state->params->get('save_history', 1) && \$this->canDo->get('core.edit') && \$canVersion)"; $toolBar .= PHP_EOL . $this->_t(4) . "{"; - $toolBar .= PHP_EOL . $this->_t(5) . "JToolbarHelper::versions('com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $viewName . "', \$this->item->id);"; + $toolBar .= PHP_EOL . $this->_t(5) . "JToolbarHelper::versions('com_" . $this->componentCodeName . "." . $viewName . "', \$this->item->id);"; $toolBar .= PHP_EOL . $this->_t(4) . "}"; } } @@ -12718,9 +12878,9 @@ class Interpretation extends Fields if (isset($item['custom']['table'])) { // check if this is a local table - if (strpos($item['custom']['table'], '#__' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '_') !== false) + if (strpos($item['custom']['table'], '#__' . $this->componentCodeName . '_') !== false) { - $keyTableNAme = str_replace('#__' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '_', '', $item['custom']['table']); + $keyTableNAme = str_replace('#__' . $this->componentCodeName . '_', '', $item['custom']['table']); } else { @@ -13013,7 +13173,7 @@ class Interpretation extends Fields $langName = 'Add ' . ComponentbuilderHelper::safeString($view['settings']->name_single, 'W') . '

'; $langKey = $this->langPrefix . '_DASHBOARD_' . ComponentbuilderHelper::safeString($view['settings']->name_single, 'U') . '_ADD'; // add to lang - $this->langContent[$this->lang][$langKey] = $langName; + $this->setLangContent($this->lang, $langKey, $langName); $counter++; } if (isset($view['dashboard_list']) && $view['dashboard_list'] == 1) @@ -13041,7 +13201,7 @@ class Interpretation extends Fields $langName = ComponentbuilderHelper::safeString($view['settings']->name_list, 'W') . '

'; $langKey = $this->langPrefix . '_DASHBOARD_' . ComponentbuilderHelper::safeString($view['settings']->name_list, 'U'); // add to lang - $this->langContent[$this->lang][$langKey] = $langName; + $this->setLangContent($this->lang, $langKey, $langName); $counter++; } if (isset($this->categoryBuilder[$name_list]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$name_list])) @@ -13066,7 +13226,7 @@ class Interpretation extends Fields { // add to lang $langKey = $this->langPrefix . '_DASHBOARD_' . ComponentbuilderHelper::safeString($otherViews, 'U') . '_' . ComponentbuilderHelper::safeString($catCode, 'U'); - $this->langContent[$this->lang][$langKey] = $langName; + $this->setLangContent($this->lang, $langKey, $langName); // get image type $type = ComponentbuilderHelper::imageInfo($view['settings']->icon_category); if ($type) @@ -13236,14 +13396,14 @@ class Interpretation extends Fields $display[] = $tab . $this->_t(2) . ""; $slidecounter++; // build the template file - $target = array('custom_admin' => $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]); + $target = array('custom_admin' => $this->componentCodeName); $this->buildDynamique($target, 'template', $tempName); // set the file data $TARGET = ComponentbuilderHelper::safeString($this->target, 'U'); // SITE_TEMPLATE_BODY <<>> - $this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '_' . $tempName][$this->hhh . 'CUSTOM_ADMIN_TEMPLATE_BODY' . $this->hhh] = PHP_EOL . $html; + $this->fileContentDynamic[$this->componentCodeName . '_' . $tempName][$this->hhh . 'CUSTOM_ADMIN_TEMPLATE_BODY' . $this->hhh] = PHP_EOL . $html; // SITE_TEMPLATE_CODE_BODY <<>> - $this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '_' . $tempName][$this->hhh . 'CUSTOM_ADMIN_TEMPLATE_CODE_BODY' . $this->hhh] = ''; + $this->fileContentDynamic[$this->componentCodeName . '_' . $tempName][$this->hhh . 'CUSTOM_ADMIN_TEMPLATE_CODE_BODY' . $this->hhh] = ''; } $display[] = $tab . $this->_t(1) . ""; $display[] = $tab . "
"; @@ -13283,7 +13443,7 @@ class Interpretation extends Fields $langName = $menu['settings']->name . '

'; $langKey = $this->langPrefix . '_DASHBOARD_' . $menu['settings']->CODE; // add to lang - $this->langContent[$this->lang][$langKey] = $langName; + $this->setLangContent($this->lang, $langKey, $langName); // set icon if ($counter == 0) { @@ -13313,7 +13473,7 @@ class Interpretation extends Fields $langName = $menu['settings']->name . '

'; $langKey = $this->langPrefix . '_DASHBOARD_' . $menu['settings']->CODE; // add to lang - $this->langContent[$this->lang][$langKey] = $langName; + $this->setLangContent($this->lang, $langKey, $langName); // set icon $this->lastCustomDashboardIcon[$nr] = ", '" . $type . $menu['settings']->code . "'"; } @@ -13343,7 +13503,7 @@ class Interpretation extends Fields $langName = $menu['name'] . '

'; $langKey = $this->langPrefix . '_DASHBOARD_' . $nameUpper; // add to lang - $this->langContent[$this->lang][$langKey] = $langName; + $this->setLangContent($this->lang, $langKey, $langName); // if this is a link build the icon values with pipe if (isset($menu['link']) && ComponentbuilderHelper::checkString($menu['link'])) @@ -13391,7 +13551,7 @@ class Interpretation extends Fields $langName = $menu['name'] . '

'; $langKey = $this->langPrefix . '_DASHBOARD_' . $nameUpper; // add to lang - $this->langContent[$this->lang][$langKey] = $langName; + $this->setLangContent($this->lang, $langKey, $langName); // if this is a link build the icon values with pipe if (isset($menu['link']) && ComponentbuilderHelper::checkString($menu['link'])) @@ -13418,12 +13578,12 @@ class Interpretation extends Fields // main lang prefix $lang = $this->langPrefix . '_SUBMENU'; // set the code name - $codeName = ComponentbuilderHelper::safeString($this->componentData->name_code); + $codeName = $this->componentCodeName; // set default dashboard if (!ComponentbuilderHelper::checkString($this->dynamicDashboard)) { $menus .= "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_DASHBOARD'), 'index.php?option=com_" . $codeName . "&view=" . $codeName . "', \$submenu === '" . $codeName . "');"; - $this->langContent[$this->lang][$lang . '_DASHBOARD'] = 'Dashboard'; + $this->setLangContent($this->lang, $lang . '_DASHBOARD', 'Dashboard'); } $catArray = array(); foreach ($this->componentData->admin_views as $view) @@ -13452,7 +13612,7 @@ class Interpretation extends Fields $tab = $this->_t(1); } $menus .= PHP_EOL . $this->_t(2) . $tab . "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_" . $nameUpper . "'), 'index.php?option=com_" . $codeName . "&view=" . $nameList . "', \$submenu === '" . $nameList . "');"; - $this->langContent[$this->lang][$lang . "_" . $nameUpper] = $view['settings']->name_list; + $this->setLangContent($this->lang, $lang . "_" . $nameUpper, $view['settings']->name_list); // check if category has another name if (isset($this->catOtherName[$nameList]) && ComponentbuilderHelper::checkArray($this->catOtherName[$nameList])) { @@ -13494,8 +13654,8 @@ class Interpretation extends Fields $menus .= PHP_EOL . $this->_t(3) . "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_" . $nameUpper . "_FIELDS'), 'index.php?option=com_fields&context=com_" . $codeName . "." . $nameSingle . "', \$submenu === 'fields.fields');"; $menus .= PHP_EOL . $this->_t(3) . "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_" . $nameUpper . "_FIELDS_GROUPS'), 'index.php?option=com_fields&view=groups&context=com_" . $codeName . "." . $nameSingle . "', \$submenu === 'fields.groups');"; $menus .= PHP_EOL . $this->_t(2) . "}"; - $this->langContent[$this->lang][$lang . "_" . $nameUpper . "_FIELDS"] = $view['settings']->name_list . ' Fields'; - $this->langContent[$this->lang][$lang . "_" . $nameUpper . "_FIELDS_GROUPS"] = $view['settings']->name_list . ' Field Groups'; + $this->setLangContent($this->lang, $lang . "_" . $nameUpper . "_FIELDS", $view['settings']->name_list . ' Fields'); + $this->setLangContent($this->lang, $lang . "_" . $nameUpper . "_FIELDS_GROUPS", $view['settings']->name_list . ' Field Groups'); // build uninstall script for fields $this->uninstallScriptBuilder[$nameSingle] = 'com_' . $codeName . '.' . $nameSingle; $this->uninstallScriptFields[$nameSingle] = $nameSingle; @@ -13594,13 +13754,13 @@ class Interpretation extends Fields if (isset($menu['link']) && ComponentbuilderHelper::checkString($menu['link'])) { - $this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name; + $this->setLangContent($this->lang, $lang . '_' . $nameUpper, $name); // add custom menu $custom .= PHP_EOL . $this->_t(2) . $tab . "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_" . $nameUpper . "'), '" . $menu['link'] . "', \$submenu === '" . $nameList . "');"; } else { - $this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name; + $this->setLangContent($this->lang, $lang . '_' . $nameUpper, $name); // add custom menu $custom .= PHP_EOL . $this->_t(2) . $tab . "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_" . $nameUpper . "'), 'index.php?option=com_" . $codeName . "&view=" . $nameList . "', \$submenu === '" . $nameList . "');"; } @@ -13638,13 +13798,13 @@ class Interpretation extends Fields } if (isset($menu['link']) && ComponentbuilderHelper::checkString($menu['link'])) { - $this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name; + $this->setLangContent($this->lang, $lang . '_' . $nameUpper, $name); // add custom menu $this->lastCustomSubMenu[$nr] .= PHP_EOL . $this->_t(2) . $tab . "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_" . $nameUpper . "'), '" . $menu['link'] . "', \$submenu === '" . $nameList . "');"; } else { - $this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name; + $this->setLangContent($this->lang, $lang . '_' . $nameUpper, $name); // add custom menu $this->lastCustomSubMenu[$nr] .= PHP_EOL . $this->_t(2) . $tab . "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_" . $nameUpper . "'), 'index.php?option=com_" . $codeName . "&view=" . $nameList . "', \$submenu === '" . $nameList . "');"; } @@ -13662,7 +13822,7 @@ class Interpretation extends Fields // main lang prefix $lang = $this->langPrefix . '_MENU'; // set the code name - $codeName = ComponentbuilderHelper::safeString($this->componentData->name_code); + $codeName = $this->componentCodeName; // default prefix is none $prefix = ''; // check if local is set @@ -13687,11 +13847,11 @@ class Interpretation extends Fields // add the prefix if ($addPrefix == 1) { - $this->langContent['adminsys'][$lang] = $prefix . $this->componentData->name; + $this->setLangContent('adminsys', $lang, $prefix . $this->componentData->name); } else { - $this->langContent['adminsys'][$lang] = $this->componentData->name; + $this->setLangContent('adminsys', $lang, $this->componentData->name); } // loop over the admin views foreach ($this->componentData->admin_views as $view) @@ -13703,7 +13863,7 @@ class Interpretation extends Fields $nameList = ComponentbuilderHelper::safeString($view['settings']->name_list); $nameUpper = ComponentbuilderHelper::safeString($view['settings']->name_list, 'U'); $menus .= PHP_EOL . $this->_t(3) . '' . $lang . '_' . $nameUpper . ''; - $this->langContent['adminsys'][$lang . '_' . $nameUpper] = $view['settings']->name_list; + $this->setLangContent('adminsys', $lang . '_' . $nameUpper, $view['settings']->name_list); } } if (isset($this->lastCustomMainMenu) && ComponentbuilderHelper::checkArray($this->lastCustomMainMenu)) @@ -13731,13 +13891,13 @@ class Interpretation extends Fields { if (isset($menu['mainmenu']) && $menu['mainmenu'] == 1 && $view['adminview'] == $menu['before']) { - $this->langContent['adminsys'][$lang . '_' . $menu['settings']->CODE] = $menu['settings']->name; + $this->setLangContent('adminsys', $lang . '_' . $menu['settings']->CODE, $menu['settings']->name); // add custom menu $customMenu .= PHP_EOL . $this->_t(3) . '' . $lang . '_' . $menu['settings']->CODE . ''; } elseif (isset($menu['mainmenu']) && $menu['mainmenu'] == 1 && empty($menu['before'])) { - $this->langContent['adminsys'][$lang . '_' . $menu['settings']->CODE] = $menu['settings']->name; + $this->setLangContent('adminsys', $lang . '_' . $menu['settings']->CODE, $menu['settings']->name); // add custom menu $this->lastCustomMainMenu[$nr] = PHP_EOL . $this->_t(3) . '' . $lang . '_' . $menu['settings']->CODE . ''; } @@ -13756,7 +13916,7 @@ class Interpretation extends Fields { $nameList = ComponentbuilderHelper::safeString($menu['name']); $nameUpper = ComponentbuilderHelper::safeString($menu['name'], 'U'); - $this->langContent['adminsys'][$lang . '_' . $nameUpper] = $menu['name']; + $this->setLangContent('adminsys', $lang . '_' . $nameUpper, $menu['name']); // sanitize url if (strpos($menu['link'], 'http') === false) { @@ -13778,7 +13938,7 @@ class Interpretation extends Fields { $nameList = ComponentbuilderHelper::safeString($menu['name_code']); $nameUpper = ComponentbuilderHelper::safeString($menu['name_code'], 'U'); - $this->langContent['adminsys'][$lang . '_' . $nameUpper] = $menu['name']; + $this->setLangContent('adminsys', $lang . '_' . $nameUpper, $menu['name']); // add custom menu $customMenu .= PHP_EOL . $this->_t(3) . '' . $lang . '_' . $nameUpper . ''; } @@ -13789,7 +13949,7 @@ class Interpretation extends Fields { $nameList = ComponentbuilderHelper::safeString($menu['name']); $nameUpper = ComponentbuilderHelper::safeString($menu['name'], 'U'); - $this->langContent['adminsys'][$lang . '_' . $nameUpper] = $menu['name']; + $this->setLangContent('adminsys', $lang . '_' . $nameUpper, $menu['name']); // sanitize url if (strpos($menu['link'], 'http') === false) { @@ -13811,7 +13971,7 @@ class Interpretation extends Fields { $nameList = ComponentbuilderHelper::safeString($menu['name_code']); $nameUpper = ComponentbuilderHelper::safeString($menu['name_code'], 'U'); - $this->langContent['adminsys'][$lang . '_' . $nameUpper] = $menu['name']; + $this->setLangContent('adminsys', $lang . '_' . $nameUpper, $menu['name']); // add custom menu $this->lastCustomMainMenu[$nr] = PHP_EOL . $this->_t(3) . '' . $lang . '_' . $nameUpper . ''; } @@ -13834,17 +13994,18 @@ class Interpretation extends Fields // set the custom fields if (isset($this->componentData->config) && ComponentbuilderHelper::checkArray($this->componentData->config)) { - $component = ComponentbuilderHelper::safeString($this->componentData->name_code); + // set component code name + $component = $this->componentCodeName; $viewName = 'config'; $listViewName = 'configs'; // set place holders $placeholders = array(); - $placeholders[$this->hhh . 'component' . $this->hhh] = ComponentbuilderHelper::safeString($this->componentData->name_code); + $placeholders[$this->hhh . 'component' . $this->hhh] = $this->componentCodeName; $placeholders[$this->hhh . 'Component' . $this->hhh] = ComponentbuilderHelper::safeString($this->componentData->name_code, 'F'); $placeholders[$this->hhh . 'COMPONENT' . $this->hhh] = ComponentbuilderHelper::safeString($this->componentData->name_code, 'U'); $placeholders[$this->hhh . 'view' . $this->hhh] = $viewName; $placeholders[$this->hhh . 'views' . $this->hhh] = $listViewName; - $placeholders[$this->bbb . 'component' . $this->ddd] = $placeholders[$this->hhh . 'component' . $this->hhh]; + $placeholders[$this->bbb . 'component' . $this->ddd] = $this->componentCodeName; $placeholders[$this->bbb . 'Component' . $this->ddd] = $placeholders[$this->hhh . 'Component' . $this->hhh]; $placeholders[$this->bbb . 'COMPONENT' . $this->ddd] = $placeholders[$this->hhh . 'COMPONENT' . $this->hhh]; $placeholders[$this->bbb . 'view' . $this->ddd] = $viewName; @@ -13861,6 +14022,9 @@ class Interpretation extends Fields $viewType = 0; // set the custom table key $dbkey = 'g'; + // Trigger Event: jcb_ce_onBeforeSetConfigFieldsets + $this->triggerEvent('jcb_ce_onBeforeSetConfigFieldsets', array(&$this->componentContext, &$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->componentData->config, &$this->extensionsParams, &$placeholders)); + // build the config fields foreach ($this->componentData->config as $field) { // check the field builder type @@ -13914,6 +14078,8 @@ class Interpretation extends Fields } elseif (2 == $timer) // this is after the admin views are build { + // Trigger Event: jcb_ce_onBeforeSetConfigFieldsets + $this->triggerEvent('jcb_ce_onBeforeSetConfigFieldsets', array(&$this->componentContext, &$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->componentData->config, &$this->extensionsParams, &$this->placeholders)); // these field sets can only be added after admin view is build $this->setGroupControlConfigFieldsets($lang); // these can be added anytime really (but looks best after groups @@ -13924,7 +14090,8 @@ class Interpretation extends Fields // these are the coustom settings $this->setCustomControlConfigFieldsets($lang); } - // we can add more event (timers as we need) + // Trigger Event: jcb_ce_onAfterSetConfigFieldsets + $this->triggerEvent('jcb_ce_onAfterSetConfigFieldsets', array(&$this->componentContext, &$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->extensionsParams, &$this->frontEndParams, &$this->placeholders)); } public function setSiteControlConfigFieldsets($lang) @@ -14065,7 +14232,7 @@ class Interpretation extends Fields if (ComponentbuilderHelper::checkArray($bucket)) { // setup lang - $this->langContent[$this->lang][$lang . '_' . $tabUpper] = $tab; + $this->setLangContent($this->lang, $lang . '_' . $tabUpper, $tab); // start field set $this->configFieldSets[] = $this->_t(1) . "configFieldSets[] = $this->_t(2) . 'name="' . $tabCode . '"'; @@ -14092,9 +14259,9 @@ class Interpretation extends Fields $this->configFieldSets[] = $this->_t(2) . 'label="' . $lang . '_GROUPS_LABEL"'; $this->configFieldSets[] = $this->_t(2) . 'description="' . $lang . '_GROUPS_DESC">'; // setup lang - $this->langContent[$this->lang][$lang . '_GROUPS_LABEL'] = "Target Groups"; - $this->langContent[$this->lang][$lang . '_GROUPS_DESC'] = "The Parameters for the targeted groups are set here."; - $this->langContent[$this->lang][$lang . '_TARGET_GROUP_DESC'] = "Set the group/s being targeted by this user type."; + $this->setLangContent($this->lang, $lang . '_GROUPS_LABEL', "Target Groups"); + $this->setLangContent($this->lang, $lang . '_GROUPS_DESC', "The Parameters for the targeted groups are set here."); + $this->setLangContent($this->lang, $lang . '_TARGET_GROUP_DESC', "Set the group/s being targeted by this user type."); foreach ($this->setGroupControl as $selector => $label) { @@ -14126,7 +14293,7 @@ class Interpretation extends Fields public function setGlobalConfigFieldsets($lang, $autorName, $autorEmail) { // set component name - $component = ComponentbuilderHelper::safeString($this->componentData->name_code); + $component = $this->componentCodeName; // start building field set for config $this->configFieldSets[] = 'configFieldSets[] = $this->_t(2) . 'label="' . $lang . '_GLOBAL_LABEL"'; $this->configFieldSets[] = $this->_t(2) . 'description="' . $lang . '_GLOBAL_DESC">'; // setup lang - $this->langContent[$this->lang][$lang . '_GLOBAL_LABEL'] = "Global"; - $this->langContent[$this->lang][$lang . '_GLOBAL_DESC'] = "The Global Parameters"; + $this->setLangContent($this->lang, $lang . '_GLOBAL_LABEL', "Global"); + $this->setLangContent($this->lang, $lang . '_GLOBAL_DESC', "The Global Parameters"); // add auto checin if required if ($this->addCheckin) { @@ -14162,14 +14329,14 @@ class Interpretation extends Fields $this->configFieldSets[] = $this->_t(2) . ""; $this->configFieldSets[] = $this->_t(2) . ''; // setup lang - $this->langContent[$this->lang][$lang . '_CHECK_TIMER_LABEL'] = "Check in timer"; - $this->langContent[$this->lang][$lang . '_CHECK_TIMER_DESC'] = "Set the intervals for the auto checkin fuction of tables that checks out the items to an user."; - $this->langContent[$this->lang][$lang . '_CHECK_TIMER_OPTION_ONE'] = "Every five hours"; - $this->langContent[$this->lang][$lang . '_CHECK_TIMER_OPTION_TWO'] = "Every twelve hours"; - $this->langContent[$this->lang][$lang . '_CHECK_TIMER_OPTION_THREE'] = "Once a day"; - $this->langContent[$this->lang][$lang . '_CHECK_TIMER_OPTION_FOUR'] = "Every second day"; - $this->langContent[$this->lang][$lang . '_CHECK_TIMER_OPTION_FIVE'] = "Once a week"; - $this->langContent[$this->lang][$lang . '_CHECK_TIMER_OPTION_SIX'] = "Never"; + $this->setLangContent($this->lang, $lang . '_CHECK_TIMER_LABEL', "Check in timer"); + $this->setLangContent($this->lang, $lang . '_CHECK_TIMER_DESC', "Set the intervals for the auto checkin fuction of tables that checks out the items to an user."); + $this->setLangContent($this->lang, $lang . '_CHECK_TIMER_OPTION_ONE', "Every five hours"); + $this->setLangContent($this->lang, $lang . '_CHECK_TIMER_OPTION_TWO', "Every twelve hours"); + $this->setLangContent($this->lang, $lang . '_CHECK_TIMER_OPTION_THREE', "Once a day"); + $this->setLangContent($this->lang, $lang . '_CHECK_TIMER_OPTION_FOUR', "Every second day"); + $this->setLangContent($this->lang, $lang . '_CHECK_TIMER_OPTION_FIVE', "Once a week"); + $this->setLangContent($this->lang, $lang . '_CHECK_TIMER_OPTION_SIX', "Never"); // load the Global checkin defautls $this->extensionsParams[] = '"check_in":"-1 day"'; } @@ -14229,11 +14396,11 @@ class Interpretation extends Fields $this->configFieldSets[] = $this->_t(3) . 'class="readonly"'; $this->configFieldSets[] = $this->_t(2) . "/>"; // setup lang - $this->langContent[$this->lang][$lang . '_AUTHOR'] = "Author Info"; - $this->langContent[$this->lang][$lang . '_AUTHOR_NAME_LABEL'] = "Author Name"; - $this->langContent[$this->lang][$lang . '_AUTHOR_NAME_DESC'] = "The name of the author of this component."; - $this->langContent[$this->lang][$lang . '_AUTHOR_EMAIL_LABEL'] = "Author Email"; - $this->langContent[$this->lang][$lang . '_AUTHOR_EMAIL_DESC'] = "The email address of the author of this component."; + $this->setLangContent($this->lang, $lang . '_AUTHOR', "Author Info"); + $this->setLangContent($this->lang, $lang . '_AUTHOR_NAME_LABEL', "Author Name"); + $this->setLangContent($this->lang, $lang . '_AUTHOR_NAME_DESC', "The name of the author of this component."); + $this->setLangContent($this->lang, $lang . '_AUTHOR_EMAIL_LABEL', "Author Email"); + $this->setLangContent($this->lang, $lang . '_AUTHOR_EMAIL_DESC', "The email address of the author of this component."); // set if contributors were added $langCont = $lang . '_CONTRIBUTOR'; if (isset($this->addContributors) && $this->addContributors && isset($this->componentData->contributors) && ComponentbuilderHelper::checkArray($this->componentData->contributors)) @@ -14307,7 +14474,7 @@ class Interpretation extends Fields $this->theContributors .= PHP_EOL . $this->_t(1) . "@" . strtolower($contributor['title']) . $this->_t(2) . $contributor['name'] . ' <' . $contributor['website'] . '>'; // setup lang $Counter = ComponentbuilderHelper::safeString($counter, 'Ww'); - $this->langContent[$this->lang][$langCont . '_' . $COUNTER] = "Contributor " . $Counter; + $this->setLangContent($this->lang, $langCont . '_' . $COUNTER, "Contributor " . $Counter); // load the Global checkin defautls $this->extensionsParams[] = '"titleContributor' . $counter . '":"' . $cbTitle . '"'; $this->extensionsParams[] = '"nameContributor' . $counter . '":"' . $cbName . '"'; @@ -14390,31 +14557,31 @@ class Interpretation extends Fields $this->configFieldSets[] = $this->_t(2) . ""; // setup lang $Counter = ComponentbuilderHelper::safeString($counter, 'Ww'); - $this->langContent[$this->lang][$langCont . '_' . $COUNTER] = "Contributor " . $Counter; + $this->setLangContent($this->lang, $langCont . '_' . $COUNTER, "Contributor " . $Counter); } } if ($this->addContributors || $this->componentData->emptycontributors == 1) { // setup lang - $this->langContent[$this->lang][$langCont . '_TITLE_LABEL'] = "Contributor Job Title"; - $this->langContent[$this->lang][$langCont . '_TITLE_DESC'] = "The job title that best describes the contributor's relationship to this component."; - $this->langContent[$this->lang][$langCont . '_NAME_LABEL'] = "Contributor Name"; - $this->langContent[$this->lang][$langCont . '_NAME_DESC'] = "The name of this contributor."; - $this->langContent[$this->lang][$langCont . '_EMAIL_LABEL'] = "Contributor Email"; - $this->langContent[$this->lang][$langCont . '_EMAIL_DESC'] = "The email of this contributor."; - $this->langContent[$this->lang][$langCont . '_LINK_LABEL'] = "Contributor Website"; - $this->langContent[$this->lang][$langCont . '_LINK_DESC'] = "The link to this contributor's website."; - $this->langContent[$this->lang][$langCont . '_USE_LABEL'] = "Use"; - $this->langContent[$this->lang][$langCont . '_USE_DESC'] = "How should we link to this contributor."; - $this->langContent[$this->lang][$langCont . '_USE_NONE'] = "None"; - $this->langContent[$this->lang][$langCont . '_USE_EMAIL'] = "Email"; - $this->langContent[$this->lang][$langCont . '_USE_WWW'] = "Website"; - $this->langContent[$this->lang][$langCont . '_SHOW_LABEL'] = "Show"; - $this->langContent[$this->lang][$langCont . '_SHOW_DESC'] = "Select where you want this contributor's details to show in the component."; - $this->langContent[$this->lang][$langCont . '_SHOW_NONE'] = "Hide"; - $this->langContent[$this->lang][$langCont . '_SHOW_BACK'] = "Back-end"; - $this->langContent[$this->lang][$langCont . '_SHOW_FRONT'] = "Front-end"; - $this->langContent[$this->lang][$langCont . '_SHOW_ALL'] = "Both Front & Back-end"; + $this->setLangContent($this->lang, $langCont . '_TITLE_LABEL', "Contributor Job Title"); + $this->setLangContent($this->lang, $langCont . '_TITLE_DESC', "The job title that best describes the contributor's relationship to this component."); + $this->setLangContent($this->lang, $langCont . '_NAME_LABEL', "Contributor Name"); + $this->setLangContent($this->lang, $langCont . '_NAME_DESC', "The name of this contributor."); + $this->setLangContent($this->lang, $langCont . '_EMAIL_LABEL', "Contributor Email"); + $this->setLangContent($this->lang, $langCont . '_EMAIL_DESC', "The email of this contributor."); + $this->setLangContent($this->lang, $langCont . '_LINK_LABEL', "Contributor Website"); + $this->setLangContent($this->lang, $langCont . '_LINK_DESC', "The link to this contributor's website."); + $this->setLangContent($this->lang, $langCont . '_USE_LABEL', "Use"); + $this->setLangContent($this->lang, $langCont . '_USE_DESC', "How should we link to this contributor."); + $this->setLangContent($this->lang, $langCont . '_USE_NONE', "None"); + $this->setLangContent($this->lang, $langCont . '_USE_EMAIL', "Email"); + $this->setLangContent($this->lang, $langCont . '_USE_WWW', "Website"); + $this->setLangContent($this->lang, $langCont . '_SHOW_LABEL', "Show"); + $this->setLangContent($this->lang, $langCont . '_SHOW_DESC', "Select where you want this contributor's details to show in the component."); + $this->setLangContent($this->lang, $langCont . '_SHOW_NONE', "Hide"); + $this->setLangContent($this->lang, $langCont . '_SHOW_BACK', "Back-end"); + $this->setLangContent($this->lang, $langCont . '_SHOW_FRONT', "Front-end"); + $this->setLangContent($this->lang, $langCont . '_SHOW_ALL', "Both Front & Back-end"); } // close that fieldset $this->configFieldSets[] = $this->_t(1) . "
"; @@ -14434,31 +14601,31 @@ class Interpretation extends Fields // set tab lang if (1 == $this->uikit) { - $this->langContent[$this->lang][$lang . '_UIKIT_LABEL'] = "Uikit2 Settings"; - $this->langContent[$this->lang][$lang . '_UIKIT_DESC'] = "The Parameters for the uikit are set here.
Uikit is a lightweight and modular front-end framework -for developing fast and powerful web interfaces. For more info visit https://getuikit.com/v2/"; + $this->setLangContent($this->lang, $lang . '_UIKIT_LABEL', "Uikit2 Settings"); + $this->setLangContent($this->lang, $lang . '_UIKIT_DESC', "The Parameters for the uikit are set here.
Uikit is a lightweight and modular front-end framework +for developing fast and powerful web interfaces. For more info visit https://getuikit.com/v2/"); } elseif (2 == $this->uikit) { - $this->langContent[$this->lang][$lang . '_UIKIT_LABEL'] = "Uikit2 and Uikit3 Settings"; - $this->langContent[$this->lang][$lang . '_UIKIT_DESC'] = "The Parameters for the uikit are set here.
Uikit is a lightweight and modular front-end framework -for developing fast and powerful web interfaces. For more info visit version 2 or version 3"; + $this->setLangContent($this->lang, $lang . '_UIKIT_LABEL', "Uikit2 and Uikit3 Settings"); + $this->setLangContent($this->lang, $lang . '_UIKIT_DESC', "The Parameters for the uikit are set here.
Uikit is a lightweight and modular front-end framework +for developing fast and powerful web interfaces. For more info visit version 2 or version 3"); } elseif (3 == $this->uikit) { - $this->langContent[$this->lang][$lang . '_UIKIT_LABEL'] = "Uikit3 Settings"; - $this->langContent[$this->lang][$lang . '_UIKIT_DESC'] = "The Parameters for the uikit are set here.
Uikit is a lightweight and modular front-end framework -for developing fast and powerful web interfaces. For more info visit https://getuikit.com/"; + $this->setLangContent($this->lang, $lang . '_UIKIT_LABEL', "Uikit3 Settings"); + $this->setLangContent($this->lang, $lang . '_UIKIT_DESC', "The Parameters for the uikit are set here.
Uikit is a lightweight and modular front-end framework +for developing fast and powerful web interfaces. For more info visit https://getuikit.com/"); } // add version selection if (2 == $this->uikit) { // set field lang - $this->langContent[$this->lang][$lang . '_UIKIT_VERSION_LABEL'] = "Uikit Versions"; - $this->langContent[$this->lang][$lang . '_UIKIT_VERSION_DESC'] = "Select what version you would like to use"; - $this->langContent[$this->lang][$lang . '_UIKIT_V2'] = "Version 2"; - $this->langContent[$this->lang][$lang . '_UIKIT_V3'] = "Version 3"; + $this->setLangContent($this->lang, $lang . '_UIKIT_VERSION_LABEL', "Uikit Versions"); + $this->setLangContent($this->lang, $lang . '_UIKIT_VERSION_DESC', "Select what version you would like to use"); + $this->setLangContent($this->lang, $lang . '_UIKIT_V2', "Version 2"); + $this->setLangContent($this->lang, $lang . '_UIKIT_V3', "Version 3"); // set the field $this->configFieldSets[] = $this->_t(2) . 'configFieldSets[] = $this->_t(3) . 'type="radio"'; @@ -14477,12 +14644,12 @@ for developing fast and powerful web interfaces. For more info visit langContent[$this->lang][$lang . '_UIKIT_LOAD_LABEL'] = "Loading Options"; - $this->langContent[$this->lang][$lang . '_UIKIT_LOAD_DESC'] = "Set the uikit loading option."; - $this->langContent[$this->lang][$lang . '_AUTO_LOAD'] = "Auto"; - $this->langContent[$this->lang][$lang . '_FORCE_LOAD'] = "Force"; - $this->langContent[$this->lang][$lang . '_DONT_LOAD'] = "Not"; - $this->langContent[$this->lang][$lang . '_ONLY_EXTRA'] = "Only Extra"; + $this->setLangContent($this->lang, $lang . '_UIKIT_LOAD_LABEL', "Loading Options"); + $this->setLangContent($this->lang, $lang . '_UIKIT_LOAD_DESC', "Set the uikit loading option."); + $this->setLangContent($this->lang, $lang . '_AUTO_LOAD', "Auto"); + $this->setLangContent($this->lang, $lang . '_FORCE_LOAD', "Force"); + $this->setLangContent($this->lang, $lang . '_DONT_LOAD', "Not"); + $this->setLangContent($this->lang, $lang . '_ONLY_EXTRA', "Only Extra"); // set the field $this->configFieldSets[] = $this->_t(2) . 'configFieldSets[] = $this->_t(3) . 'type="radio"'; @@ -14507,10 +14674,10 @@ for developing fast and powerful web interfaces. For more info visit extensionsParams[] = '"uikit_load":"1"'; // set field lang - $this->langContent[$this->lang][$lang . '_UIKIT_MIN_LABEL'] = "Load Minified"; - $this->langContent[$this->lang][$lang . '_UIKIT_MIN_DESC'] = "Should the minified version of uikit files be loaded?"; - $this->langContent[$this->lang][$lang . '_YES'] = "Yes"; - $this->langContent[$this->lang][$lang . '_NO'] = "No"; + $this->setLangContent($this->lang, $lang . '_UIKIT_MIN_LABEL', "Load Minified"); + $this->setLangContent($this->lang, $lang . '_UIKIT_MIN_DESC', "Should the minified version of uikit files be loaded?"); + $this->setLangContent($this->lang, $lang . '_YES', "Yes"); + $this->setLangContent($this->lang, $lang . '_NO', "No"); // set the field $this->configFieldSets[] = $this->_t(2) . 'configFieldSets[] = $this->_t(3) . 'type="radio"'; @@ -14530,11 +14697,11 @@ for developing fast and powerful web interfaces. For more info visit uikit || 1 == $this->uikit) { // set field lang - $this->langContent[$this->lang][$lang . '_UIKIT_STYLE_LABEL'] = "css Style"; - $this->langContent[$this->lang][$lang . '_UIKIT_STYLE_DESC'] = "Set the css style that should be used."; - $this->langContent[$this->lang][$lang . '_FLAT_LOAD'] = "Flat"; - $this->langContent[$this->lang][$lang . '_ALMOST_FLAT_LOAD'] = "Almost Flat"; - $this->langContent[$this->lang][$lang . '_GRADIANT_LOAD'] = "Gradient"; + $this->setLangContent($this->lang, $lang . '_UIKIT_STYLE_LABEL', "css Style"); + $this->setLangContent($this->lang, $lang . '_UIKIT_STYLE_DESC', "Set the css style that should be used."); + $this->setLangContent($this->lang, $lang . '_FLAT_LOAD', "Flat"); + $this->setLangContent($this->lang, $lang . '_ALMOST_FLAT_LOAD', "Almost Flat"); + $this->setLangContent($this->lang, $lang . '_GRADIANT_LOAD', "Gradient"); // set the field $this->configFieldSets[] = $this->_t(2) . 'configFieldSets[] = $this->_t(3) . 'type="radio"'; @@ -14575,8 +14742,8 @@ for developing fast and powerful web interfaces. For more info visit langContent[$this->lang][$lang . '_MAIL_CONFIGURATION'] = "Mail Configuration"; - $this->langContent[$this->lang][$lang . '_DKIM'] = "DKIM"; + $this->setLangContent($this->lang, $lang . '_MAIL_CONFIGURATION', "Mail Configuration"); + $this->setLangContent($this->lang, $lang . '_DKIM', "DKIM"); // start building field set for email helper functions $this->configFieldSets[] = PHP_EOL . $this->_t(1) . "configFieldSets[] = $this->_t(2) . "name=\"mail_configuration_custom_config\""; @@ -14590,51 +14757,51 @@ for developing fast and powerful web interfaces. For more info visit langContent[$this->lang][$lang . '_MAILONLINE_LABEL'] = "Mailer Status"; - $this->langContent[$this->lang][$lang . '_MAILONLINE_DESCRIPTION'] = "Warning this will stop all emails from going out."; - $this->langContent[$this->lang][$lang . '_ON'] = "On"; - $this->langContent[$this->lang][$lang . '_OFF'] = "Off"; - $this->langContent[$this->lang][$lang . '_MAILER_LABEL'] = "Mailer"; - $this->langContent[$this->lang][$lang . '_MAILER_DESCRIPTION'] = "Select what mailer you would like to use to send emails."; - $this->langContent[$this->lang][$lang . '_GLOBAL'] = "Global"; - $this->langContent[$this->lang][$lang . '_PHP_MAIL'] = "PHP Mail"; - $this->langContent[$this->lang][$lang . '_SENDMAIL'] = "Sendmail"; - $this->langContent[$this->lang][$lang . '_SMTP'] = "SMTP"; - $this->langContent[$this->lang][$lang . '_EMAILFROM_LABEL'] = " From Email"; - $this->langContent[$this->lang][$lang . '_EMAILFROM_DESCRIPTION'] = "The global email address that will be used to send system email."; - $this->langContent[$this->lang][$lang . '_EMAILFROM_HINT'] = "Email Address Here"; - $this->langContent[$this->lang][$lang . '_FROMNAME_LABEL'] = "From Name"; - $this->langContent[$this->lang][$lang . '_FROMNAME_DESCRIPTION'] = "Text displayed in the header "From:" field when sending a site email. Usually the site name."; - $this->langContent[$this->lang][$lang . '_FROMNAME_HINT'] = "From Name Here"; - $this->langContent[$this->lang][$lang . '_EMAILREPLY_LABEL'] = " Reply to Email"; - $this->langContent[$this->lang][$lang . '_EMAILREPLY_DESCRIPTION'] = "The global email address that will be used to set as the reply email. (leave blank for none)"; - $this->langContent[$this->lang][$lang . '_EMAILREPLY_HINT'] = "Email Address Here"; - $this->langContent[$this->lang][$lang . '_REPLYNAME_LABEL'] = "Reply to Name"; - $this->langContent[$this->lang][$lang . '_REPLYNAME_DESCRIPTION'] = "Text displayed in the header "Reply To:" field when replying to the site email. Usually the the person that receives the response. (leave blank for none)"; - $this->langContent[$this->lang][$lang . '_REPLYNAME_HINT'] = "Reply Name Here"; - $this->langContent[$this->lang][$lang . '_SENDMAIL_LABEL'] = "Sendmail Path"; - $this->langContent[$this->lang][$lang . '_SENDMAIL_DESCRIPTION'] = "Enter the path to the sendmail program directory on your host server."; - $this->langContent[$this->lang][$lang . '_SENDMAIL_HINT'] = "/usr/sbin/sendmail"; - $this->langContent[$this->lang][$lang . '_SMTPAUTH_LABEL'] = "SMTP Authentication"; - $this->langContent[$this->lang][$lang . '_SMTPAUTH_DESCRIPTION'] = "Select yes if your SMTP host requires SMTP Authentication."; - $this->langContent[$this->lang][$lang . '_YES'] = "Yes"; - $this->langContent[$this->lang][$lang . '_NO'] = "No"; - $this->langContent[$this->lang][$lang . '_SMTPSECURE_LABEL'] = "SMTP Security"; - $this->langContent[$this->lang][$lang . '_SMTPSECURE_DESCRIPTION'] = "Select the security model that your SMTP server uses."; - $this->langContent[$this->lang][$lang . '_NONE'] = "None"; - $this->langContent[$this->lang][$lang . '_SSL'] = "SSL"; - $this->langContent[$this->lang][$lang . '_TLS'] = "TLS"; - $this->langContent[$this->lang][$lang . '_SMTPPORT_LABEL'] = "SMTP Port"; - $this->langContent[$this->lang][$lang . '_SMTPPORT_DESCRIPTION'] = "Enter the port number of your SMTP server. Use 25 for most unsecured servers and 465 for most secure servers."; - $this->langContent[$this->lang][$lang . '_SMTPPORT_HINT'] = "25"; - $this->langContent[$this->lang][$lang . '_SMTPUSER_LABEL'] = "SMTP Username"; - $this->langContent[$this->lang][$lang . '_SMTPUSER_DESCRIPTION'] = "Enter the username for access to the SMTP host."; - $this->langContent[$this->lang][$lang . '_SMTPUSER_HINT'] = "email@demo.com"; - $this->langContent[$this->lang][$lang . '_SMTPPASS_LABEL'] = "SMTP Password"; - $this->langContent[$this->lang][$lang . '_SMTPPASS_DESCRIPTION'] = "Enter the password for access to the SMTP host."; - $this->langContent[$this->lang][$lang . '_SMTPHOST_LABEL'] = "SMTP Host"; - $this->langContent[$this->lang][$lang . '_SMTPHOST_DESCRIPTION'] = "Enter the name of the SMTP host."; - $this->langContent[$this->lang][$lang . '_SMTPHOST_HINT'] = "localhost"; + $this->setLangContent($this->lang, $lang . '_MAILONLINE_LABEL', "Mailer Status"); + $this->setLangContent($this->lang, $lang . '_MAILONLINE_DESCRIPTION', "Warning this will stop all emails from going out."); + $this->setLangContent($this->lang, $lang . '_ON', "On"); + $this->setLangContent($this->lang, $lang . '_OFF', "Off"); + $this->setLangContent($this->lang, $lang . '_MAILER_LABEL', "Mailer"); + $this->setLangContent($this->lang, $lang . '_MAILER_DESCRIPTION', "Select what mailer you would like to use to send emails."); + $this->setLangContent($this->lang, $lang . '_GLOBAL', "Global"); + $this->setLangContent($this->lang, $lang . '_PHP_MAIL', "PHP Mail"); + $this->setLangContent($this->lang, $lang . '_SENDMAIL', "Sendmail"); + $this->setLangContent($this->lang, $lang . '_SMTP', "SMTP"); + $this->setLangContent($this->lang, $lang . '_EMAILFROM_LABEL', " From Email"); + $this->setLangContent($this->lang, $lang . '_EMAILFROM_DESCRIPTION', "The global email address that will be used to send system email."); + $this->setLangContent($this->lang, $lang . '_EMAILFROM_HINT', "Email Address Here"); + $this->setLangContent($this->lang, $lang . '_FROMNAME_LABEL', "From Name"); + $this->setLangContent($this->lang, $lang . '_FROMNAME_DESCRIPTION', "Text displayed in the header "From:" field when sending a site email. Usually the site name."); + $this->setLangContent($this->lang, $lang . '_FROMNAME_HINT', "From Name Here"); + $this->setLangContent($this->lang, $lang . '_EMAILREPLY_LABEL', " Reply to Email"); + $this->setLangContent($this->lang, $lang . '_EMAILREPLY_DESCRIPTION', "The global email address that will be used to set as the reply email. (leave blank for none)"); + $this->setLangContent($this->lang, $lang . '_EMAILREPLY_HINT', "Email Address Here"); + $this->setLangContent($this->lang, $lang . '_REPLYNAME_LABEL', "Reply to Name"); + $this->setLangContent($this->lang, $lang . '_REPLYNAME_DESCRIPTION', "Text displayed in the header "Reply To:" field when replying to the site email. Usually the the person that receives the response. (leave blank for none)"); + $this->setLangContent($this->lang, $lang . '_REPLYNAME_HINT', "Reply Name Here"); + $this->setLangContent($this->lang, $lang . '_SENDMAIL_LABEL', "Sendmail Path"); + $this->setLangContent($this->lang, $lang . '_SENDMAIL_DESCRIPTION', "Enter the path to the sendmail program directory on your host server."); + $this->setLangContent($this->lang, $lang . '_SENDMAIL_HINT', "/usr/sbin/sendmail"); + $this->setLangContent($this->lang, $lang . '_SMTPAUTH_LABEL', "SMTP Authentication"); + $this->setLangContent($this->lang, $lang . '_SMTPAUTH_DESCRIPTION', "Select yes if your SMTP host requires SMTP Authentication."); + $this->setLangContent($this->lang, $lang . '_YES', "Yes"); + $this->setLangContent($this->lang, $lang . '_NO', "No"); + $this->setLangContent($this->lang, $lang . '_SMTPSECURE_LABEL', "SMTP Security"); + $this->setLangContent($this->lang, $lang . '_SMTPSECURE_DESCRIPTION', "Select the security model that your SMTP server uses."); + $this->setLangContent($this->lang, $lang . '_NONE', "None"); + $this->setLangContent($this->lang, $lang . '_SSL', "SSL"); + $this->setLangContent($this->lang, $lang . '_TLS', "TLS"); + $this->setLangContent($this->lang, $lang . '_SMTPPORT_LABEL', "SMTP Port"); + $this->setLangContent($this->lang, $lang . '_SMTPPORT_DESCRIPTION', "Enter the port number of your SMTP server. Use 25 for most unsecured servers and 465 for most secure servers."); + $this->setLangContent($this->lang, $lang . '_SMTPPORT_HINT', "25"); + $this->setLangContent($this->lang, $lang . '_SMTPUSER_LABEL', "SMTP Username"); + $this->setLangContent($this->lang, $lang . '_SMTPUSER_DESCRIPTION', "Enter the username for access to the SMTP host."); + $this->setLangContent($this->lang, $lang . '_SMTPUSER_HINT', "email@demo.com"); + $this->setLangContent($this->lang, $lang . '_SMTPPASS_LABEL', "SMTP Password"); + $this->setLangContent($this->lang, $lang . '_SMTPPASS_DESCRIPTION', "Enter the password for access to the SMTP host."); + $this->setLangContent($this->lang, $lang . '_SMTPHOST_LABEL', "SMTP Host"); + $this->setLangContent($this->lang, $lang . '_SMTPHOST_DESCRIPTION', "Enter the name of the SMTP host."); + $this->setLangContent($this->lang, $lang . '_SMTPHOST_HINT', "localhost"); // set the mailer fields $this->configFieldSets[] = PHP_EOL . $this->_t(2) . ""; @@ -14851,27 +15018,27 @@ for developing fast and powerful web interfaces. For more info visit langContent[$this->lang][$lang . '_DKIM_LABEL'] = "Enable DKIM"; - $this->langContent[$this->lang][$lang . '_DKIM_DESCRIPTION'] = "Set this option to Yes if you want to sign your emails using DKIM."; - $this->langContent[$this->lang][$lang . '_YES'] = "Yes"; - $this->langContent[$this->lang][$lang . '_NO'] = "No"; - $this->langContent[$this->lang][$lang . '_DKIM_DOMAIN_LABEL'] = "Domain"; - $this->langContent[$this->lang][$lang . '_DKIM_DOMAIN_DESCRIPTION'] = "Set the domain. Eg. domain.com"; - $this->langContent[$this->lang][$lang . '_DKIM_DOMAIN_HINT'] = "domain.com"; - $this->langContent[$this->lang][$lang . '_DKIM_SELECTOR_LABEL'] = "Selector"; - $this->langContent[$this->lang][$lang . '_DKIM_SELECTOR_DESCRIPTION'] = "Set your DKIM/DNS selector."; - $this->langContent[$this->lang][$lang . '_DKIM_SELECTOR_HINT'] = "vdm"; - $this->langContent[$this->lang][$lang . '_DKIM_PASSPHRASE_LABEL'] = "Passphrase"; - $this->langContent[$this->lang][$lang . '_DKIM_PASSPHRASE_DESCRIPTION'] = "Enter your passphrase here."; - $this->langContent[$this->lang][$lang . '_DKIM_IDENTITY_LABEL'] = "Identity"; - $this->langContent[$this->lang][$lang . '_DKIM_IDENTITY_DESCRIPTION'] = "Set DKIM identity. This can be in the format of an email address 'you@yourdomain.com' typically used as the source of the email."; - $this->langContent[$this->lang][$lang . '_DKIM_IDENTITY_HINT'] = "you@yourdomain.com"; - $this->langContent[$this->lang][$lang . '_DKIM_PRIVATE_KEY_LABEL'] = "Private key"; - $this->langContent[$this->lang][$lang . '_DKIM_PRIVATE_KEY_DESCRIPTION'] = "set private key"; - $this->langContent[$this->lang][$lang . '_DKIM_PUBLIC_KEY_LABEL'] = "Public key"; - $this->langContent[$this->lang][$lang . '_DKIM_PUBLIC_KEY_DESCRIPTION'] = "set public key"; - $this->langContent[$this->lang][$lang . '_NOTE_DKIM_USE_LABEL'] = "Server Configuration"; - $this->langContent[$this->lang][$lang . '_NOTE_DKIM_USE_DESCRIPTION'] = "

Using the below details, you need to configure your DNS by adding a TXT record on your domain:

+ $this->setLangContent($this->lang, $lang . '_DKIM_LABEL', "Enable DKIM"); + $this->setLangContent($this->lang, $lang . '_DKIM_DESCRIPTION', "Set this option to Yes if you want to sign your emails using DKIM."); + $this->setLangContent($this->lang, $lang . '_YES', "Yes"); + $this->setLangContent($this->lang, $lang . '_NO', "No"); + $this->setLangContent($this->lang, $lang . '_DKIM_DOMAIN_LABEL', "Domain"); + $this->setLangContent($this->lang, $lang . '_DKIM_DOMAIN_DESCRIPTION', "Set the domain. Eg. domain.com"); + $this->setLangContent($this->lang, $lang . '_DKIM_DOMAIN_HINT', "domain.com"); + $this->setLangContent($this->lang, $lang . '_DKIM_SELECTOR_LABEL', "Selector"); + $this->setLangContent($this->lang, $lang . '_DKIM_SELECTOR_DESCRIPTION', "Set your DKIM/DNS selector."); + $this->setLangContent($this->lang, $lang . '_DKIM_SELECTOR_HINT', "vdm"); + $this->setLangContent($this->lang, $lang . '_DKIM_PASSPHRASE_LABEL', "Passphrase"); + $this->setLangContent($this->lang, $lang . '_DKIM_PASSPHRASE_DESCRIPTION', "Enter your passphrase here."); + $this->setLangContent($this->lang, $lang . '_DKIM_IDENTITY_LABEL', "Identity"); + $this->setLangContent($this->lang, $lang . '_DKIM_IDENTITY_DESCRIPTION', "Set DKIM identity. This can be in the format of an email address 'you@yourdomain.com' typically used as the source of the email."); + $this->setLangContent($this->lang, $lang . '_DKIM_IDENTITY_HINT', "you@yourdomain.com"); + $this->setLangContent($this->lang, $lang . '_DKIM_PRIVATE_KEY_LABEL', "Private key"); + $this->setLangContent($this->lang, $lang . '_DKIM_PRIVATE_KEY_DESCRIPTION', "set private key"); + $this->setLangContent($this->lang, $lang . '_DKIM_PUBLIC_KEY_LABEL', "Public key"); + $this->setLangContent($this->lang, $lang . '_DKIM_PUBLIC_KEY_DESCRIPTION', "set public key"); + $this->setLangContent($this->lang, $lang . '_NOTE_DKIM_USE_LABEL', "Server Configuration"); + $this->setLangContent($this->lang, $lang . '_NOTE_DKIM_USE_DESCRIPTION', "

Using the below details, you need to configure your DNS by adding a TXT record on your domain:

"; - $this->langContent[$this->lang][$lang . '_DKIM_KEY_LABEL'] = "Key"; - $this->langContent[$this->lang][$lang . '_DKIM_KEY_DESCRIPTION'] = "This is the KEY to use in the DNS record."; - $this->langContent[$this->lang][$lang . '_DKIM_KEY_HINT'] = "vdm._domainkey"; - $this->langContent[$this->lang][$lang . '_DKIM_VALUE_LABEL'] = "Value"; - $this->langContent[$this->lang][$lang . '_DKIM_VALUE_DESCRIPTION'] = "This is the TXT value to use in the DNS. Replace the PUBLICKEY with your public key."; - $this->langContent[$this->lang][$lang . '_DKIM_VALUE_HINT'] = "v=DKIM1;k=rsa;g=*;s=email;h=sha1;t=s;p=PUBLICKEY"; +"); + $this->setLangContent($this->lang, $lang . '_DKIM_KEY_LABEL', "Key"); + $this->setLangContent($this->lang, $lang . '_DKIM_KEY_DESCRIPTION', "This is the KEY to use in the DNS record."); + $this->setLangContent($this->lang, $lang . '_DKIM_KEY_HINT', "vdm._domainkey"); + $this->setLangContent($this->lang, $lang . '_DKIM_VALUE_LABEL', "Value"); + $this->setLangContent($this->lang, $lang . '_DKIM_VALUE_DESCRIPTION', "This is the TXT value to use in the DNS. Replace the PUBLICKEY with your public key."); + $this->setLangContent($this->lang, $lang . '_DKIM_VALUE_HINT', "v=DKIM1;k=rsa;g=*;s=email;h=sha1;t=s;p=PUBLICKEY"); $this->configFieldSets[] = PHP_EOL . $this->_t(2) . ""; @@ -15290,38 +15457,38 @@ function vdm_dkim() { $this->extensionsParams[] = '"admin_chartbackground":"#F7F7FA","admin_mainwidth":"1000","admin_chartareatop":"20","admin_chartarealeft":"20","admin_chartareawidth":"170","admin_legendtextstylefontcolor":"10","admin_legendtextstylefontsize":"20","admin_vaxistextstylefontcolor":"#63B1F2","admin_haxistextstylefontcolor":"#63B1F2","admin_haxistitletextstylefontcolor":"#63B1F2","site_chartbackground":"#F7F7FA","site_mainwidth":"1000","site_chartareatop":"20","site_chartarealeft":"20","site_chartareawidth":"170","site_legendtextstylefontcolor":"10","site_legendtextstylefontsize":"20","site_vaxistextstylefontcolor":"#63B1F2","site_haxistextstylefontcolor":"#63B1F2","site_haxistitletextstylefontcolor":"#63B1F2"'; // set field lang - $this->langContent[$this->lang][$lang . '_CHART_SETTINGS_LABEL'] = "Chart Settings"; - $this->langContent[$this->lang][$lang . '_CHART_SETTINGS_DESC'] = "The Google Chart Display Settings Are Made Here."; - $this->langContent[$this->lang][$lang . '_ADMIN_CHART_NOTE_LABEL'] = "Admin Settings"; - $this->langContent[$this->lang][$lang . '_ADMIN_CHART_NOTE_DESC'] = "The following settings are used on the back-end of the site called (admin)."; - $this->langContent[$this->lang][$lang . '_SITE_CHART_NOTE_LABEL'] = "Site Settings"; - $this->langContent[$this->lang][$lang . '_SITE_CHART_NOTE_DESC'] = "The following settings are used on the front-end of the site called (site)."; + $this->setLangContent($this->lang, $lang . '_CHART_SETTINGS_LABEL', "Chart Settings"); + $this->setLangContent($this->lang, $lang . '_CHART_SETTINGS_DESC', "The Google Chart Display Settings Are Made Here."); + $this->setLangContent($this->lang, $lang . '_ADMIN_CHART_NOTE_LABEL', "Admin Settings"); + $this->setLangContent($this->lang, $lang . '_ADMIN_CHART_NOTE_DESC', "The following settings are used on the back-end of the site called (admin)."); + $this->setLangContent($this->lang, $lang . '_SITE_CHART_NOTE_LABEL', "Site Settings"); + $this->setLangContent($this->lang, $lang . '_SITE_CHART_NOTE_DESC', "The following settings are used on the front-end of the site called (site)."); - $this->langContent[$this->lang][$lang . '_CHARTAREALEFT_DESC'] = "Set in pixels the spacing from the left of the chart area to the beginning of the chart it self. Please don't add the px sign"; - $this->langContent[$this->lang][$lang . '_CHARTAREALEFT_HINT'] = "170"; - $this->langContent[$this->lang][$lang . '_CHARTAREALEFT_LABEL'] = "Left Spacing"; - $this->langContent[$this->lang][$lang . '_CHARTAREATOP_DESC'] = "Set in pixels the spacing from the top of the chart area to the beginning of the chart it self. Please don't add the px sign"; - $this->langContent[$this->lang][$lang . '_CHARTAREATOP_HINT'] = "20"; - $this->langContent[$this->lang][$lang . '_CHARTAREATOP_LABEL'] = "Top Spacing"; - $this->langContent[$this->lang][$lang . '_CHARTAREAWIDTH_DESC'] = "Set in % the width of the chart it self inside the chart area. Please don't add the % sign"; - $this->langContent[$this->lang][$lang . '_CHARTAREAWIDTH_HINT'] = "60"; - $this->langContent[$this->lang][$lang . '_CHARTAREAWIDTH_LABEL'] = "Chart Width"; - $this->langContent[$this->lang][$lang . '_CHARTBACKGROUND_DESC'] = "Select the chart background color here."; - $this->langContent[$this->lang][$lang . '_CHARTBACKGROUND_LABEL'] = "Chart Background"; - $this->langContent[$this->lang][$lang . '_HAXISTEXTSTYLEFONTCOLOR_DESC'] = "Select the horizontal axis font color."; - $this->langContent[$this->lang][$lang . '_HAXISTEXTSTYLEFONTCOLOR_LABEL'] = "hAxis Font Color"; - $this->langContent[$this->lang][$lang . '_HAXISTITLETEXTSTYLEFONTCOLOR_DESC'] = "Select the horizontal axis title's font color."; - $this->langContent[$this->lang][$lang . '_HAXISTITLETEXTSTYLEFONTCOLOR_LABEL'] = "hAxis Title Font Color"; - $this->langContent[$this->lang][$lang . '_LEGENDTEXTSTYLEFONTCOLOR_DESC'] = "Select the legend font color."; - $this->langContent[$this->lang][$lang . '_LEGENDTEXTSTYLEFONTCOLOR_LABEL'] = "Legend Font Color"; - $this->langContent[$this->lang][$lang . '_LEGENDTEXTSTYLEFONTSIZE_DESC'] = "Set in pixels the font size of the legend"; - $this->langContent[$this->lang][$lang . '_LEGENDTEXTSTYLEFONTSIZE_HINT'] = "10"; - $this->langContent[$this->lang][$lang . '_LEGENDTEXTSTYLEFONTSIZE_LABEL'] = "Legend Font Size"; - $this->langContent[$this->lang][$lang . '_MAINWIDTH_DESC'] = "Set the width of the entire chart area"; - $this->langContent[$this->lang][$lang . '_MAINWIDTH_HINT'] = "1000"; - $this->langContent[$this->lang][$lang . '_MAINWIDTH_LABEL'] = "Chart Area Width"; - $this->langContent[$this->lang][$lang . '_VAXISTEXTSTYLEFONTCOLOR_DESC'] = "Select the vertical axis font color."; - $this->langContent[$this->lang][$lang . '_VAXISTEXTSTYLEFONTCOLOR_LABEL'] = "vAxis Font Color"; + $this->setLangContent($this->lang, $lang . '_CHARTAREALEFT_DESC', "Set in pixels the spacing from the left of the chart area to the beginning of the chart it self. Please don't add the px sign"); + $this->setLangContent($this->lang, $lang . '_CHARTAREALEFT_HINT', "170"); + $this->setLangContent($this->lang, $lang . '_CHARTAREALEFT_LABEL', "Left Spacing"); + $this->setLangContent($this->lang, $lang . '_CHARTAREATOP_DESC', "Set in pixels the spacing from the top of the chart area to the beginning of the chart it self. Please don't add the px sign"); + $this->setLangContent($this->lang, $lang . '_CHARTAREATOP_HINT', "20"); + $this->setLangContent($this->lang, $lang . '_CHARTAREATOP_LABEL', "Top Spacing"); + $this->setLangContent($this->lang, $lang . '_CHARTAREAWIDTH_DESC', "Set in % the width of the chart it self inside the chart area. Please don't add the % sign"); + $this->setLangContent($this->lang, $lang . '_CHARTAREAWIDTH_HINT', "60"); + $this->setLangContent($this->lang, $lang . '_CHARTAREAWIDTH_LABEL', "Chart Width"); + $this->setLangContent($this->lang, $lang . '_CHARTBACKGROUND_DESC', "Select the chart background color here."); + $this->setLangContent($this->lang, $lang . '_CHARTBACKGROUND_LABEL', "Chart Background"); + $this->setLangContent($this->lang, $lang . '_HAXISTEXTSTYLEFONTCOLOR_DESC', "Select the horizontal axis font color."); + $this->setLangContent($this->lang, $lang . '_HAXISTEXTSTYLEFONTCOLOR_LABEL', "hAxis Font Color"); + $this->setLangContent($this->lang, $lang . '_HAXISTITLETEXTSTYLEFONTCOLOR_DESC', "Select the horizontal axis title's font color."); + $this->setLangContent($this->lang, $lang . '_HAXISTITLETEXTSTYLEFONTCOLOR_LABEL', "hAxis Title Font Color"); + $this->setLangContent($this->lang, $lang . '_LEGENDTEXTSTYLEFONTCOLOR_DESC', "Select the legend font color."); + $this->setLangContent($this->lang, $lang . '_LEGENDTEXTSTYLEFONTCOLOR_LABEL', "Legend Font Color"); + $this->setLangContent($this->lang, $lang . '_LEGENDTEXTSTYLEFONTSIZE_DESC', "Set in pixels the font size of the legend"); + $this->setLangContent($this->lang, $lang . '_LEGENDTEXTSTYLEFONTSIZE_HINT', "10"); + $this->setLangContent($this->lang, $lang . '_LEGENDTEXTSTYLEFONTSIZE_LABEL', "Legend Font Size"); + $this->setLangContent($this->lang, $lang . '_MAINWIDTH_DESC', "Set the width of the entire chart area"); + $this->setLangContent($this->lang, $lang . '_MAINWIDTH_HINT', "1000"); + $this->setLangContent($this->lang, $lang . '_MAINWIDTH_LABEL', "Chart Area Width"); + $this->setLangContent($this->lang, $lang . '_VAXISTEXTSTYLEFONTCOLOR_DESC', "Select the vertical axis font color."); + $this->setLangContent($this->lang, $lang . '_VAXISTEXTSTYLEFONTCOLOR_LABEL', "vAxis Font Color"); } } @@ -15352,8 +15519,8 @@ function vdm_dkim() { (isset($this->whmcsEncryption) && $this->whmcsEncryption)) && $this->componentData->add_license && $this->componentData->license_type == 3) { - $this->langContent[$this->lang][$lang . '_ENCRYPTION_LABEL'] = "License & Encryption Settings"; - $this->langContent[$this->lang][$lang . '_ENCRYPTION_DESC'] = "The license & encryption keys are set here."; + $this->setLangContent($this->lang, $lang . '_ENCRYPTION_LABEL', "License & Encryption Settings"); + $this->setLangContent($this->lang, $lang . '_ENCRYPTION_DESC', "The license & encryption keys are set here."); // add the next dynamic option $dynamicAddFields[] = "License & Encryption Settings"; } @@ -15362,38 +15529,38 @@ function vdm_dkim() { (isset($this->whmcsEncryption) && $this->whmcsEncryption)) && $this->componentData->add_license && $this->componentData->license_type == 2) { - $this->langContent[$this->lang][$lang . '_ENCRYPTION_LABEL'] = "Update & Encryption Settings"; - $this->langContent[$this->lang][$lang . '_ENCRYPTION_DESC'] = "The update & encryption keys are set here."; + $this->setLangContent($this->lang, $lang . '_ENCRYPTION_LABEL', "Update & Encryption Settings"); + $this->setLangContent($this->lang, $lang . '_ENCRYPTION_DESC', "The update & encryption keys are set here."); // add the next dynamic option $dynamicAddFields[] = "Update & Encryption Settings"; } elseif ($this->componentData->add_license && $this->componentData->license_type == 3) { - $this->langContent[$this->lang][$lang . '_ENCRYPTION_LABEL'] = "License Settings"; - $this->langContent[$this->lang][$lang . '_ENCRYPTION_DESC'] = "The license key is set here."; + $this->setLangContent($this->lang, $lang . '_ENCRYPTION_LABEL', "License Settings"); + $this->setLangContent($this->lang, $lang . '_ENCRYPTION_DESC', "The license key is set here."); // add the next dynamic option $dynamicAddFields[] = "License Settings"; } elseif ($this->componentData->add_license && $this->componentData->license_type == 2) { - $this->langContent[$this->lang][$lang . '_ENCRYPTION_LABEL'] = "Update Settings"; - $this->langContent[$this->lang][$lang . '_ENCRYPTION_DESC'] = "The update key is set here."; + $this->setLangContent($this->lang, $lang . '_ENCRYPTION_LABEL', "Update Settings"); + $this->setLangContent($this->lang, $lang . '_ENCRYPTION_DESC', "The update key is set here."); // add the next dynamic option $dynamicAddFields[] = "Update Settings"; } else { - $this->langContent[$this->lang][$lang . '_ENCRYPTION_LABEL'] = "Encryption Settings"; - $this->langContent[$this->lang][$lang . '_ENCRYPTION_DESC'] = "The encryption key for the field encryption is set here."; + $this->setLangContent($this->lang, $lang . '_ENCRYPTION_LABEL', "Encryption Settings"); + $this->setLangContent($this->lang, $lang . '_ENCRYPTION_DESC', "The encryption key for the field encryption is set here."); } if (isset($this->basicEncryption) && $this->basicEncryption) { // set field lang - $this->langContent[$this->lang][$lang . '_BASIC_KEY_LABEL'] = "Basic Key"; - $this->langContent[$this->lang][$lang . '_BASIC_KEY_DESC'] = "Set the basic local key here."; - $this->langContent[$this->lang][$lang . '_BASIC_KEY_NOTE_LABEL'] = "Basic Encryption"; - $this->langContent[$this->lang][$lang . '_BASIC_KEY_NOTE_DESC'] = "When using the basic encryption please use set a 32 character passphrase.
Never change this passphrase once it is set! DATA WILL GET CORRUPTED IF YOU DO!"; + $this->setLangContent($this->lang, $lang . '_BASIC_KEY_LABEL', "Basic Key"); + $this->setLangContent($this->lang, $lang . '_BASIC_KEY_DESC', "Set the basic local key here."); + $this->setLangContent($this->lang, $lang . '_BASIC_KEY_NOTE_LABEL', "Basic Encryption"); + $this->setLangContent($this->lang, $lang . '_BASIC_KEY_NOTE_DESC', "When using the basic encryption please use set a 32 character passphrase.
Never change this passphrase once it is set! DATA WILL GET CORRUPTED IF YOU DO!"); // set the field $this->configFieldSets[] = $this->_t(2) . ''; $this->configFieldSets[] = $this->_t(2) . 'mediumEncryption) && $this->mediumEncryption) { // set field lang - $this->langContent[$this->lang][$lang . '_MEDIUM_KEY_LABEL'] = "Medium Key (Path)"; - $this->langContent[$this->lang][$lang . '_MEDIUM_KEY_DESC'] = "Set the full path to where the key file must be stored. Make sure it is behind the root folder of your website, so that it is not public accessible."; - $this->langContent[$this->lang][$lang . '_MEDIUM_KEY_NOTE_LABEL'] = "Medium Encryption"; - $this->langContent[$this->lang][$lang . '_MEDIUM_KEY_NOTE_DESC'] = "When using the medium encryption option, the system generates its own key and stores it in a file at the folder/path you set here.
Never change this key once it is set, or remove the key file! DATA WILL GET CORRUPTED IF YOU DO! Also make sure the full path to where the the key file should be stored, is behind the root folder of your website/system, so that it is not public accessible. Making a backup of this key file over a secure connection is recommended!"; + $this->setLangContent($this->lang, $lang . '_MEDIUM_KEY_LABEL', "Medium Key (Path)"); + $this->setLangContent($this->lang, $lang . '_MEDIUM_KEY_DESC', "Set the full path to where the key file must be stored. Make sure it is behind the root folder of your website, so that it is not public accessible."); + $this->setLangContent($this->lang, $lang . '_MEDIUM_KEY_NOTE_LABEL', "Medium Encryption"); + $this->setLangContent($this->lang, $lang . '_MEDIUM_KEY_NOTE_DESC', "When using the medium encryption option, the system generates its own key and stores it in a file at the folder/path you set here.
Never change this key once it is set, or remove the key file! DATA WILL GET CORRUPTED IF YOU DO! Also make sure the full path to where the the key file should be stored, is behind the root folder of your website/system, so that it is not public accessible. Making a backup of this key file over a secure connection is recommended!"); // set the field $this->configFieldSets[] = $this->_t(2) . ''; $this->configFieldSets[] = $this->_t(2) . 'configFieldSets[] = $this->_t(3) . 'default=""'; $this->configFieldSets[] = $this->_t(2) . "/>"; // set some error message if the path does not exist - $this->langContent[$this->lang][$lang . '_MEDIUM_KEY_PATH_ERROR'] = "Medium key path (for encryption of various fields) does not exist, or is not writable. Please check the path and update it in the global option of this component."; + $this->setLangContent($this->lang, $lang . '_MEDIUM_KEY_PATH_ERROR', "Medium key path (for encryption of various fields) does not exist, or is not writable. Please check the path and update it in the global option of this component."); } if (isset($this->whmcsEncryption) && $this->whmcsEncryption || $this->componentData->add_license) { // set field lang label and description if ($this->componentData->add_license && $this->componentData->license_type == 3) { - $this->langContent[$this->lang][$lang . '_WHMCS_KEY_LABEL'] = $this->componentData->companyname . " License Key"; - $this->langContent[$this->lang][$lang . '_WHMCS_KEY_DESC'] = "Add the license key you recieved from " . $this->componentData->companyname . " here."; + $this->setLangContent($this->lang, $lang . '_WHMCS_KEY_LABEL', $this->componentData->companyname . " License Key"); + $this->setLangContent($this->lang, $lang . '_WHMCS_KEY_DESC', "Add the license key you recieved from " . $this->componentData->companyname . " here."); } elseif ($this->componentData->add_license && $this->componentData->license_type == 2) { - $this->langContent[$this->lang][$lang . '_WHMCS_KEY_LABEL'] = $this->componentData->companyname . " Update Key"; - $this->langContent[$this->lang][$lang . '_WHMCS_KEY_DESC'] = "Add the update key you recieved from " . $this->componentData->companyname . " here."; + $this->setLangContent($this->lang, $lang . '_WHMCS_KEY_LABEL', $this->componentData->companyname . " Update Key"); + $this->setLangContent($this->lang, $lang . '_WHMCS_KEY_DESC', "Add the update key you recieved from " . $this->componentData->companyname . " here."); } else { - $this->langContent[$this->lang][$lang . '_WHMCS_KEY_LABEL'] = $this->componentData->companyname . " Key"; - $this->langContent[$this->lang][$lang . '_WHMCS_KEY_DESC'] = "Add the key you recieved from " . $this->componentData->companyname . " here."; + $this->setLangContent($this->lang, $lang . '_WHMCS_KEY_LABEL', $this->componentData->companyname . " Key"); + $this->setLangContent($this->lang, $lang . '_WHMCS_KEY_DESC', "Add the key you recieved from " . $this->componentData->companyname . " here."); } // ajust the notice based on license if ($this->componentData->license_type == 3) { - $this->langContent[$this->lang][$lang . '_WHMCS_KEY_NOTE_LABEL'] = "Your " . $this->componentData->companyname . " License Key"; + $this->setLangContent($this->lang, $lang . '_WHMCS_KEY_NOTE_LABEL', "Your " . $this->componentData->companyname . " License Key"); } elseif ($this->componentData->license_type == 2) { - $this->langContent[$this->lang][$lang . '_WHMCS_KEY_NOTE_LABEL'] = "Your " . $this->componentData->companyname . " Update Key"; + $this->setLangContent($this->lang, $lang . '_WHMCS_KEY_NOTE_LABEL', "Your " . $this->componentData->companyname . " Update Key"); } else { if (isset($this->whmcsEncryption) && $this->whmcsEncryption) { - $this->langContent[$this->lang][$lang . '_WHMCS_KEY_NOTE_LABEL'] = "Your " . $this->componentData->companyname . " Field Encryption Key"; + $this->setLangContent($this->lang, $lang . '_WHMCS_KEY_NOTE_LABEL', "Your " . $this->componentData->companyname . " Field Encryption Key"); } else { - $this->langContent[$this->lang][$lang . '_WHMCS_KEY_NOTE_LABEL'] = "Your " . $this->componentData->companyname . " Key"; + $this->setLangContent($this->lang, $lang . '_WHMCS_KEY_NOTE_LABEL', "Your " . $this->componentData->companyname . " Key"); } } // add the description based on global settings if (isset($this->whmcsEncryption) && $this->whmcsEncryption) { - $this->langContent[$this->lang][$lang . '_WHMCS_KEY_NOTE_DESC'] = "You need to get this key from
" . $this->componentData->companyname . ".
When using the " . $this->componentData->companyname . " field encryption you can never change this key once it is set! DATA WILL GET CORRUPTED IF YOU DO!"; + $this->setLangContent($this->lang, $lang . '_WHMCS_KEY_NOTE_DESC', "You need to get this key from " . $this->componentData->companyname . ".
When using the " . $this->componentData->companyname . " field encryption you can never change this key once it is set! DATA WILL GET CORRUPTED IF YOU DO!"); } else { - $this->langContent[$this->lang][$lang . '_WHMCS_KEY_NOTE_DESC'] = "You need to get this key from " . $this->componentData->companyname . "."; + $this->setLangContent($this->lang, $lang . '_WHMCS_KEY_NOTE_DESC', "You need to get this key from " . $this->componentData->companyname . "."); } // set the fields $this->configFieldSets[] = $this->_t(2) . ''; @@ -15554,27 +15721,27 @@ function vdm_dkim() { { $exportTitle = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Export Data', 'U'); $exportDesc = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Export Data', 'U') . '_DESC'; - $this->langContent['bothadmin'][$exportTitle] = 'Export Data'; - $this->langContent['bothadmin'][$exportDesc] = ' Allows users in this group to export data.'; + $this->setLangContent('bothadmin', $exportTitle, 'Export Data'); + $this->setLangContent('bothadmin', $exportDesc, ' Allows users in this group to export data.'); $this->componentHead[] = $this->_t(2) . ''; $importTitle = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Import Data', 'U'); $importDesc = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Import Data', 'U') . '_DESC'; - $this->langContent['bothadmin'][$importTitle] = 'Import Data'; - $this->langContent['bothadmin'][$importDesc] = ' Allows users in this group to import data.'; + $this->setLangContent('bothadmin', $importTitle, 'Import Data'); + $this->setLangContent('bothadmin', $importDesc, ' Allows users in this group to import data.'); $this->componentHead[] = $this->_t(2) . ''; } // version permission $batchTitle = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Use Batch', 'U'); $batchDesc = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Use Batch', 'U') . '_DESC'; - $this->langContent['bothadmin'][$batchTitle] = 'Use Batch'; - $this->langContent['bothadmin'][$batchDesc] = ' Allows users in this group to use batch copy/update method.'; + $this->setLangContent('bothadmin', $batchTitle, 'Use Batch'); + $this->setLangContent('bothadmin', $batchDesc, ' Allows users in this group to use batch copy/update method.'); $this->componentHead[] = $this->_t(2) . ''; // version permission $importTitle = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Edit Versions', 'U'); $importDesc = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Edit Versions', 'U') . '_DESC'; - $this->langContent['bothadmin'][$importTitle] = 'Edit Version'; - $this->langContent['bothadmin'][$importDesc] = ' Allows users in this group to edit versions.'; + $this->setLangContent('bothadmin', $importTitle, 'Edit Version'); + $this->setLangContent('bothadmin', $importDesc, ' Allows users in this group to edit versions.'); $this->componentHead[] = $this->_t(2) . ''; // set the defaults $this->componentHead[] = $this->_t(2) . ''; @@ -15590,14 +15757,14 @@ function vdm_dkim() { // new custom created by permissions $created_byTitle = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Edit Created By', 'U'); $created_byDesc = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Edit Created By', 'U') . '_DESC'; - $this->langContent['bothadmin'][$created_byTitle] = 'Edit Created By'; - $this->langContent['bothadmin'][$created_byDesc] = ' Allows users in this group to edit created by.'; + $this->setLangContent('bothadmin', $created_byTitle, 'Edit Created By'); + $this->setLangContent('bothadmin', $created_byDesc, ' Allows users in this group to edit created by.'); $this->componentHead[] = $this->_t(2) . ''; // new custom created date permissions $createdTitle = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Edit Created Date', 'U'); $createdDesc = $this->langPrefix . '_' . ComponentbuilderHelper::safeString('Edit Created Date', 'U') . '_DESC'; - $this->langContent['bothadmin'][$createdTitle] = 'Edit Created Date'; - $this->langContent['bothadmin'][$createdDesc] = ' Allows users in this group to edit created date.'; + $this->setLangContent('bothadmin', $createdTitle, 'Edit Created Date'); + $this->setLangContent('bothadmin', $createdDesc, ' Allows users in this group to edit created date.'); $this->componentHead[] = $this->_t(2) . ''; // set the menu controller lookup @@ -15613,8 +15780,8 @@ function vdm_dkim() { $customAdminTitle = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($customAdminName . ' Access', 'U'); $customAdminDesc = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($customAdminName . ' Access', 'U') . '_DESC'; $sortKey = ComponentbuilderHelper::safeString($customAdminName . ' Access'); - $this->langContent['bothadmin'][$customAdminTitle] = $customAdminName . ' Access'; - $this->langContent['bothadmin'][$customAdminDesc] = ' Allows the users in this group to access ' . ComponentbuilderHelper::safeString($customAdminName, 'w') . '.'; + $this->setLangContent('bothadmin', $customAdminTitle, $customAdminName . ' Access'); + $this->setLangContent('bothadmin', $customAdminDesc, ' Allows the users in this group to access ' . ComponentbuilderHelper::safeString($customAdminName, 'w') . '.'); $this->componentGlobal[$sortKey] = $this->_t(2) . ''; // add the custom permissions to use the buttons of this view $this->addCustomButtonPermissions($custom_admin_view['settings'], $customAdminName, $customAdminCode); @@ -15660,8 +15827,8 @@ function vdm_dkim() { $sortKey = ComponentbuilderHelper::safeString($siteName . ' Access Site'); if (isset($site_view['access']) && $site_view['access'] == 1) { - $this->langContent['bothadmin'][$siteTitle] = $siteName . ' (Site) Access'; - $this->langContent['bothadmin'][$siteDesc] = ' Allows the users in this group to access site ' . ComponentbuilderHelper::safeString($siteName, 'w') . '.'; + $this->setLangContent('bothadmin', $siteTitle, $siteName . ' (Site) Access'); + $this->setLangContent('bothadmin', $siteDesc, ' Allows the users in this group to access site ' . ComponentbuilderHelper::safeString($siteName, 'w') . '.'); $this->componentGlobal[$sortKey] = $this->_t(2) . ''; // check if this site view requires access rule to default to public @@ -15824,8 +15991,8 @@ function vdm_dkim() { $customButtonTitle = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($nameView . ' ' . $customButtonName . ' Button Access', 'U'); $customButtonDesc = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($nameView . ' ' . $customButtonName . ' Button Access', 'U') . '_DESC'; $sortButtonKey = ComponentbuilderHelper::safeString($nameView . ' ' . $customButtonName . ' Button Access'); - $this->langContent['bothadmin'][$customButtonTitle] = $nameView . ' ' . $customButtonName . ' Button Access'; - $this->langContent['bothadmin'][$customButtonDesc] = ' Allows the users in this group to access the ' . ComponentbuilderHelper::safeString($customButtonName, 'w') . ' button.'; + $this->setLangContent('bothadmin', $customButtonTitle, $nameView . ' ' . $customButtonName . ' Button Access'); + $this->setLangContent('bothadmin', $customButtonDesc, ' Allows the users in this group to access the ' . ComponentbuilderHelper::safeString($customButtonName, 'w') . ' button.'); $this->componentGlobal[$sortButtonKey] = $this->_t(2) . ''; } } @@ -16112,8 +16279,8 @@ function vdm_dkim() { } } // set to language file - $this->langContent['bothadmin'][$title] = trim($permission['title']); - $this->langContent['bothadmin'][$title . '_DESC'] = trim($permission['description']); + $this->setLangContent('bothadmin', $title, $permission['title']); + $this->setLangContent('bothadmin', $title . '_DESC', $permission['description']); } } } diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index af5d955c4..61e1c5041 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -68,6 +68,9 @@ class Infusion extends Interpretation { if (isset($this->componentData->admin_views) && ComponentbuilderHelper::checkArray($this->componentData->admin_views)) { + // Trigger Event: jcb_ce_onBeforeBuildFilesContent + $this->triggerEvent('jcb_ce_onBeforeBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh)); + // COMPONENT $this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] = $this->placeholders[$this->hhh . 'COMPONENT' . $this->hhh]; @@ -231,6 +234,9 @@ class Infusion extends Interpretation // set the target $this->target = 'admin'; $this->lang = 'admin'; + // reset + $viewName_single = ''; + $viewName_list = ''; // set single view if (isset($view['settings']->name_single)) @@ -269,8 +275,11 @@ class Infusion extends Interpretation $this->setLockLicensePer($viewName_single, $this->target); $this->setLockLicensePer($viewName_list, $this->target); + // Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent + $this->triggerEvent('jcb_ce_onBeforeBuildAdminEditViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh)); + // FIELDSETS <<>> - $this->fileContentDynamic[$viewName_single][$this->hhh . 'FIELDSETS' . $this->hhh] = $this->setFieldSet($view, $this->fileContentStatic[$this->hhh . 'component' . $this->hhh], $viewName_single, $viewName_list); + $this->fileContentDynamic[$viewName_single][$this->hhh . 'FIELDSETS' . $this->hhh] = $this->setFieldSet($view, $this->componentCodeName, $viewName_single, $viewName_list); // ACCESSCONTROL <<>> $this->fileContentDynamic[$viewName_single][$this->hhh . 'ACCESSCONTROL' . $this->hhh] = $this->setFieldSetAccessControl($viewName_single); @@ -367,6 +376,12 @@ class Infusion extends Interpretation $this->fileContentDynamic[$viewName_single][$this->hhh . 'SITE_MENU_XML' . $this->hhh] = $this->setAdminViewMenu($viewName_single, $view); } } + + // TABLAYOUTFIELDSARRAY <<>> add the tab layout fields array to the model + $this->fileContentDynamic[$viewName_single][$this->hhh . 'TABLAYOUTFIELDSARRAY' . $this->hhh] = $this->getTabLayoutFieldsArray($viewName_single); + + // Trigger Event: jcb_ce_onAfterBuildAdminEditViewContent + $this->triggerEvent('jcb_ce_onAfterBuildAdminEditViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh)); } // set the views names if (isset($view['settings']->name_list) && $view['settings']->name_list != 'null') @@ -376,6 +391,9 @@ class Infusion extends Interpretation // ICOMOON <<>> $this->fileContentDynamic[$viewName_list][$this->hhh . 'ICOMOON' . $this->hhh] = $view['icomoon']; + // Trigger Event: jcb_ce_onBeforeBuildAdminListViewContent + $this->triggerEvent('jcb_ce_onBeforeBuildAdminListViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh)); + // set the export/import option if (isset($view['port']) && $view['port'] || 1 == $view['settings']->add_custom_import) { @@ -396,7 +414,7 @@ class Infusion extends Interpretation if (isset($view['checkin']) && $view['checkin'] == 1) { // AUTOCHECKIN <<>> - $this->fileContentDynamic[$viewName_list][$this->hhh . 'AUTOCHECKIN' . $this->hhh] = $this->setAutoCheckin($viewName_single, $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]); + $this->fileContentDynamic[$viewName_list][$this->hhh . 'AUTOCHECKIN' . $this->hhh] = $this->setAutoCheckin($viewName_single, $this->componentCodeName); // CHECKINCALL <<>> $this->fileContentDynamic[$viewName_list][$this->hhh . 'CHECKINCALL' . $this->hhh] = $this->setCheckinCall(); } @@ -505,6 +523,9 @@ class Infusion extends Interpretation { $this->fileContentDynamic[$viewName_list][$this->hhh . 'VIEWS_FOOTER_SCRIPT' . $this->hhh] = ''; } + + // Trigger Event: jcb_ce_onAfterBuildAdminListViewContent + $this->triggerEvent('jcb_ce_onAfterBuildAdminListViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh)); } // set u fields used in batch @@ -527,9 +548,16 @@ class Infusion extends Interpretation // BATCH_ONCLICK_CANCEL_SCRIPT <<>> $this->fileContentDynamic[$viewName_list][$this->hhh . 'BATCH_ONCLICK_CANCEL_SCRIPT' . $this->hhh] = ''; // TODO <-- must still be build + // JCONTROLLERFORM_ALLOWADD <<>> $this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_ALLOWADD' . $this->hhh] = $this->setJcontrollerAllowAdd($viewName_single, $viewName_list); + // JCONTROLLERFORM_BEFORECANCEL <<>> + $this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_BEFORECANCEL' . $this->hhh] = $this->getCustomScriptBuilder('php_before_cancel', $viewName_single, PHP_EOL, null, null, ''); + + // JCONTROLLERFORM_AFTERCANCEL <<>> + $this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_AFTERCANCEL' . $this->hhh] = $this->getCustomScriptBuilder('php_after_cancel', $viewName_single, PHP_EOL, null, null, ''); + // JCONTROLLERFORM_ALLOWEDIT <<>> $this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_ALLOWEDIT' . $this->hhh] = $this->setJcontrollerAllowEdit($viewName_single, $viewName_list); @@ -578,6 +606,9 @@ class Infusion extends Interpretation } // HELPER_EXEL $this->fileContentStatic[$this->hhh . 'HELPER_EXEL' . $this->hhh] = $this->setExelHelperMethods(); + + // Trigger Event: jcb_ce_onAfterBuildAdminViewContent + $this->triggerEvent('jcb_ce_onAfterBuildAdminViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh)); } // setup custom_admin_views and all needed stuff for the site @@ -585,7 +616,6 @@ class Infusion extends Interpretation { $this->target = 'custom_admin'; $this->lang = 'admin'; - // var_dump($this->componentData->custom_admin_views);exit; // start dynamic build foreach ($this->componentData->custom_admin_views as $view) { @@ -598,14 +628,8 @@ class Infusion extends Interpretation $this->fileContentDynamic[$view['settings']->code][$this->hhh . 'sviews' . $this->hhh] = $view['settings']->code; $this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SVIEWS' . $this->hhh] = $view['settings']->CODE; // add to lang array - if (!isset($this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE])) - { - $this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE] = $view['settings']->name; - } - if (!isset($this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC'])) - { - $this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC'] = $view['settings']->description; - } + $this->setLangContent($this->lang, $this->langPrefix . '_' . $view['settings']->CODE, $view['settings']->name); + $this->setLangContent($this->lang, $this->langPrefix . '_' . $view['settings']->CODE . '_DESC', $view['settings']->description); // ICOMOON <<>> $this->fileContentDynamic[$view['settings']->code][$this->hhh . 'ICOMOON' . $this->hhh] = $view['icomoon']; @@ -623,6 +647,9 @@ class Infusion extends Interpretation $this->placeholders[$this->bbb . 'sviews' . $this->ddd] = $view['settings']->code; $this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd] = $view['settings']->CODE; + // Trigger Event: jcb_ce_onBeforeBuildCustomAdminViewContent + $this->triggerEvent('jcb_ce_onBeforeBuildCustomAdminViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh)); + // set license per view if needed $this->setLockLicensePer($view['settings']->code, $this->target); @@ -673,6 +700,9 @@ class Infusion extends Interpretation // setup the templates $this->setCustomViewTemplateBody($view); + + // Trigger Event: jcb_ce_onAfterBuildCustomAdminViewContent + $this->triggerEvent('jcb_ce_onAfterBuildCustomAdminViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh)); } // setup the layouts @@ -713,22 +743,22 @@ class Infusion extends Interpretation if (!ComponentbuilderHelper::checkString($this->dynamicDashboard)) { // DASHBOARDVIEW - $this->fileContentStatic[$this->hhh . 'DASHBOARDVIEW' . $this->hhh] = $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]; + $this->fileContentStatic[$this->hhh . 'DASHBOARDVIEW' . $this->hhh] = $this->componentCodeName; // DASHBOARDICONS - $this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASHBOARDICONS' . $this->hhh] = $this->setDashboardIcons(); + $this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASHBOARDICONS' . $this->hhh] = $this->setDashboardIcons(); // DASHBOARDICONACCESS - $this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASHBOARDICONACCESS' . $this->hhh] = $this->setDashboardIconAccess(); + $this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASHBOARDICONACCESS' . $this->hhh] = $this->setDashboardIconAccess(); // DASH_MODEL_METHODS - $this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASH_MODEL_METHODS' . $this->hhh] = $this->setDashboardModelMethods(); + $this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASH_MODEL_METHODS' . $this->hhh] = $this->setDashboardModelMethods(); // DASH_GET_CUSTOM_DATA - $this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASH_GET_CUSTOM_DATA' . $this->hhh] = $this->setDashboardGetCustomData(); + $this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASH_GET_CUSTOM_DATA' . $this->hhh] = $this->setDashboardGetCustomData(); // DASH_DISPLAY_DATA - $this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASH_DISPLAY_DATA' . $this->hhh] = $this->setDashboardDisplayData(); + $this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASH_DISPLAY_DATA' . $this->hhh] = $this->setDashboardDisplayData(); } else { @@ -814,7 +844,6 @@ class Infusion extends Interpretation if (isset($this->componentData->site_views) && ComponentbuilderHelper::checkArray($this->componentData->site_views)) { $this->target = 'site'; - // var_dump($this->componentData->site_views);exit; // start dynamic build foreach ($this->componentData->site_views as $view) { @@ -839,6 +868,9 @@ class Infusion extends Interpretation $this->placeholders[$this->bbb . 'sviews' . $this->ddd] = $view['settings']->code; $this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd] = $view['settings']->CODE; + // Trigger Event: jcb_ce_onBeforeBuildSiteViewContent + $this->triggerEvent('jcb_ce_onBeforeBuildSiteViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh)); + // set license per view if needed $this->setLockLicensePer($view['settings']->code, $this->target); @@ -891,14 +923,8 @@ class Infusion extends Interpretation $this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_AFTER_GET_ITEMS' . $this->hhh] = $this->getCustomScriptBuilder($this->target . '_php_after_getitems', $view['settings']->code, PHP_EOL, null, true); } // add to lang array - if (!isset($this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE])) - { - $this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE] = $view['settings']->name; - } - if (!isset($this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC'])) - { - $this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC'] = $view['settings']->description; - } + $this->setLangContent('site', $this->langPrefix . '_' . $view['settings']->CODE, $view['settings']->name); + $this->setLangContent('site', $this->langPrefix . '_' . $view['settings']->CODE . '_DESC', $view['settings']->description); // SITE_CUSTOM_METHODS <<>> $this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_CUSTOM_METHODS' . $this->hhh] = $this->setCustomViewCustomItemMethods($view['settings']->main_get, $view['settings']->code); $this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_CUSTOM_METHODS' . $this->hhh] .= $this->setCustomViewCustomMethods($view, $view['settings']->code); @@ -919,6 +945,9 @@ class Infusion extends Interpretation // set the site form if needed $this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_TOP_FORM' . $this->hhh] = $this->setCustomViewForm($view['settings']->code, 1); $this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_BOTTOM_FORM' . $this->hhh] = $this->setCustomViewForm($view['settings']->code, 2); + + // Trigger Event: jcb_ce_onAfterBuildSiteViewContent + $this->triggerEvent('jcb_ce_onAfterBuildSiteViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh)); } // setup the layouts $this->setCustomViewLayouts(); @@ -1002,6 +1031,10 @@ class Infusion extends Interpretation { $this->fileContentStatic[$this->hhh . 'README' . $this->hhh] = $this->componentData->readme; } + + // Trigger Event: jcb_ce_onAfterBuildFilesContent + $this->triggerEvent('jcb_ce_onAfterBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh)); + return true; } return false; @@ -1129,6 +1162,9 @@ class Infusion extends Interpretation // now we insert the values into the files if (ComponentbuilderHelper::checkArray($this->languages)) { + // Trigger Event: jcb_ce_onBeforeBuildAllLangFiles + $this->triggerEvent('jcb_ce_onBeforeBuildAllLangFiles', array(&$this->componentContext, &$this->languages, &$this->langTag)); + // rest xml array $langXML = array(); foreach ($this->languages as $tag => $areas) { @@ -1203,7 +1239,7 @@ class Infusion extends Interpretation $langXML[$p][] = 'language/' . $tag . '/' . $fileName . ''; } } - // load the lang xml + // load the lang xml if (ComponentbuilderHelper::checkArray($langXML)) { $replace = array(); @@ -1216,7 +1252,7 @@ class Infusion extends Interpretation $replace[$this->hhh . 'SITE_LANGUAGES' . $this->hhh] = implode(PHP_EOL . $this->_t(2), $langXML['site']); } // build xml path - $xmlPath = $this->componentPath . '/' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '.xml'; + $xmlPath = $this->componentPath . '/' . $this->componentCodeName . '.xml'; // get the content in xml $componentXML = ComponentbuilderHelper::getFileContents($xmlPath); // update the xml content diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 5db1f8202..67182ca26 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -124,6 +124,84 @@ abstract class ComponentbuilderHelper 'JPATH_THEMES' => JPATH_THEMES ); + /** + * Making class or function name safe + * + * @input string The name you would like to make safe + * + * @returns string on success + **/ + public static function safeClassFunctionName($name) + { + // remove numbers if the first character is a number + if (is_numeric(substr($name, 0, 1))) + { + $name = self::replaceNumbers($name); + } + // remove all spaces and strange characters + return trim(reg_replace("/[^A-Za-z0-9]/", '', $name)); + } + + /** + * The field builder switch + **/ + protected static $fieldNameBuilder = false; + + /** + * Making field names safe + * + * @input string The you would like to make safe + * @input boolean The switch to return an ALL UPPER CASE string + * @input string The string to use in white space + * + * @returns string on success + **/ + public static function safeFieldName($string, $allcap = false, $spacer = '_') + { + // get global value + if (self::$fieldNameBuilder === false) + { + self::$fieldNameBuilder = JComponentHelper::getParams('com_componentbuilder')->get('field_name_builder', 1); + } + // use the new convention + if (2 == self::$fieldNameBuilder) + { + // 0nly continue if we have a string + if (self::checkString($string)) + { + // check that the first character is not a number + if (is_numeric(substr($string, 0, 1))) + { + $string = self::replaceNumbers($string); + } + // remove all other strange characters + $string = trim($string); + $string = preg_replace('/'.$spacer.'+/', ' ', $string); + $string = preg_replace('/\s+/', ' ', $string); + // remove all and keep only characters and numbers + $string = preg_replace("/[^A-Za-z0-9 ]/", '', $string); + // replace white space with underscore (SAFEST OPTION) + $string = preg_replace('/\s+/', $spacer, $string); + // return all caps + if ($allcap) + { + return strtoupper($string); + } + // default is to return lower + return strtolower($string); + } + // not a string + return ''; + } + // return all caps + if ($allcap) + { + return self::safeString($string, 'U'); + } + // use the default (original behaviour/convention) + return self::safeString($string); + } + /* * Get the Array of Existing Validation Rule Names * @@ -1200,13 +1278,13 @@ abstract class ComponentbuilderHelper } else { - $name = self::safeString(self::getBetween($field->xml,'name="','"')); + $name = self::safeFieldName(self::getBetween($field->xml,'name="','"')); } // use field core name only if not found in xml if (!self::checkString($name)) { - $name = self::safeString($field->name);; + $name = self::safeFieldName($field->name); } return array('name' => $name, 'type' => $field->type_name); } @@ -1311,12 +1389,14 @@ abstract class ComponentbuilderHelper // The banners by size 'banner' => array( '728-90' => array( - 'Joomla! Volunteers Portal', - 'Joomla! Community Magazine | Because community matters...' + 'Joomla! Volunteers Portal', + 'Joomla! Community Magazine | Because community matters...', + 'tlwebdesign a JCB sponsor | Because community matters...', + 'VDM a JCB sponsor | Because community matters...' ), '160-600' => array( - 'Joomla! Volunteers Portal', - 'Joomla! Community Magazine | Because community matters...' + 'Joomla! Volunteers Portal', + 'Joomla! Community Magazine | Because community matters...' ) ), // The build-gif by size @@ -5478,38 +5558,42 @@ abstract class ComponentbuilderHelper /** * Get any component's model **/ - public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $component = 'Componentbuilder', $config = array()) + public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = 'Componentbuilder', $config = array()) { // fix the name $name = self::safeString($name); - // full path - $fullPath = $path . '/models'; - // set prefix - $prefix = $component.'Model'; + // full path to models + $fullPathModels = $path . '/models'; // load the model file - JModelLegacy::addIncludePath($fullPath, $prefix); + JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model'); + // make sure the table path is loaded + if (!isset($config['table_path']) || !self::checkString($config['table_path'])) + { + // This is the JCB default path to tables in Joomla 3.x + $config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables'; + } // get instance - $model = JModelLegacy::getInstance($name, $prefix, $config); + $model = JModelLegacy::getInstance($name, $Component . 'Model', $config); // if model not found (strange) if ($model == false) { jimport('joomla.filesystem.file'); // get file path - $filePath = $path.'/'.$name.'.php'; - $fullPath = $fullPath.'/'.$name.'.php'; + $filePath = $path . '/' . $name . '.php'; + $fullPathModel = $fullPathModels . '/' . $name . '.php'; // check if it exists if (JFile::exists($filePath)) { // get the file require_once $filePath; } - elseif (JFile::exists($fullPath)) + elseif (JFile::exists($fullPathModel)) { // get the file - require_once $fullPath; + require_once $fullPathModel; } // build class names - $modelClass = $prefix.$name; + $modelClass = $Component . 'Model' . $name; if (class_exists($modelClass)) { // initialize the model diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 980a285a3..3968e9ea5 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -203,7 +203,7 @@ COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_MESSAGE="Error! Please add name here COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NEW="A New Admin Custom Tabs" COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ORDERING_LABEL="Ordering" COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_PERMISSION="Permissions" -COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_PERMISSION_DESCRIPTION="control " +COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_PERMISSION_DESCRIPTION="control" COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_PERMISSION_LABEL="Permission" COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_POSITION_DESCRIPTION="position of custom tab" COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_POSITION_LABEL="Target" @@ -493,10 +493,12 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL="Add JavaScript COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_NEW_BUTTON="Add New Button" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_NEW_CLOSE_BUTTON="Add New & Close Button" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_NEW_NEW_CLOSE_BUTTON="Add New + New & Close Button" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_CANCEL="Add Php After Cancel" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_CANCEL_LABEL="Add PHP (script - after cancel)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE="Add Php After Delete" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL="Add PHP (script - after delete)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH="Add Php After Publish" -COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL="Add PHP (script - after publish)" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL="Add PHP (script - after state change)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AJAX="Add Php Ajax" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AJAX_LABEL="Add PHP (AJAX)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWADD="Add Php Allowadd" @@ -507,10 +509,12 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY="Add Php Batchcopy" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL="Add PHP (batchCopy Method)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHMOVE="Add Php Batchmove" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHMOVE_LABEL="Add PHP (batchMove Method)" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_CANCEL="Add Php Before Cancel" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_CANCEL_LABEL="Add PHP (script - before cancel)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_DELETE="Add Php Before Delete" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_DELETE_LABEL="Add PHP (script - before delete)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH="Add Php Before Publish" -COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL="Add PHP (script - before publish)" +COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL="Add PHP (script - before state change)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE="Add Php Before Save" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE_LABEL="Add PHP (save Method - before data modeling)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_DOCUMENT="Add Php Document" @@ -545,7 +549,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_LABEL="Alias Builder Type" COM_COMPONENTBUILDER_ADMIN_VIEW_ALLOW_ZERO_DESCRIPTION="null & zero values" COM_COMPONENTBUILDER_ADMIN_VIEW_ALLOW_ZERO_LABEL="Allow" COM_COMPONENTBUILDER_ADMIN_VIEW_ALNUM="ALNUM" -COM_COMPONENTBUILDER_ADMIN_VIEW_ARCHIVE="Archive" +COM_COMPONENTBUILDER_ADMIN_VIEW_ARCHIVE="ARCHIVE" COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_ARMSCIIEIGHT_ARMENIAN_MOST_SUITABLE_COLLATION_ARMSCIIEIGHT_GENERAL_CI="armscii8 - ARMSCII-8 Armenian (most suitable collation = armscii8_general_ci)" COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_BIN_CHARSET_ARMSCIIEIGHT="armscii8_bin (charset = armscii8)" COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_GENERAL_CI_CHARSET_ARMSCIIEIGHT="armscii8_general_ci (charset = armscii8)" @@ -746,9 +750,6 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_GENERIC="Generic" COM_COMPONENTBUILDER_ADMIN_VIEW_GEOSTDEIGHT_BIN_CHARSET_GEOSTDEIGHT="geostd8_bin (charset = geostd8)" COM_COMPONENTBUILDER_ADMIN_VIEW_GEOSTDEIGHT_GENERAL_CI_CHARSET_GEOSTDEIGHT="geostd8_general_ci (charset = geostd8)" COM_COMPONENTBUILDER_ADMIN_VIEW_GEOSTDEIGHT_GEOSTDEIGHT_GEORGIAN_MOST_SUITABLE_COLLATION_GEOSTDEIGHT_GENERAL_CI="geostd8 - GEOSTD8 Georgian (most suitable collation = geostd8_general_ci)" -COM_COMPONENTBUILDER_ADMIN_VIEW_GLOBAL_DEFAULT_MYISAM="Global (default = MyISAM)" -COM_COMPONENTBUILDER_ADMIN_VIEW_GLOBAL_DEFAULT_UTFEIGHT="Global (default = utf8)" -COM_COMPONENTBUILDER_ADMIN_VIEW_GLOBAL_DEFAULT_UTFEIGHT_GENERAL_CI="Global (default = utf8_general_ci)" COM_COMPONENTBUILDER_ADMIN_VIEW_GREEK_BIN_CHARSET_GREEK="greek_bin (charset = greek)" COM_COMPONENTBUILDER_ADMIN_VIEW_GREEK_GENERAL_CI_CHARSET_GREEK="greek_general_ci (charset = greek)" COM_COMPONENTBUILDER_ADMIN_VIEW_GREEK_ISO_EIGHT_THOUSAND_EIGHT_HUNDRED_AND_FIFTY_NINESEVEN_GREEK_MOST_SUITABLE_COLLATION_GREEK_GENERAL_CI="greek - ISO 8859-7 Greek (most suitable collation = greek_general_ci)" @@ -941,7 +942,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL="Fields & Cond COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CUSTOM_TABS_NOTE_DESCRIPTION="You can add more custom tabs to this admin view, these tabs are generally used for static HTML content or Ajax generated fields/content. You can not have an admin view with only custom tabs, they can only be used as an add-on, not a stand alone." COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_LINKED_TO_NOTICE_DESCRIPTION="
Searching the database.
" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_LINKED_TO_NOTICE_LABEL="Linked To" -COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_DESCRIPTION="You can link other views that has relationship with this view. Please watch this tutorial for more info. " +COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_DESCRIPTION="You can link other views that has relationship with this view. Please watch this tutorial for more info." COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_LABEL="Linked Views Options" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_DESCRIPTION="Only if you add permissions here will this view have permissions. Please watch this tutorial for more info." COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_LABEL="Permission Implementation" @@ -950,6 +951,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_LABEL="Tab Setup Options" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTIFICATION="Notification" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTIFICATION_CIRCLE="Notification Circle" COM_COMPONENTBUILDER_ADMIN_VIEW_NOT_REQUIRED="Not Required" +COM_COMPONENTBUILDER_ADMIN_VIEW_OMIT="Omit" COM_COMPONENTBUILDER_ADMIN_VIEW_ONLY_FUNCTION="Only Function" COM_COMPONENTBUILDER_ADMIN_VIEW_ORDERING_LABEL="Ordering" COM_COMPONENTBUILDER_ADMIN_VIEW_PALETTE="Palette" @@ -971,6 +973,9 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_PERMISSION="Permissions" COM_COMPONENTBUILDER_ADMIN_VIEW_PHONE="Phone" COM_COMPONENTBUILDER_ADMIN_VIEW_PHONE_TWO="Phone 2" COM_COMPONENTBUILDER_ADMIN_VIEW_PHP="PHP" +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_CANCEL="Php After Cancel" +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_CANCEL_DESCRIPTION="Add PHP Here that should run in the Cancel Method after cancel. Do not add the php tags." +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_CANCEL_LABEL="PHP Cancel Method after
(string) $key is the name of the primary key of the URL variable." COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE="Php After Delete" COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_DESCRIPTION="Add PHP Here that should run in the delete Method after items were deleted. Do not add the php tags." COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_LABEL="PHP delete Method after
Target (array) $pks is an array of record primary keys." @@ -992,6 +997,9 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_LABEL="PHP batchCopy Method
< COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE="Php Batchmove" COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_DESCRIPTION="Add PHP Here that should run in the batchMove Method. Do not add the php tags." COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_LABEL="PHP batchMove Method
submitted values are in $values, id's are in $pks" +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_CANCEL="Php Before Cancel" +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_CANCEL_DESCRIPTION="Add PHP Here that should run in the Cancel Method before cancel. Do not add the php tags." +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_CANCEL_LABEL="PHP Cancel Method before
(string) $key is the name of the primary key of the URL variable." COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE="Php Before Delete" COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_DESCRIPTION="Add PHP Here that should run in the delete Method before items are deleted. Do not add the php tags." COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_LABEL="PHP delete Method
Target (array) $pks is an array of record primary keys." @@ -1086,7 +1094,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_REDUNDANT="REDUNDANT" COM_COMPONENTBUILDER_ADMIN_VIEW_REMOVE="Remove" COM_COMPONENTBUILDER_ADMIN_VIEW_REPLY="Reply" COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS="Admin View Run Expansion Button Access" -COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_ADMIN_VIEW_SAVE_COPY="Save Copy" COM_COMPONENTBUILDER_ADMIN_VIEW_SAVE_NEW="Save New" COM_COMPONENTBUILDER_ADMIN_VIEW_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Admin View to customise the alias." @@ -1165,7 +1173,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_TISSIX_HUNDRED_AND_TWENTY_TISSIX_HUNDRED_AND_TWE COM_COMPONENTBUILDER_ADMIN_VIEW_TREE="Tree" COM_COMPONENTBUILDER_ADMIN_VIEW_TREE_TWO="Tree 2" COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE="Type" -COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_DESCRIPTION="for list target" +COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_DESCRIPTION="Set the type of view" COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL="Type" COM_COMPONENTBUILDER_ADMIN_VIEW_UCSTWO_BIN_CHARSET_UCSTWO="ucs2_bin (charset = ucs2)" COM_COMPONENTBUILDER_ADMIN_VIEW_UCSTWO_CROATIAN_CI_CHARSET_UCSTWO="ucs2_croatian_ci (charset = ucs2)" @@ -1433,18 +1441,18 @@ COM_COMPONENTBUILDER_COMPANY_NAME="Company Name" COM_COMPONENTBUILDER_COMPANY_S="Company: %s" COM_COMPONENTBUILDER_COMPILER="Compiler" COM_COMPONENTBUILDER_COMPILER_ACCESS="Compiler Access" -COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC=" Allows the users in this group to access compiler." +COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC="Allows the users in this group to access compiler." COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS="Compiler Clear tmp Button Access" -COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clear tmp button." +COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS_DESC="Allows the users in this group to access the clear tmp button." COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST="Compiler Dashboard List" COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Compiler" COM_COMPONENTBUILDER_COMPILER_DESC="The compiler" COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS="Compiler Run Expansion Button Access" -COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_COMPILER_SUBMENU="Compiler Submenu" COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC="Allows the users in this group to submenu of Compiler" COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS="Compiler Translate Button Access" -COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS_DESC=" Allows the users in this group to access the translate button." +COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS_DESC="Allows the users in this group to access the translate button." COM_COMPONENTBUILDER_COMPILE_COMPONENT="Compile Component" COM_COMPONENTBUILDER_COMPONENTS="Components" COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS="Components Admin Views" @@ -2595,7 +2603,7 @@ COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_CONSTANT_PATHS_LABEL="Constant COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_DESCRIPTION="Should file be updated." COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_LABEL="Update" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ORDERING_LABEL="Ordering" -COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_DESCRIPTION="Path in relation to the folder structure in the install package, unzip the compiled zip file to see the structure. " +COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_DESCRIPTION="Path in relation to the folder structure in the install package, unzip the compiled zip file to see the structure." COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_HINT="Target Path Here" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_LABEL="Target Path" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_PATH_MESSAGE="Error! Please add target path." @@ -2759,7 +2767,7 @@ COM_COMPONENTBUILDER_COMPONENT_UPDATES_URL_MESSAGE="Error! Please add url here." COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_DESC="A count of the number of times this Component Updates has been revised." COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_DESCRIPTION="1.0.0" COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_HINT="1.0.0" -COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_LABEL="SQL Update Version" +COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_MESSAGE="Error! Please add some text here." COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE="Version Update" COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE_DESCRIPTION="Add Version Updates Here!" @@ -2770,6 +2778,7 @@ COM_COMPONENTBUILDER_CONFIG_ACTIVE="Active" COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_DESCRIPTION="Would you like to add a prefix to the Joomla menu name of your components" COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_LABEL="Add Menu Prefix" COM_COMPONENTBUILDER_CONFIG_ALMOST_FLAT_LOAD="Almost Flat" +COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC="Alphanumeric" COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION="This User will be used to log the API call." COM_COMPONENTBUILDER_CONFIG_API_LABEL="API User" COM_COMPONENTBUILDER_CONFIG_AUTHOR="Author Info" @@ -2865,6 +2874,8 @@ COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_DESCRIPTION="Here you can set t COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_HINT="/home/user/compiler" COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_LABEL="Compiler Folder Path" COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_MESSAGE="Error! Please add some text here." +COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_DESCRIPTION="Select the plugin you would like to use in JCB's compiler" +COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_LABEL="Activate Compiler Plugins" COM_COMPONENTBUILDER_CONFIG_COMPONENT="Component" COM_COMPONENTBUILDER_CONFIG_COMPONENT_LABEL="Component" COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_DESCRIPTION="Here you can set the path to where all components are backed up to." @@ -2913,10 +2924,10 @@ COM_COMPONENTBUILDER_CONFIG_EDITOR_DESCRIPTION="Select the editor you would like COM_COMPONENTBUILDER_CONFIG_EDITOR_LABEL="Select an editor" COM_COMPONENTBUILDER_CONFIG_EMAILFROM_DESCRIPTION="The global email address that will be used to send system email." COM_COMPONENTBUILDER_CONFIG_EMAILFROM_HINT="Email Address Here" -COM_COMPONENTBUILDER_CONFIG_EMAILFROM_LABEL=" From Email" +COM_COMPONENTBUILDER_CONFIG_EMAILFROM_LABEL="From Email" COM_COMPONENTBUILDER_CONFIG_EMAILREPLY_DESCRIPTION="The global email address that will be used to set as the reply email. (leave blank for none)" COM_COMPONENTBUILDER_CONFIG_EMAILREPLY_HINT="Email Address Here" -COM_COMPONENTBUILDER_CONFIG_EMAILREPLY_LABEL=" Reply to Email" +COM_COMPONENTBUILDER_CONFIG_EMAILREPLY_LABEL="Reply to Email" COM_COMPONENTBUILDER_CONFIG_ENCRYPTION_DESC="The encryption key for the field encryption is set here." COM_COMPONENTBUILDER_CONFIG_ENCRYPTION_LABEL="Encryption Settings" COM_COMPONENTBUILDER_CONFIG_EVERY_DAY="Every Day" @@ -2988,6 +2999,9 @@ COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_DESCRIPTION="Enter website address" COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_HINT="http://www.example.com" COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_LABEL="Website" COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_MESSAGE="Error! Please add website here." +COM_COMPONENTBUILDER_CONFIG_FALSE="False" +COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_DESCRIPTION="The default option only uses alphabetical characters and converts all numbers in field names to the English equivalent like 1 becomes one.
Alphanumeric keeps the numbers unconverted unless it is at the beginning of the field name.
Should you change this it will cause a database updates (during your next compilation) for all fields that has numbers in the name of the field. So it is really not a good idea to change this option every so often, you should rather select what you would like to use and keep it like that.
All VDM/JCB components work on the Default option." +COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_LABEL="Field Name Builder
(in compiler)" COM_COMPONENTBUILDER_CONFIG_FLAT_LOAD="Flat" COM_COMPONENTBUILDER_CONFIG_FOLDER_PATHS="Folder Paths" COM_COMPONENTBUILDER_CONFIG_FORCE_LOAD="Force" @@ -3003,8 +3017,10 @@ COM_COMPONENTBUILDER_CONFIG_GLOBAL_DESC="The Global Parameters" COM_COMPONENTBUILDER_CONFIG_GLOBAL_LABEL="Global" COM_COMPONENTBUILDER_CONFIG_GRADIANT_LOAD="Gradient" COM_COMPONENTBUILDER_CONFIG_INACTIVE="Inactive" +COM_COMPONENTBUILDER_CONFIG_INSTALL_DESCRIPTION="Component locally" +COM_COMPONENTBUILDER_CONFIG_INSTALL_LABEL="Install" COM_COMPONENTBUILDER_CONFIG_JCB_COMMUNITY_PACKAGES="JCB Community Packages" -COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION="Here you can manage what package directories show in the JCB package import area. " +COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION="Here you can manage what package directories show in the JCB package import area." COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_LABEL="Directories" COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL="Language" COM_COMPONENTBUILDER_CONFIG_LOCAL_FOLDER="Local Folder" @@ -3125,6 +3141,7 @@ COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_DESCRIPTION="How long should th COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_LABEL="Update Cycle" COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION="String Manipulation" COM_COMPONENTBUILDER_CONFIG_TLS="TLS" +COM_COMPONENTBUILDER_CONFIG_TRUE="True" COM_COMPONENTBUILDER_CONFIG_UIKIT_DESC="The Parameters for the uikit are set here.
Uikit is a lightweight and modular front-end framework for developing fast and powerful web interfaces. For more info visit https://getuikit.com/v2/" COM_COMPONENTBUILDER_CONFIG_UIKIT_LABEL="Uikit2 Settings" @@ -3145,7 +3162,7 @@ COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s" COM_COMPONENTBUILDER_COULD_NOT_CLEAR_THE_TMP_FOLDER="Could not clear the tmp folder!" COM_COMPONENTBUILDER_CREATE="Create" COM_COMPONENTBUILDER_CREATE_A_SNIPPET="create a snippet" -COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s" +COM_COMPONENTBUILDER_CREATE_NEW_S="Create new %s" COM_COMPONENTBUILDER_CREATE_S_FOR_THIS_S="Create %s for this %s" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW="Custom Admin View" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS="Custom Admin Views" @@ -3366,7 +3383,7 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_FORWARD_CIRCLE="Forward Circle" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_FORWARD_TWO="Forward 2" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_GENERIC="Generic" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_GET_SNIPPETS_BUTTON_ACCESS="Custom Admin View Get Snippets Button Access" -COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_GRID="Grid" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_GRID_TWO="Grid 2" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_HEALTH="Health" @@ -3792,18 +3809,20 @@ COM_COMPONENTBUILDER_CUSTOM_CODE_NOTE_PLACEHOLDERS_EXPLAINED_DESCRIPTION="
Soon as enough data is available we will display all the areas where this code is used.
- - - - - - - - - - - - + + + + + + + + + + + + + + @@ -3822,7 +3841,7 @@ COM_COMPONENTBUILDER_CUSTOM_CODE_PHPJS="PHP/JS" COM_COMPONENTBUILDER_CUSTOM_CODE_PUBLISHING="Publishing" COM_COMPONENTBUILDER_CUSTOM_CODE_REPLACEMENT="Replacement" COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS="Custom Code Run Expansion Button Access" -COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_CUSTOM_CODE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Custom Code to customise the alias." COM_COMPONENTBUILDER_CUSTOM_CODE_STATUS="Status" COM_COMPONENTBUILDER_CUSTOM_CODE_SYSTEM_NAME="System Name" @@ -4011,7 +4030,7 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_FILTER_TYPE_DESCRIPTION="The type of filter you COM_COMPONENTBUILDER_DYNAMIC_GET_FILTER_TYPE_LABEL="Filter Type" COM_COMPONENTBUILDER_DYNAMIC_GET_FUNCTIONVAR="FunctionVar" COM_COMPONENTBUILDER_DYNAMIC_GET_G="g" -COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOM="Getcustom" +COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOM="getCustom" COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOMS="getCustoms" COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOM_DESCRIPTION="Set the Method name for this dynamic get." COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOM_HINT="getMethodName" @@ -4079,10 +4098,10 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_MODIFIED_DATE_LABEL="Modified Date" COM_COMPONENTBUILDER_DYNAMIC_GET_MULTIPLE="Multiple" COM_COMPONENTBUILDER_DYNAMIC_GET_N="n" COM_COMPONENTBUILDER_DYNAMIC_GET_NAME="Name" -COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_DESCRIPTION="The variable name." -COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_HINT="variableName" +COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_DESCRIPTION="Enter Name Here" +COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_HINT="Name Here" COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_LABEL="Name" -COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_MESSAGE="Error! Please add variable name here." +COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_MESSAGE="Error! Please add name here." COM_COMPONENTBUILDER_DYNAMIC_GET_NEW="A New Dynamic Get" COM_COMPONENTBUILDER_DYNAMIC_GET_NN="nn" COM_COMPONENTBUILDER_DYNAMIC_GET_NO="No" @@ -4156,7 +4175,7 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_ROW_TYPE_DESCRIPTION="Single row or Multiple ro COM_COMPONENTBUILDER_DYNAMIC_GET_ROW_TYPE_LABEL="Return Row Type" COM_COMPONENTBUILDER_DYNAMIC_GET_RR="rr" COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS="Dynamic Get Run Expansion Button Access" -COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_DYNAMIC_GET_S="s" COM_COMPONENTBUILDER_DYNAMIC_GET_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Dynamic Get to customise the alias." COM_COMPONENTBUILDER_DYNAMIC_GET_SELECTION_DESCRIPTION="Fields to be selected from table." @@ -4182,7 +4201,7 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_TAGS="Tags" COM_COMPONENTBUILDER_DYNAMIC_GET_THIS="This" COM_COMPONENTBUILDER_DYNAMIC_GET_TT="tt" COM_COMPONENTBUILDER_DYNAMIC_GET_TWEAK="Tweak" -COM_COMPONENTBUILDER_DYNAMIC_GET_TYPE_LABEL="Set Type" +COM_COMPONENTBUILDER_DYNAMIC_GET_TYPE_LABEL="Type" COM_COMPONENTBUILDER_DYNAMIC_GET_U="u" COM_COMPONENTBUILDER_DYNAMIC_GET_USER="User" COM_COMPONENTBUILDER_DYNAMIC_GET_USER_GROUPS="User Groups" @@ -4221,13 +4240,13 @@ COM_COMPONENTBUILDER_EDIT="Edit" COM_COMPONENTBUILDER_EDITCREATE_SITE_VIEW="Edit/Create Site View" COM_COMPONENTBUILDER_EDITING="Editing" COM_COMPONENTBUILDER_EDIT_CREATED_BY="Edit Created By" -COM_COMPONENTBUILDER_EDIT_CREATED_BY_DESC=" Allows users in this group to edit created by." +COM_COMPONENTBUILDER_EDIT_CREATED_BY_DESC="Allows users in this group to edit created by." COM_COMPONENTBUILDER_EDIT_CREATED_DATE="Edit Created Date" -COM_COMPONENTBUILDER_EDIT_CREATED_DATE_DESC=" Allows users in this group to edit created date." +COM_COMPONENTBUILDER_EDIT_CREATED_DATE_DESC="Allows users in this group to edit created date." COM_COMPONENTBUILDER_EDIT_S="Edit %s" COM_COMPONENTBUILDER_EDIT_S_FOR_THIS_S="Edit %s for this %s" COM_COMPONENTBUILDER_EDIT_VERSIONS="Edit Version" -COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC=" Allows users in this group to edit versions." +COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC="Allows users in this group to edit versions." COM_COMPONENTBUILDER_EDIT_VIEW="Edit View" COM_COMPONENTBUILDER_EMAIL="Email" COM_COMPONENTBUILDER_EMAIL_S="Email %s" @@ -4251,7 +4270,7 @@ COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_O COM_COMPONENTBUILDER_EXPORTIMPORT_DATA="Export/Import Data" COM_COMPONENTBUILDER_EXPORT_COMPLETED="Export Completed!" COM_COMPONENTBUILDER_EXPORT_DATA="Export Data" -COM_COMPONENTBUILDER_EXPORT_DATA_DESC=" Allows users in this group to export data." +COM_COMPONENTBUILDER_EXPORT_DATA_DESC="Allows users in this group to export data." COM_COMPONENTBUILDER_EXPORT_FAILED="Export Failed" COM_COMPONENTBUILDER_EXPORT_FAILED_PLEASE_TRY_AGAIN_LATTER="Export failed, please try again latter!" COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES="Export JCB Packages" @@ -4685,7 +4704,7 @@ COM_COMPONENTBUILDER_FIELD_OTHER="Other" COM_COMPONENTBUILDER_FIELD_PERMISSION="Permissions" COM_COMPONENTBUILDER_FIELD_PUBLISHING="Publishing" COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS="Field Run Expansion Button Access" -COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_FIELD_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Field to customise the alias." COM_COMPONENTBUILDER_FIELD_SCRIPTS="Scripts" COM_COMPONENTBUILDER_FIELD_SELECT_AN_OPTION="Select an option" @@ -4733,24 +4752,24 @@ COM_COMPONENTBUILDER_GET_PACKAGE="Get Package" COM_COMPONENTBUILDER_GET_SNIPPET="Get snippet" COM_COMPONENTBUILDER_GET_SNIPPETS="Get Snippets" COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access" -COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC=" Allows the users in this group to access get snippets." +COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC="Allows the users in this group to access get snippets." COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS="Get Snippets Custom Admin Views Button Access" -COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the custom admin views button." +COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS_DESC="Allows the users in this group to access the custom admin views button." COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST="Get Snippets Dashboard List" COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Get Snippets" COM_COMPONENTBUILDER_GET_SNIPPETS_DESC="Get the sinppets" COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS="Get Snippets Layouts Button Access" -COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the layouts button." +COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS_DESC="Allows the users in this group to access the layouts button." COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS="Get Snippets Libraries Button Access" -COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the libraries button." +COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS_DESC="Allows the users in this group to access the libraries button." COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS="Get Snippets Site Views Button Access" -COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the site views button." +COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS_DESC="Allows the users in this group to access the site views button." COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS="Get Snippets Snippets Button Access" -COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the snippets button." +COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the snippets button." COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU="Get Snippets Submenu" COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU_DESC="Allows the users in this group to submenu of Get Snippets" COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS="Get Snippets Templates Button Access" -COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the templates button." +COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC="Allows the users in this group to access the templates button." COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_INSTALL_IT_LOCALLY="Get the snippet from gitHub and install it locally" COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_UPDATE_THE_LOCAL_VERSION="Get the snippet from gitHub and update the local version" COM_COMPONENTBUILDER_GLOBAL="Global" @@ -4860,7 +4879,7 @@ COM_COMPONENTBUILDER_HELP_DOCUMENT_TITLE_MESSAGE="Error! Please add title here." COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE="Type" COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE_DESCRIPTION="Select the help type." COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE_LABEL="Type" -COM_COMPONENTBUILDER_HELP_DOCUMENT_URL="Url" +COM_COMPONENTBUILDER_HELP_DOCUMENT_URL="URL" COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_DESCRIPTION="Enter url" COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_HINT="http://www.example.com" COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_LABEL="URL" @@ -4885,7 +4904,7 @@ COM_COMPONENTBUILDER_ICON="Icon" COM_COMPONENTBUILDER_IEMAILI_BSB="Email: %s" COM_COMPONENTBUILDER_IMPORT_CONTINUE="Continue" COM_COMPONENTBUILDER_IMPORT_DATA="Import Data" -COM_COMPONENTBUILDER_IMPORT_DATA_DESC=" Allows users in this group to import data." +COM_COMPONENTBUILDER_IMPORT_DATA_DESC="Allows users in this group to import data." COM_COMPONENTBUILDER_IMPORT_ERROR="Import error." COM_COMPONENTBUILDER_IMPORT_FAILED="Import Failed" COM_COMPONENTBUILDER_IMPORT_FILE_COLUMNS="File Columns" @@ -4931,7 +4950,7 @@ COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SNIPPETS="Select the file to import COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_TEMPLATES="Select the file to import data to templates." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_VALIDATION_RULES="Select the file to import data to validation_rules." COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_URL="Enter file URL" -COM_COMPONENTBUILDER_IMPORT_SUCCESS="Great! Import successful." +COM_COMPONENTBUILDER_IMPORT_SUCCESS="Import Success!" COM_COMPONENTBUILDER_IMPORT_TABLE_COLUMNS="Table Columns" COM_COMPONENTBUILDER_IMPORT_TITLE="Data Importer" COM_COMPONENTBUILDER_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE="Package to import not found." @@ -5070,7 +5089,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL="Author" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_MESSAGE="Error! Please add author name here." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACK="Back" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS="Joomla Component Backup Button Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the backup button." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS_DESC="Allows the users in this group to access the backup button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM="Bom" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_DESCRIPTION="Select the file that should be used for licensing all files (files found in: administrator/components/com_componentbuilder/compiler)" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_LABEL="Licensing Template" @@ -5084,9 +5103,9 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMP_DESCRIPTION="To build the compon COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMP_LABEL="Build Backend-views Dynamically" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY="Joomla Component Builder - Backup Key" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS="Joomla Component Clear tmp Button Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clear tmp button." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS_DESC="Allows the users in this group to access the clear tmp button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS="Joomla Component Clone Button Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clone button." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC="Allows the users in this group to access the clone button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME="Companyname" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_DESCRIPTION="Enter Company Name Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_HINT="Company Name Here" @@ -5153,10 +5172,10 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC_BUILD_BETA="Dynamic Build (beta)" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC_INTEGRATION="Dynamic Integration" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EDIT="Editing the Joomla Component" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL="Email" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_DESCRIPTION="Enter Email" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_HINT="demo@example.com" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL="Email" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_MESSAGE="Error! Please add email address here." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_DESCRIPTION="Enter Author Email" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_HINT="Author Email Here" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL="Author Email" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_MESSAGE="Error! Please author email address here." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS="Emptycontributors" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS_DESCRIPTION="Set if a list of empty contributor fields should be added." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS_LABEL="Empty Contributor Fields" @@ -5167,7 +5186,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_HINT="http://www.example.c COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_LABEL="Buy Link
(to get key)" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_MESSAGE="Error! Please add link here." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Export JCB Packages Button Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the export jcb packages button." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC="Allows the users in this group to access the export jcb packages button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY="Export Key" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_DESCRIPTION="The key used to lock the data during export." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_HINT="Export Key Here" @@ -5179,7 +5198,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE="Image" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_DESCRIPTION="The component image (product box) for the dashboard and install page, must be 300px X 300px." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL="Component Image" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Import JCB Packages Button Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the import jcb packages button." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC="Allows the users in this group to access the import jcb packages button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT="Javascript" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_DESCRIPTION="Add JavaScript for the entire back-end. Do not add the script tags." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_LABEL="Javascript" @@ -5220,9 +5239,9 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_HINT="codename" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_LABEL="Name in Code" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_MESSAGE="Error! Please add name in code here." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_DESCRIPTION="Enter Name Here" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_HINT="Component Name" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_HINT="Name Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_LABEL="Name" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_MESSAGE="Error! Please add component name here." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_MESSAGE="Error! Please add name here." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NEW="A New Joomla Component" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO="No" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NONE="None" @@ -5236,10 +5255,9 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_DESCRIPTION=" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_LABEL="Dynamic Builder (mySql) Option" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_COMPONENT_FILES_FOLDERS_DESCRIPTION="You can add custom files and folders to the component, simply add the files to the administrator/components/com_componentbuilder/custom folder and then select them here." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_COMPONENT_FILES_FOLDERS_LABEL="Adding Custom Files & Folder" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_CROWDIN_DESCRIPTION=" -
+COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_CROWDIN_DESCRIPTION="

Feature not ready?

-

We are still working on this integration, so it is not fully ready. Hopefully with the next update.

+

We are still working on this integration, so it is not fully ready.

@@ -5262,7 +5280,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_DYNAMIC_DASHBOARD_LABEL="Dynamic Dash COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MOVED_VIEWS_DESCRIPTION="We have moved the views in to their own tabs for your convenience." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MOVED_VIEWS_LABEL="To add views, please open the corresponding tab." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MYSQL_TWEAK_OPTIONS_DESCRIPTION="In each admin view you can add data from a MySQL Table (this is done in the admin view MySQL tab). Here you can limit that data in relation to this component. This feature is useful when an admin view with demo data is used in more then one component, and you would like to exclude some demo data without creating a new admin view." -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MYSQL_TWEAK_OPTIONS_LABEL=" MySql Tweak Options" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_MYSQL_TWEAK_OPTIONS_LABEL="MySql Tweak Options" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ON_ADMIN_VIEWS_DESCRIPTION="Do not add the same view twice it will not work. Please watch this tutorial for more help." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ON_ADMIN_VIEWS_LABEL="Setting Admin Views" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_ON_CONTRIBUTORS_DESCRIPTION="Only add contributors if you would like them listed on the component dashboard." @@ -5378,7 +5396,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PUBLISHING="Publishing" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_README="Readme" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_README_LABEL="README.md" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS="Joomla Component Run Expansion Button Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER="Sales Server" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_DESCRIPTION="Select your sales server for this component" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_LABEL="Sales Server" @@ -5443,7 +5461,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE="Website" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_DESCRIPTION="Enter website address" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_HINT="http://www.example.com" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_LABEL="Website" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_LABEL="Author Website" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_MESSAGE="Error! Please add website here." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK="Whmcs Buy Link" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK_DESCRIPTION="Enter link where your WHMCS License key can be bought." @@ -5463,6 +5481,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_LABEL="URL to your WHMCS install COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_MESSAGE="Error! Please add website here." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES="Yes" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ZIP="ZIP" +COM_COMPONENTBUILDER_JOOMLA_FIELDS="Joomla fields" COM_COMPONENTBUILDER_JUST_GET_ALL_SNIPPETS="Just Get All Snippets" COM_COMPONENTBUILDER_KEEP_HISTORY="Keep History" COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS="- Keep Original Access -" @@ -5518,7 +5537,7 @@ COM_COMPONENTBUILDER_LANGUAGES_N_ITEMS_UNPUBLISHED_1="%s Language unpublished." COM_COMPONENTBUILDER_LANGUAGES_SUBMENU="Languages Submenu" COM_COMPONENTBUILDER_LANGUAGES_SUBMENU_DESC="Allows the users in this group to submenu of language" COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS="Language Build Button Access" -COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS_DESC=" Allows the users in this group to access the build button." +COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS_DESC="Allows the users in this group to access the build button." COM_COMPONENTBUILDER_LANGUAGE_CREATED_BY_DESC="The user that created this Language." COM_COMPONENTBUILDER_LANGUAGE_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_LANGUAGE_CREATED_DATE_DESC="The date this Language was created." @@ -5621,7 +5640,7 @@ COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_STATUS="Status" COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION="Translation" COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_DESCRIPTION="The translation strings." COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_HINT="Translated String Here" -COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_LABEL="Translated String" +COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_LABEL="Translation" COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_MESSAGE="Error! Please add translated string here." COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_VERSION_DESC="A count of the number of times this Language Translation has been revised." COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_VERSION_LABEL="Revision" @@ -5705,7 +5724,7 @@ COM_COMPONENTBUILDER_LAYOUT_DYNAMIC_VALUES_LABEL="Dynamic Values" COM_COMPONENTBUILDER_LAYOUT_EDIT="Editing the Layout" COM_COMPONENTBUILDER_LAYOUT_ERROR_UNIQUE_ALIAS="Another Layout has the same alias." COM_COMPONENTBUILDER_LAYOUT_GET_SNIPPETS_BUTTON_ACCESS="Layout Get Snippets Button Access" -COM_COMPONENTBUILDER_LAYOUT_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." +COM_COMPONENTBUILDER_LAYOUT_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_LAYOUT_ID="Id" COM_COMPONENTBUILDER_LAYOUT_LAYOUT="Layout" COM_COMPONENTBUILDER_LAYOUT_LAYOUT_DESCRIPTION="Add the layout code here." @@ -5747,7 +5766,7 @@ COM_COMPONENTBUILDER_LAYOUT_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_LAYOUT_YES="Yes" COM_COMPONENTBUILDER_LEFT_IN_TAB="Left in Tab" COM_COMPONENTBUILDER_LEFT_OF_TABS="Left of Tabs" -COM_COMPONENTBUILDER_LIBRARIES="Libraries" +COM_COMPONENTBUILDER_LIBRARIES="libraries" COM_COMPONENTBUILDER_LIBRARIES_ACCESS="Libraries Access" COM_COMPONENTBUILDER_LIBRARIES_ACCESS_DESC="Allows the users in this group to access access libraries" COM_COMPONENTBUILDER_LIBRARIES_BATCH_OPTIONS="Batch process the selected Libraries" @@ -5876,7 +5895,7 @@ COM_COMPONENTBUILDER_LIBRARY_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_ COM_COMPONENTBUILDER_LIBRARY_BEHAVIOUR="Behaviour" COM_COMPONENTBUILDER_LIBRARY_BUNDLE="Bundle" COM_COMPONENTBUILDER_LIBRARY_CHAIN="Chain" -COM_COMPONENTBUILDER_LIBRARY_CONFIG="Library Config" +COM_COMPONENTBUILDER_LIBRARY_CONFIG="Config" COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG="Addconfig" COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG_DESCRIPTION="Setup config fields." COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG_LABEL="Config" @@ -5929,7 +5948,7 @@ COM_COMPONENTBUILDER_LIBRARY_EXCLUDE="exclude" COM_COMPONENTBUILDER_LIBRARY_FIELD_OPTIONS_HINT="Options here" COM_COMPONENTBUILDER_LIBRARY_FIELD_OPTIONS_LABEL="Field Options" COM_COMPONENTBUILDER_LIBRARY_FILE="File" -COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS="Library Files, Folders & URLs" +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS="Files, Folders & URLs" COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILES="Addfiles" COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILESFULLPATH="Addfilesfullpath" COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILESFULLPATH_DESCRIPTION="Add files to this component using the full path." @@ -6029,7 +6048,7 @@ COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_CONSTANT_PATHS_LABEL="Const COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTNEW_DESCRIPTION="Should file be updated." COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTNEW_LABEL="Update" COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ORDERING_LABEL="Ordering" -COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_DESCRIPTION="Path in relation to the folder structure in the install package, unzip the compiled zip file to see the structure. " +COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_DESCRIPTION="Path in relation to the folder structure in the install package, unzip the compiled zip file to see the structure." COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_HINT="Target Path Here" COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_LABEL="Target Path" COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_MESSAGE="Error! Please add target path." @@ -6049,7 +6068,7 @@ COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_LIBRARY_FILE_DESCRIPTION="to library" COM_COMPONENTBUILDER_LIBRARY_FILE_LABEL="Target File Linked" COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS="Library Get Snippets Button Access" -COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." +COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_LIBRARY_HOW="How" COM_COMPONENTBUILDER_LIBRARY_HOW_DESCRIPTION="Select how you want to control the behaviour of the library file inclusion." COM_COMPONENTBUILDER_LIBRARY_HOW_LABEL="File Behaviour" @@ -6162,7 +6181,7 @@ COM_COMPONENTBUILDER_NONE_DB="None DB" COM_COMPONENTBUILDER_NONE_SELECTED="None selected" COM_COMPONENTBUILDER_NOTICE_BOARD="Notice Board" COM_COMPONENTBUILDER_NOTRANSLATION="no-translation" -COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!" +COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found, or access denied." COM_COMPONENTBUILDER_NOT_SET="not set" COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!" COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!" @@ -6275,18 +6294,20 @@ COM_COMPONENTBUILDER_PLACEHOLDER_NOTE_PLACEHOLDERS_PLACEDIN_DESCRIPTION="
Soon as enough data is available we will display all the areas where this placeholder is used.
- - - - - - - - - - - - + + + + + + + + + + + + + + @@ -6739,7 +6760,7 @@ COM_COMPONENTBUILDER_SITE_VIEW_FORWARD_CIRCLE="Forward Circle" COM_COMPONENTBUILDER_SITE_VIEW_FORWARD_TWO="Forward 2" COM_COMPONENTBUILDER_SITE_VIEW_GENERIC="Generic" COM_COMPONENTBUILDER_SITE_VIEW_GET_SNIPPETS_BUTTON_ACCESS="Site View Get Snippets Button Access" -COM_COMPONENTBUILDER_SITE_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." +COM_COMPONENTBUILDER_SITE_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_SITE_VIEW_GRID="Grid" COM_COMPONENTBUILDER_SITE_VIEW_GRID_TWO="Grid 2" COM_COMPONENTBUILDER_SITE_VIEW_HEALTH="Health" @@ -7055,7 +7076,7 @@ COM_COMPONENTBUILDER_SNIPPET_DETAILS="Details" COM_COMPONENTBUILDER_SNIPPET_EDIT="Editing the Snippet" COM_COMPONENTBUILDER_SNIPPET_ERROR_UNIQUE_ALIAS="Another Snippet has the same alias." COM_COMPONENTBUILDER_SNIPPET_GET_SNIPPETS_BUTTON_ACCESS="Snippet Get Snippets Button Access" -COM_COMPONENTBUILDER_SNIPPET_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." +COM_COMPONENTBUILDER_SNIPPET_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_SNIPPET_HEADING="Heading" COM_COMPONENTBUILDER_SNIPPET_HEADING_DESCRIPTION="Enter short heading" COM_COMPONENTBUILDER_SNIPPET_HEADING_HINT="Your Heading Here" @@ -7082,12 +7103,12 @@ COM_COMPONENTBUILDER_SNIPPET_PERMISSION="Permissions" COM_COMPONENTBUILDER_SNIPPET_PUBLISHING="Publishing" COM_COMPONENTBUILDER_SNIPPET_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Snippet to customise the alias." COM_COMPONENTBUILDER_SNIPPET_SHARE_SNIPPETS_BUTTON_ACCESS="Snippet Share Snippets Button Access" -COM_COMPONENTBUILDER_SNIPPET_SHARE_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the share snippets button." +COM_COMPONENTBUILDER_SNIPPET_SHARE_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the share snippets button." COM_COMPONENTBUILDER_SNIPPET_SNIPPET="Snippet" COM_COMPONENTBUILDER_SNIPPET_SNIPPET_HINT="// Add the snippets code here" COM_COMPONENTBUILDER_SNIPPET_SNIPPET_LABEL="Snippet" COM_COMPONENTBUILDER_SNIPPET_STATUS="Status" -COM_COMPONENTBUILDER_SNIPPET_TYPE="Snippet Type" +COM_COMPONENTBUILDER_SNIPPET_TYPE="Type" COM_COMPONENTBUILDER_SNIPPET_TYPES="Snippet Types" COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS="Snippet Types Access" COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS_DESC="Allows the users in this group to access access snippet types" @@ -7128,7 +7149,7 @@ COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_BY_DESC="The user that created this Sn COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_BY_LABEL="Created By" COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_DATE_DESC="The date this Snippet Type was created." COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_DATE_LABEL="Created Date" -COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION="Description" +COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION="Snippet Types" COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_DESCRIPTION="Enter some description" COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_HINT="Description Here" COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_LABEL="Description" @@ -7284,7 +7305,7 @@ COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_VALUES_LABEL="Dynamic Values" COM_COMPONENTBUILDER_TEMPLATE_EDIT="Editing the Template" COM_COMPONENTBUILDER_TEMPLATE_ERROR_UNIQUE_ALIAS="Another Template has the same alias." COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS="Template Get Snippets Button Access" -COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." +COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_TEMPLATE_ID="Id" COM_COMPONENTBUILDER_TEMPLATE_LIBRARIES="Libraries" COM_COMPONENTBUILDER_TEMPLATE_LIBRARIES_DESCRIPTION="Select the libraries you want to use here." @@ -7413,7 +7434,7 @@ COM_COMPONENTBUILDER_UP_TO_DATE="Up to date" COM_COMPONENTBUILDER_USAGE="Usage" COM_COMPONENTBUILDER_USED_IN="used in" COM_COMPONENTBUILDER_USE_BATCH="Use Batch" -COM_COMPONENTBUILDER_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method." +COM_COMPONENTBUILDER_USE_BATCH_DESC="Allows users in this group to use batch copy/update method." COM_COMPONENTBUILDER_USE_KEY="Use Key" COM_COMPONENTBUILDER_VALIDATE="Validate" COM_COMPONENTBUILDER_VALIDATES_THAT_THE_VALUE_DOES_NOT_APPEAR_AS_A_USERNAME_ON_THE_SYSTEM_THAT_IS_THAT_IT_IS_A_VALID_NEW_USERNAME_DOES_NOT_SYNTAX_CHECK_IT_AS_A_VALID_NAME="Validates that the value does NOT appear as a username on the system; that is, that it is a valid new username. Does not syntax check it as a valid name." diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini index 3bf832b79..4d342ddc2 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -110,19 +110,19 @@ COM_COMPONENTBUILDER_ADMIN_VIEWS_IMPORT_DESC="Allows the users in this group to COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU="Admin Views Submenu" COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU_DESC="Allows the users in this group to submenu of admin view" COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS="Admin View Run Expansion Button Access" -COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_COMPILER_ACCESS="Compiler Access" -COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC=" Allows the users in this group to access compiler." +COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC="Allows the users in this group to access compiler." COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS="Compiler Clear tmp Button Access" -COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clear tmp button." +COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS_DESC="Allows the users in this group to access the clear tmp button." COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST="Compiler Dashboard List" COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Compiler" COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS="Compiler Run Expansion Button Access" -COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_COMPILER_SUBMENU="Compiler Submenu" COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC="Allows the users in this group to submenu of Compiler" COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS="Compiler Translate Button Access" -COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS_DESC=" Allows the users in this group to access the translate button." +COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS_DESC="Allows the users in this group to access the translate button." COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS="Components Admin Views Access" COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS_DESC="Allows the users in this group to access access components admin views" COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_BATCH_USE="Components Admin Views Batch Use" @@ -351,7 +351,7 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_IMPORT_DESC="Allows the users in this gr COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_SUBMENU="Custom Admin Views Submenu" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_SUBMENU_DESC="Allows the users in this group to submenu of custom admin view" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_GET_SNIPPETS_BUTTON_ACCESS="Custom Admin View Get Snippets Button Access" -COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." +COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS="Custom Codes Access" COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS_DESC="Allows the users in this group to access access custom codes" COM_COMPONENTBUILDER_CUSTOM_CODES_BATCH_USE="Custom Codes Batch Use" @@ -381,7 +381,7 @@ COM_COMPONENTBUILDER_CUSTOM_CODES_IMPORT_DESC="Allows the users in this group to COM_COMPONENTBUILDER_CUSTOM_CODES_SUBMENU="Custom Codes Submenu" COM_COMPONENTBUILDER_CUSTOM_CODES_SUBMENU_DESC="Allows the users in this group to submenu of custom code" COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS="Custom Code Run Expansion Button Access" -COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_DYNAMIC_GETS_ACCESS="Dynamic Gets Access" COM_COMPONENTBUILDER_DYNAMIC_GETS_ACCESS_DESC="Allows the users in this group to access access dynamic gets" COM_COMPONENTBUILDER_DYNAMIC_GETS_BATCH_USE="Dynamic Gets Batch Use" @@ -409,15 +409,15 @@ COM_COMPONENTBUILDER_DYNAMIC_GETS_IMPORT_DESC="Allows the users in this group to COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU="Dynamic Gets Submenu" COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU_DESC="Allows the users in this group to submenu of dynamic get" COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS="Dynamic Get Run Expansion Button Access" -COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_EDIT_CREATED_BY="Edit Created By" -COM_COMPONENTBUILDER_EDIT_CREATED_BY_DESC=" Allows users in this group to edit created by." +COM_COMPONENTBUILDER_EDIT_CREATED_BY_DESC="Allows users in this group to edit created by." COM_COMPONENTBUILDER_EDIT_CREATED_DATE="Edit Created Date" -COM_COMPONENTBUILDER_EDIT_CREATED_DATE_DESC=" Allows users in this group to edit created date." +COM_COMPONENTBUILDER_EDIT_CREATED_DATE_DESC="Allows users in this group to edit created date." COM_COMPONENTBUILDER_EDIT_VERSIONS="Edit Version" -COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC=" Allows users in this group to edit versions." +COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC="Allows users in this group to edit versions." COM_COMPONENTBUILDER_EXPORT_DATA="Export Data" -COM_COMPONENTBUILDER_EXPORT_DATA_DESC=" Allows users in this group to export data." +COM_COMPONENTBUILDER_EXPORT_DATA_DESC="Allows users in this group to export data." COM_COMPONENTBUILDER_FIELDS_ACCESS="Fields Access" COM_COMPONENTBUILDER_FIELDS_ACCESS_DESC="Allows the users in this group to access access fields" COM_COMPONENTBUILDER_FIELDS_BATCH_USE="Fields Batch Use" @@ -469,25 +469,25 @@ COM_COMPONENTBUILDER_FIELDTYPES_IMPORT_DESC="Allows the users in this group to i COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU="Fieldtypes Submenu" COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU_DESC="Allows the users in this group to submenu of fieldtype" COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS="Field Run Expansion Button Access" -COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access" -COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC=" Allows the users in this group to access get snippets." +COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC="Allows the users in this group to access get snippets." COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS="Get Snippets Custom Admin Views Button Access" -COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the custom admin views button." +COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS_DESC="Allows the users in this group to access the custom admin views button." COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST="Get Snippets Dashboard List" COM_COMPONENTBUILDER_GET_SNIPPETS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Get Snippets" COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS="Get Snippets Layouts Button Access" -COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the layouts button." +COM_COMPONENTBUILDER_GET_SNIPPETS_LAYOUTS_BUTTON_ACCESS_DESC="Allows the users in this group to access the layouts button." COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS="Get Snippets Libraries Button Access" -COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the libraries button." +COM_COMPONENTBUILDER_GET_SNIPPETS_LIBRARIES_BUTTON_ACCESS_DESC="Allows the users in this group to access the libraries button." COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS="Get Snippets Site Views Button Access" -COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the site views button." +COM_COMPONENTBUILDER_GET_SNIPPETS_SITE_VIEWS_BUTTON_ACCESS_DESC="Allows the users in this group to access the site views button." COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS="Get Snippets Snippets Button Access" -COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the snippets button." +COM_COMPONENTBUILDER_GET_SNIPPETS_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the snippets button." COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU="Get Snippets Submenu" COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU_DESC="Allows the users in this group to submenu of Get Snippets" COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS="Get Snippets Templates Button Access" -COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the templates button." +COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC="Allows the users in this group to access the templates button." COM_COMPONENTBUILDER_HELP_DOCUMENTS_ACCESS="Help Documents Access" COM_COMPONENTBUILDER_HELP_DOCUMENTS_ACCESS_DESC="Allows the users in this group to access access help documents" COM_COMPONENTBUILDER_HELP_DOCUMENTS_BATCH_USE="Help Documents Batch Use" @@ -513,7 +513,7 @@ COM_COMPONENTBUILDER_HELP_DOCUMENTS_IMPORT_DESC="Allows the users in this group COM_COMPONENTBUILDER_HELP_DOCUMENTS_SUBMENU="Help Documents Submenu" COM_COMPONENTBUILDER_HELP_DOCUMENTS_SUBMENU_DESC="Allows the users in this group to submenu of help document" COM_COMPONENTBUILDER_IMPORT_DATA="Import Data" -COM_COMPONENTBUILDER_IMPORT_DATA_DESC=" Allows users in this group to import data." +COM_COMPONENTBUILDER_IMPORT_DATA_DESC="Allows users in this group to import data." COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS="Joomla Components Access" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS_DESC="Allows the users in this group to access access joomla components" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE="Joomla Components Batch Use" @@ -541,17 +541,17 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_DESC="Allows users in this g COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU="Joomla Components Submenu" COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU_DESC="Allows the users in this group to submenu of joomla component" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS="Joomla Component Backup Button Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the backup button." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS_DESC="Allows the users in this group to access the backup button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS="Joomla Component Clear tmp Button Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clear tmp button." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS_DESC="Allows the users in this group to access the clear tmp button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS="Joomla Component Clone Button Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clone button." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC="Allows the users in this group to access the clone button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Export JCB Packages Button Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the export jcb packages button." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC="Allows the users in this group to access the export jcb packages button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Import JCB Packages Button Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the import jcb packages button." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC="Allows the users in this group to access the import jcb packages button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS="Joomla Component Run Expansion Button Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_LANGUAGES_ACCESS="Languages Access" COM_COMPONENTBUILDER_LANGUAGES_ACCESS_DESC="Allows the users in this group to access access languages" COM_COMPONENTBUILDER_LANGUAGES_BATCH_USE="Languages Batch Use" @@ -575,7 +575,7 @@ COM_COMPONENTBUILDER_LANGUAGES_IMPORT_DESC="Allows the users in this group to im COM_COMPONENTBUILDER_LANGUAGES_SUBMENU="Languages Submenu" COM_COMPONENTBUILDER_LANGUAGES_SUBMENU_DESC="Allows the users in this group to submenu of language" COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS="Language Build Button Access" -COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS_DESC=" Allows the users in this group to access the build button." +COM_COMPONENTBUILDER_LANGUAGE_BUILD_BUTTON_ACCESS_DESC="Allows the users in this group to access the build button." COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS="Language Translations Access" COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_ACCESS_DESC="Allows the users in this group to access access language translations" COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS_BATCH_USE="Language Translations Batch Use" @@ -627,7 +627,7 @@ COM_COMPONENTBUILDER_LAYOUTS_IMPORT_DESC="Allows the users in this group to impo COM_COMPONENTBUILDER_LAYOUTS_SUBMENU="Layouts Submenu" COM_COMPONENTBUILDER_LAYOUTS_SUBMENU_DESC="Allows the users in this group to submenu of layout" COM_COMPONENTBUILDER_LAYOUT_GET_SNIPPETS_BUTTON_ACCESS="Layout Get Snippets Button Access" -COM_COMPONENTBUILDER_LAYOUT_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." +COM_COMPONENTBUILDER_LAYOUT_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_LIBRARIES_ACCESS="Libraries Access" COM_COMPONENTBUILDER_LIBRARIES_ACCESS_DESC="Allows the users in this group to access access libraries" COM_COMPONENTBUILDER_LIBRARIES_BATCH_USE="Libraries Batch Use" @@ -689,7 +689,7 @@ COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION_DESC="Allows user COM_COMPONENTBUILDER_LIBRARIES_SUBMENU="Libraries Submenu" COM_COMPONENTBUILDER_LIBRARIES_SUBMENU_DESC="Allows the users in this group to submenu of library" COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS="Library Get Snippets Button Access" -COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." +COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_MENU="✓ Component Builder" COM_COMPONENTBUILDER_MENU_ADMIN_VIEWS="Admin Views" COM_COMPONENTBUILDER_MENU_COMPILER="Compiler" @@ -787,7 +787,7 @@ COM_COMPONENTBUILDER_SITE_VIEWS_IMPORT_DESC="Allows the users in this group to i COM_COMPONENTBUILDER_SITE_VIEWS_SUBMENU="Site Views Submenu" COM_COMPONENTBUILDER_SITE_VIEWS_SUBMENU_DESC="Allows the users in this group to submenu of site view" COM_COMPONENTBUILDER_SITE_VIEW_GET_SNIPPETS_BUTTON_ACCESS="Site View Get Snippets Button Access" -COM_COMPONENTBUILDER_SITE_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." +COM_COMPONENTBUILDER_SITE_VIEW_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_SNIPPETS_ACCESS="Snippets Access" COM_COMPONENTBUILDER_SNIPPETS_ACCESS_DESC="Allows the users in this group to access access snippets" COM_COMPONENTBUILDER_SNIPPETS_BATCH_USE="Snippets Batch Use" @@ -813,9 +813,9 @@ COM_COMPONENTBUILDER_SNIPPETS_IMPORT_DESC="Allows the users in this group to imp COM_COMPONENTBUILDER_SNIPPETS_SUBMENU="Snippets Submenu" COM_COMPONENTBUILDER_SNIPPETS_SUBMENU_DESC="Allows the users in this group to submenu of snippet" COM_COMPONENTBUILDER_SNIPPET_GET_SNIPPETS_BUTTON_ACCESS="Snippet Get Snippets Button Access" -COM_COMPONENTBUILDER_SNIPPET_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." +COM_COMPONENTBUILDER_SNIPPET_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_SNIPPET_SHARE_SNIPPETS_BUTTON_ACCESS="Snippet Share Snippets Button Access" -COM_COMPONENTBUILDER_SNIPPET_SHARE_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the share snippets button." +COM_COMPONENTBUILDER_SNIPPET_SHARE_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the share snippets button." COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS="Snippet Types Access" COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS_DESC="Allows the users in this group to access access snippet types" COM_COMPONENTBUILDER_SNIPPET_TYPES_BATCH_USE="Snippet Types Batch Use" @@ -859,9 +859,9 @@ COM_COMPONENTBUILDER_TEMPLATES_IMPORT_DESC="Allows the users in this group to im COM_COMPONENTBUILDER_TEMPLATES_SUBMENU="Templates Submenu" COM_COMPONENTBUILDER_TEMPLATES_SUBMENU_DESC="Allows the users in this group to submenu of template" COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS="Template Get Snippets Button Access" -COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the get snippets button." +COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_USE_BATCH="Use Batch" -COM_COMPONENTBUILDER_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method." +COM_COMPONENTBUILDER_USE_BATCH_DESC="Allows users in this group to use batch copy/update method." COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS="Validation Rules Access" COM_COMPONENTBUILDER_VALIDATION_RULES_ACCESS_DESC="Allows the users in this group to access access validation rules" COM_COMPONENTBUILDER_VALIDATION_RULES_BATCH_USE="Validation Rules Batch Use" diff --git a/admin/layouts/admin_custom_tabs/publishing.php b/admin/layouts/admin_custom_tabs/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/admin_custom_tabs/publishing.php +++ b/admin/layouts/admin_custom_tabs/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_custom_tabs/publlshing.php b/admin/layouts/admin_custom_tabs/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/admin_custom_tabs/publlshing.php +++ b/admin/layouts/admin_custom_tabs/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_custom_tabs/tabs_above.php b/admin/layouts/admin_custom_tabs/tabs_above.php index a8b093d83..b2b40c7ec 100644 --- a/admin/layouts/admin_custom_tabs/tabs_above.php +++ b/admin/layouts/admin_custom_tabs/tabs_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'admin_view' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_custom_tabs/tabs_fullwidth.php b/admin/layouts/admin_custom_tabs/tabs_fullwidth.php index c8ac24925..a752552d2 100644 --- a/admin/layouts/admin_custom_tabs/tabs_fullwidth.php +++ b/admin/layouts/admin_custom_tabs/tabs_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'tabs' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_fields/fields_above.php b/admin/layouts/admin_fields/fields_above.php index a8b093d83..b2b40c7ec 100644 --- a/admin/layouts/admin_fields/fields_above.php +++ b/admin/layouts/admin_fields/fields_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'admin_view' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_fields/fields_fullwidth.php b/admin/layouts/admin_fields/fields_fullwidth.php index 78175ea82..a918a2705 100644 --- a/admin/layouts/admin_fields/fields_fullwidth.php +++ b/admin/layouts/admin_fields/fields_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_on_views', 'addfields' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_fields/publishing.php b/admin/layouts/admin_fields/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/admin_fields/publishing.php +++ b/admin/layouts/admin_fields/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_fields/publlshing.php b/admin/layouts/admin_fields/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/admin_fields/publlshing.php +++ b/admin/layouts/admin_fields/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_fields_conditions/conditions_above.php b/admin/layouts/admin_fields_conditions/conditions_above.php index a8b093d83..b2b40c7ec 100644 --- a/admin/layouts/admin_fields_conditions/conditions_above.php +++ b/admin/layouts/admin_fields_conditions/conditions_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'admin_view' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_fields_conditions/conditions_fullwidth.php b/admin/layouts/admin_fields_conditions/conditions_fullwidth.php index 055fa58d4..1b15b3b5a 100644 --- a/admin/layouts/admin_fields_conditions/conditions_fullwidth.php +++ b/admin/layouts/admin_fields_conditions/conditions_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_on_conditions', 'addconditions' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_fields_conditions/publishing.php b/admin/layouts/admin_fields_conditions/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/admin_fields_conditions/publishing.php +++ b/admin/layouts/admin_fields_conditions/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_fields_conditions/publlshing.php b/admin/layouts/admin_fields_conditions/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/admin_fields_conditions/publlshing.php +++ b/admin/layouts/admin_fields_conditions/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_fields_relations/publishing.php b/admin/layouts/admin_fields_relations/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/admin_fields_relations/publishing.php +++ b/admin/layouts/admin_fields_relations/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_fields_relations/publlshing.php b/admin/layouts/admin_fields_relations/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/admin_fields_relations/publlshing.php +++ b/admin/layouts/admin_fields_relations/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_fields_relations/relations_above.php b/admin/layouts/admin_fields_relations/relations_above.php index a8b093d83..b2b40c7ec 100644 --- a/admin/layouts/admin_fields_relations/relations_above.php +++ b/admin/layouts/admin_fields_relations/relations_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'admin_view' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_fields_relations/relations_fullwidth.php b/admin/layouts/admin_fields_relations/relations_fullwidth.php index 8f36f70aa..e9924f9f5 100644 --- a/admin/layouts/admin_fields_relations/relations_fullwidth.php +++ b/admin/layouts/admin_fields_relations/relations_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_on_relations', 'addrelations' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_view/css_fullwidth.php b/admin/layouts/admin_view/css_fullwidth.php index 54bc14a23..f0d6b08f1 100644 --- a/admin/layouts/admin_view/css_fullwidth.php +++ b/admin/layouts/admin_view/css_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_css_view', 'css_view', 'add_css_views', @@ -24,6 +35,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -32,3 +44,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_view/custom_buttons_fullwidth.php b/admin/layouts/admin_view/custom_buttons_fullwidth.php index 991fecdaa..4ad01649d 100644 --- a/admin/layouts/admin_view/custom_buttons_fullwidth.php +++ b/admin/layouts/admin_view/custom_buttons_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'php_controller', 'php_model', 'php_controller_list', @@ -24,6 +35,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -32,3 +44,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_view/custom_buttons_left.php b/admin/layouts/admin_view/custom_buttons_left.php index ca9bfab48..473668b80 100644 --- a/admin/layouts/admin_view/custom_buttons_left.php +++ b/admin/layouts/admin_view/custom_buttons_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_custom_button', 'custom_button' ); @@ -22,9 +33,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/custom_import_fullwidth.php b/admin/layouts/admin_view/custom_import_fullwidth.php index 1145a7385..e85f78a27 100644 --- a/admin/layouts/admin_view/custom_import_fullwidth.php +++ b/admin/layouts/admin_view/custom_import_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_beginner_import', 'note_advanced_import', 'add_custom_import', @@ -30,6 +41,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -38,3 +50,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_view/details_above.php b/admin/layouts/admin_view/details_above.php index d8761d659..0b9969524 100644 --- a/admin/layouts/admin_view/details_above.php +++ b/admin/layouts/admin_view/details_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'system_name' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_view/details_fullwidth.php b/admin/layouts/admin_view/details_fullwidth.php index f72766e64..039e99c5d 100644 --- a/admin/layouts/admin_view/details_fullwidth.php +++ b/admin/layouts/admin_view/details_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_linked_to_notice' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_view/details_left.php b/admin/layouts/admin_view/details_left.php index c9a5837cf..52336d424 100644 --- a/admin/layouts/admin_view/details_left.php +++ b/admin/layouts/admin_view/details_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'name_single', 'name_list', 'type', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/details_right.php b/admin/layouts/admin_view/details_right.php index ea24651db..61beabab2 100644 --- a/admin/layouts/admin_view/details_right.php +++ b/admin/layouts/admin_view/details_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'short_description', 'description', 'add_fadein' @@ -23,9 +34,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/details_under.php b/admin/layouts/admin_view/details_under.php index d4c77dda2..c1b7ce8e9 100644 --- a/admin/layouts/admin_view/details_under.php +++ b/admin/layouts/admin_view/details_under.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'not_required' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_view/fields_fullwidth.php b/admin/layouts/admin_view/fields_fullwidth.php index 2321c09b2..b51b04d26 100644 --- a/admin/layouts/admin_view/fields_fullwidth.php +++ b/admin/layouts/admin_view/fields_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_create_edit_display' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_view/fields_left.php b/admin/layouts/admin_view/fields_left.php index 01d0e36bf..45f312f65 100644 --- a/admin/layouts/admin_view/fields_left.php +++ b/admin/layouts/admin_view/fields_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_create_edit_notice', 'alias_builder_type', 'note_alias_builder_custom', @@ -25,9 +36,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/fields_right.php b/admin/layouts/admin_view/fields_right.php index 318e7a147..f21758690 100644 --- a/admin/layouts/admin_view/fields_right.php +++ b/admin/layouts/admin_view/fields_right.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_create_edit_buttons' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/javascript_fullwidth.php b/admin/layouts/admin_view/javascript_fullwidth.php index 4c55e4a6f..95b40a13a 100644 --- a/admin/layouts/admin_view/javascript_fullwidth.php +++ b/admin/layouts/admin_view/javascript_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_javascript_view_file', 'javascript_view_file', 'add_javascript_view_footer', @@ -28,6 +39,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -36,3 +48,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_view/mysql_fullwidth.php b/admin/layouts/admin_view/mysql_fullwidth.php index 640f82da2..b8ff4a775 100644 --- a/admin/layouts/admin_view/mysql_fullwidth.php +++ b/admin/layouts/admin_view/mysql_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'sql' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_view/mysql_left.php b/admin/layouts/admin_view/mysql_left.php index 26f3e5c48..c4958cca5 100644 --- a/admin/layouts/admin_view/mysql_left.php +++ b/admin/layouts/admin_view/mysql_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'mysql_table_engine', 'mysql_table_charset', 'mysql_table_collate', @@ -27,9 +38,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/php_fullwidth.php b/admin/layouts/admin_view/php_fullwidth.php index 0e66638d4..288767a5c 100644 --- a/admin/layouts/admin_view/php_fullwidth.php +++ b/admin/layouts/admin_view/php_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_php_ajax', 'php_ajaxmethod', 'ajax_input', @@ -38,6 +49,10 @@ $fields = $displayData->get('fields') ?: array( 'php_allowadd', 'add_php_allowedit', 'php_allowedit', + 'add_php_before_cancel', + 'php_before_cancel', + 'add_php_after_cancel', + 'php_after_cancel', 'add_php_batchcopy', 'php_batchcopy', 'add_php_batchmove', @@ -57,6 +72,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -65,3 +81,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/admin_view/publishing.php b/admin/layouts/admin_view/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/admin_view/publishing.php +++ b/admin/layouts/admin_view/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/publlshing.php b/admin/layouts/admin_view/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/admin_view/publlshing.php +++ b/admin/layouts/admin_view/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/settings_fullwidth.php b/admin/layouts/admin_view/settings_fullwidth.php index 53193b6e8..1992187e4 100644 --- a/admin/layouts/admin_view/settings_fullwidth.php +++ b/admin/layouts/admin_view/settings_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_on_permissions', 'addpermissions', 'note_on_tabs', @@ -27,6 +38,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -35,3 +47,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_admin_views/publishing.php b/admin/layouts/component_admin_views/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/component_admin_views/publishing.php +++ b/admin/layouts/component_admin_views/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_admin_views/publlshing.php b/admin/layouts/component_admin_views/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/component_admin_views/publlshing.php +++ b/admin/layouts/component_admin_views/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_admin_views/views_above.php b/admin/layouts/component_admin_views/views_above.php index 386139b66..0da7e528d 100644 --- a/admin/layouts/component_admin_views/views_above.php +++ b/admin/layouts/component_admin_views/views_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'joomla_component' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_admin_views/views_fullwidth.php b/admin/layouts/component_admin_views/views_fullwidth.php index 5d443a5b3..cedd88ba6 100644 --- a/admin/layouts/component_admin_views/views_fullwidth.php +++ b/admin/layouts/component_admin_views/views_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_on_admin_views', 'addadmin_views' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_config/publishing.php b/admin/layouts/component_config/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/component_config/publishing.php +++ b/admin/layouts/component_config/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_config/publlshing.php b/admin/layouts/component_config/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/component_config/publlshing.php +++ b/admin/layouts/component_config/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_config/tweaks_above.php b/admin/layouts/component_config/tweaks_above.php index 386139b66..0da7e528d 100644 --- a/admin/layouts/component_config/tweaks_above.php +++ b/admin/layouts/component_config/tweaks_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'joomla_component' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_config/tweaks_fullwidth.php b/admin/layouts/component_config/tweaks_fullwidth.php index 3fcdda1e5..b74219ebe 100644 --- a/admin/layouts/component_config/tweaks_fullwidth.php +++ b/admin/layouts/component_config/tweaks_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'addconfig' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_custom_admin_menus/publishing.php b/admin/layouts/component_custom_admin_menus/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/component_custom_admin_menus/publishing.php +++ b/admin/layouts/component_custom_admin_menus/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_custom_admin_menus/publlshing.php b/admin/layouts/component_custom_admin_menus/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/component_custom_admin_menus/publlshing.php +++ b/admin/layouts/component_custom_admin_menus/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_custom_admin_menus/tweaks_above.php b/admin/layouts/component_custom_admin_menus/tweaks_above.php index 386139b66..0da7e528d 100644 --- a/admin/layouts/component_custom_admin_menus/tweaks_above.php +++ b/admin/layouts/component_custom_admin_menus/tweaks_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'joomla_component' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_custom_admin_menus/tweaks_fullwidth.php b/admin/layouts/component_custom_admin_menus/tweaks_fullwidth.php index e41be7f7c..ca966437b 100644 --- a/admin/layouts/component_custom_admin_menus/tweaks_fullwidth.php +++ b/admin/layouts/component_custom_admin_menus/tweaks_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'addcustommenus' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_custom_admin_views/publishing.php b/admin/layouts/component_custom_admin_views/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/component_custom_admin_views/publishing.php +++ b/admin/layouts/component_custom_admin_views/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_custom_admin_views/publlshing.php b/admin/layouts/component_custom_admin_views/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/component_custom_admin_views/publlshing.php +++ b/admin/layouts/component_custom_admin_views/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_custom_admin_views/views_above.php b/admin/layouts/component_custom_admin_views/views_above.php index 386139b66..0da7e528d 100644 --- a/admin/layouts/component_custom_admin_views/views_above.php +++ b/admin/layouts/component_custom_admin_views/views_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'joomla_component' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_custom_admin_views/views_fullwidth.php b/admin/layouts/component_custom_admin_views/views_fullwidth.php index 7ddadfb4a..e0542065f 100644 --- a/admin/layouts/component_custom_admin_views/views_fullwidth.php +++ b/admin/layouts/component_custom_admin_views/views_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_on_custom_admin_views', 'addcustom_admin_views' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_dashboard/dashboard_above.php b/admin/layouts/component_dashboard/dashboard_above.php index 386139b66..0da7e528d 100644 --- a/admin/layouts/component_dashboard/dashboard_above.php +++ b/admin/layouts/component_dashboard/dashboard_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'joomla_component' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_dashboard/dashboard_fullwidth.php b/admin/layouts/component_dashboard/dashboard_fullwidth.php index 01362056f..075cab4d6 100644 --- a/admin/layouts/component_dashboard/dashboard_fullwidth.php +++ b/admin/layouts/component_dashboard/dashboard_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'php_dashboard_methods', 'dashboard_tab' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_dashboard/publishing.php b/admin/layouts/component_dashboard/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/component_dashboard/publishing.php +++ b/admin/layouts/component_dashboard/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_dashboard/publlshing.php b/admin/layouts/component_dashboard/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/component_dashboard/publlshing.php +++ b/admin/layouts/component_dashboard/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_files_folders/advance_fullwidth.php b/admin/layouts/component_files_folders/advance_fullwidth.php index a6c96f370..b5112d859 100644 --- a/admin/layouts/component_files_folders/advance_fullwidth.php +++ b/admin/layouts/component_files_folders/advance_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_add_files_fullpath', 'addfilesfullpath', 'note_add_folders_fullpath', @@ -25,6 +36,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -33,3 +45,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_files_folders/basic_above.php b/admin/layouts/component_files_folders/basic_above.php index 386139b66..0da7e528d 100644 --- a/admin/layouts/component_files_folders/basic_above.php +++ b/admin/layouts/component_files_folders/basic_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'joomla_component' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_files_folders/basic_fullwidth.php b/admin/layouts/component_files_folders/basic_fullwidth.php index eb0acf684..c027419f9 100644 --- a/admin/layouts/component_files_folders/basic_fullwidth.php +++ b/admin/layouts/component_files_folders/basic_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_add_files', 'addfiles', 'note_add_folders', @@ -24,6 +35,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -32,3 +44,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_files_folders/publishing.php b/admin/layouts/component_files_folders/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/component_files_folders/publishing.php +++ b/admin/layouts/component_files_folders/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_files_folders/publlshing.php b/admin/layouts/component_files_folders/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/component_files_folders/publlshing.php +++ b/admin/layouts/component_files_folders/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_mysql_tweaks/publishing.php b/admin/layouts/component_mysql_tweaks/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/component_mysql_tweaks/publishing.php +++ b/admin/layouts/component_mysql_tweaks/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_mysql_tweaks/publlshing.php b/admin/layouts/component_mysql_tweaks/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/component_mysql_tweaks/publlshing.php +++ b/admin/layouts/component_mysql_tweaks/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_mysql_tweaks/tweaks_above.php b/admin/layouts/component_mysql_tweaks/tweaks_above.php index 386139b66..0da7e528d 100644 --- a/admin/layouts/component_mysql_tweaks/tweaks_above.php +++ b/admin/layouts/component_mysql_tweaks/tweaks_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'joomla_component' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_mysql_tweaks/tweaks_fullwidth.php b/admin/layouts/component_mysql_tweaks/tweaks_fullwidth.php index 8660eb189..696368c1c 100644 --- a/admin/layouts/component_mysql_tweaks/tweaks_fullwidth.php +++ b/admin/layouts/component_mysql_tweaks/tweaks_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'sql_tweak' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_placeholders/details_above.php b/admin/layouts/component_placeholders/details_above.php index 386139b66..0da7e528d 100644 --- a/admin/layouts/component_placeholders/details_above.php +++ b/admin/layouts/component_placeholders/details_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'joomla_component' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_placeholders/details_fullwidth.php b/admin/layouts/component_placeholders/details_fullwidth.php index f23de1666..57405bc2f 100644 --- a/admin/layouts/component_placeholders/details_fullwidth.php +++ b/admin/layouts/component_placeholders/details_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'addplaceholders' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_placeholders/publishing.php b/admin/layouts/component_placeholders/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/component_placeholders/publishing.php +++ b/admin/layouts/component_placeholders/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_placeholders/publlshing.php b/admin/layouts/component_placeholders/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/component_placeholders/publlshing.php +++ b/admin/layouts/component_placeholders/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_site_views/publishing.php b/admin/layouts/component_site_views/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/component_site_views/publishing.php +++ b/admin/layouts/component_site_views/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_site_views/publlshing.php b/admin/layouts/component_site_views/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/component_site_views/publlshing.php +++ b/admin/layouts/component_site_views/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_site_views/views_above.php b/admin/layouts/component_site_views/views_above.php index 386139b66..0da7e528d 100644 --- a/admin/layouts/component_site_views/views_above.php +++ b/admin/layouts/component_site_views/views_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'joomla_component' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_site_views/views_fullwidth.php b/admin/layouts/component_site_views/views_fullwidth.php index 465f08534..e01f97e8e 100644 --- a/admin/layouts/component_site_views/views_fullwidth.php +++ b/admin/layouts/component_site_views/views_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_on_site_views', 'addsite_views' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_updates/publishing.php b/admin/layouts/component_updates/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/component_updates/publishing.php +++ b/admin/layouts/component_updates/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_updates/publlshing.php b/admin/layouts/component_updates/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/component_updates/publlshing.php +++ b/admin/layouts/component_updates/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_updates/updates_above.php b/admin/layouts/component_updates/updates_above.php index 386139b66..0da7e528d 100644 --- a/admin/layouts/component_updates/updates_above.php +++ b/admin/layouts/component_updates/updates_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'joomla_component' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/component_updates/updates_fullwidth.php b/admin/layouts/component_updates/updates_fullwidth.php index 9e225baad..37710d615 100644 --- a/admin/layouts/component_updates/updates_fullwidth.php +++ b/admin/layouts/component_updates/updates_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'version_update' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php b/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php index 5b66cc781..da2e095b1 100644 --- a/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php +++ b/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'php_controller', 'php_model' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/custom_admin_view/custom_buttons_left.php b/admin/layouts/custom_admin_view/custom_buttons_left.php index ca9bfab48..473668b80 100644 --- a/admin/layouts/custom_admin_view/custom_buttons_left.php +++ b/admin/layouts/custom_admin_view/custom_buttons_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_custom_button', 'custom_button' ); @@ -22,9 +33,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_admin_view/details_above.php b/admin/layouts/custom_admin_view/details_above.php index 564ef15e9..e36b108b9 100644 --- a/admin/layouts/custom_admin_view/details_above.php +++ b/admin/layouts/custom_admin_view/details_above.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'system_name', 'context' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/custom_admin_view/details_fullwidth.php b/admin/layouts/custom_admin_view/details_fullwidth.php index 7e5054615..6d03f6c71 100644 --- a/admin/layouts/custom_admin_view/details_fullwidth.php +++ b/admin/layouts/custom_admin_view/details_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'default' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/custom_admin_view/details_left.php b/admin/layouts/custom_admin_view/details_left.php index 686776af3..3c95591f7 100644 --- a/admin/layouts/custom_admin_view/details_left.php +++ b/admin/layouts/custom_admin_view/details_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'name', 'codename', 'description', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_admin_view/details_right.php b/admin/layouts/custom_admin_view/details_right.php index 85377a1f1..1feadf4ee 100644 --- a/admin/layouts/custom_admin_view/details_right.php +++ b/admin/layouts/custom_admin_view/details_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'icon', 'snippet', 'note_uikit_snippet', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_admin_view/details_rightside.php b/admin/layouts/custom_admin_view/details_rightside.php index dddfb3d0f..76933ba52 100644 --- a/admin/layouts/custom_admin_view/details_rightside.php +++ b/admin/layouts/custom_admin_view/details_rightside.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'custom_get', 'main_get', 'dynamic_get', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_admin_view/details_under.php b/admin/layouts/custom_admin_view/details_under.php index d4c77dda2..c1b7ce8e9 100644 --- a/admin/layouts/custom_admin_view/details_under.php +++ b/admin/layouts/custom_admin_view/details_under.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'not_required' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/custom_admin_view/javascript_css_fullwidth.php b/admin/layouts/custom_admin_view/javascript_css_fullwidth.php index 8b87f9de2..85d3704e6 100644 --- a/admin/layouts/custom_admin_view/javascript_css_fullwidth.php +++ b/admin/layouts/custom_admin_view/javascript_css_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_js_document', 'js_document', 'add_javascript_file', @@ -28,6 +39,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -36,3 +48,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/custom_admin_view/linked_components_fullwidth.php b/admin/layouts/custom_admin_view/linked_components_fullwidth.php index f72766e64..039e99c5d 100644 --- a/admin/layouts/custom_admin_view/linked_components_fullwidth.php +++ b/admin/layouts/custom_admin_view/linked_components_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_linked_to_notice' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/custom_admin_view/php_fullwidth.php b/admin/layouts/custom_admin_view/php_fullwidth.php index cf7142f5a..38eca1009 100644 --- a/admin/layouts/custom_admin_view/php_fullwidth.php +++ b/admin/layouts/custom_admin_view/php_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_php_ajax', 'php_ajaxmethod', 'ajax_input', @@ -31,6 +42,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -39,3 +51,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/custom_admin_view/publishing.php b/admin/layouts/custom_admin_view/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/custom_admin_view/publishing.php +++ b/admin/layouts/custom_admin_view/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_admin_view/publlshing.php b/admin/layouts/custom_admin_view/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/custom_admin_view/publlshing.php +++ b/admin/layouts/custom_admin_view/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_code/details_above.php b/admin/layouts/custom_code/details_above.php index d54ecc0ad..811bcf109 100644 --- a/admin/layouts/custom_code/details_above.php +++ b/admin/layouts/custom_code/details_above.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'target', 'system_name', 'function_name' @@ -23,6 +34,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -31,3 +43,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/custom_code/details_fullwidth.php b/admin/layouts/custom_code/details_fullwidth.php index 313061d34..1d7ea82e0 100644 --- a/admin/layouts/custom_code/details_fullwidth.php +++ b/admin/layouts/custom_code/details_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'path', 'note_jcb_placeholder', 'code', @@ -24,6 +35,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -32,3 +44,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/custom_code/details_left.php b/admin/layouts/custom_code/details_left.php index 32218d885..002297f05 100644 --- a/admin/layouts/custom_code/details_left.php +++ b/admin/layouts/custom_code/details_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'comment_type', 'component', 'type', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_code/details_right.php b/admin/layouts/custom_code/details_right.php index be1e3d3b0..3f92a2ff9 100644 --- a/admin/layouts/custom_code/details_right.php +++ b/admin/layouts/custom_code/details_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'from_line', 'to_line', 'hashendtarget' @@ -23,9 +34,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_code/details_under.php b/admin/layouts/custom_code/details_under.php index d4c77dda2..c1b7ce8e9 100644 --- a/admin/layouts/custom_code/details_under.php +++ b/admin/layouts/custom_code/details_under.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'not_required' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/custom_code/publishing.php b/admin/layouts/custom_code/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/custom_code/publishing.php +++ b/admin/layouts/custom_code/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_code/publlshing.php b/admin/layouts/custom_code/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/custom_code/publlshing.php +++ b/admin/layouts/custom_code/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/dynamic_get/abacus_fullwidth.php b/admin/layouts/dynamic_get/abacus_fullwidth.php index b96bde05d..8a61afadd 100644 --- a/admin/layouts/dynamic_get/abacus_fullwidth.php +++ b/admin/layouts/dynamic_get/abacus_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_calculation_item', 'note_calculation_items', 'php_calculation' @@ -23,6 +34,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -31,3 +43,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/dynamic_get/abacus_left.php b/admin/layouts/dynamic_get/abacus_left.php index eba7a926d..1db9b61d0 100644 --- a/admin/layouts/dynamic_get/abacus_left.php +++ b/admin/layouts/dynamic_get/abacus_left.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'addcalculation' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/dynamic_get/custom_script_fullwidth.php b/admin/layouts/dynamic_get/custom_script_fullwidth.php index eb83596bf..25ed34938 100644 --- a/admin/layouts/dynamic_get/custom_script_fullwidth.php +++ b/admin/layouts/dynamic_get/custom_script_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_php_before_getitem', 'php_before_getitem', 'add_php_after_getitem', @@ -32,6 +43,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -40,3 +52,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/dynamic_get/joint_fullwidth.php b/admin/layouts/dynamic_get/joint_fullwidth.php index bd61af3b7..dec197175 100644 --- a/admin/layouts/dynamic_get/joint_fullwidth.php +++ b/admin/layouts/dynamic_get/joint_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'join_view_table', 'join_db_table' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/dynamic_get/main_above.php b/admin/layouts/dynamic_get/main_above.php index d87e3fa26..e2304a9bd 100644 --- a/admin/layouts/dynamic_get/main_above.php +++ b/admin/layouts/dynamic_get/main_above.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'name', 'gettype', 'getcustom', @@ -24,6 +35,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -32,3 +44,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/dynamic_get/main_fullwidth.php b/admin/layouts/dynamic_get/main_fullwidth.php index 417a38333..64a9af834 100644 --- a/admin/layouts/dynamic_get/main_fullwidth.php +++ b/admin/layouts/dynamic_get/main_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'php_custom_get', 'note_linked_to_notice' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/dynamic_get/main_left.php b/admin/layouts/dynamic_get/main_left.php index d5fde1138..06118e5c1 100644 --- a/admin/layouts/dynamic_get/main_left.php +++ b/admin/layouts/dynamic_get/main_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'main_source', 'view_table_main', 'db_table_main', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/dynamic_get/main_right.php b/admin/layouts/dynamic_get/main_right.php index 5ea710619..e50880b0e 100644 --- a/admin/layouts/dynamic_get/main_right.php +++ b/admin/layouts/dynamic_get/main_right.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'plugin_events' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/dynamic_get/main_under.php b/admin/layouts/dynamic_get/main_under.php index d4c77dda2..c1b7ce8e9 100644 --- a/admin/layouts/dynamic_get/main_under.php +++ b/admin/layouts/dynamic_get/main_under.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'not_required' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/dynamic_get/publishing.php b/admin/layouts/dynamic_get/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/dynamic_get/publishing.php +++ b/admin/layouts/dynamic_get/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/dynamic_get/publlshing.php b/admin/layouts/dynamic_get/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/dynamic_get/publlshing.php +++ b/admin/layouts/dynamic_get/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/dynamic_get/tweak_fullwidth.php b/admin/layouts/dynamic_get/tweak_fullwidth.php index 0a85c6f11..106ac847a 100644 --- a/admin/layouts/dynamic_get/tweak_fullwidth.php +++ b/admin/layouts/dynamic_get/tweak_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'filter', 'where', 'order', @@ -25,6 +36,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -33,3 +45,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/field/database_fullwidth.php b/admin/layouts/field/database_fullwidth.php index 124269579..ad559fa96 100644 --- a/admin/layouts/field/database_fullwidth.php +++ b/admin/layouts/field/database_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_no_database_settings_needed', 'note_database_settings_needed' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/field/database_left.php b/admin/layouts/field/database_left.php index 3832e4b83..4d70bc133 100644 --- a/admin/layouts/field/database_left.php +++ b/admin/layouts/field/database_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'datatype', 'datalenght', 'datalenght_other', @@ -25,9 +36,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/field/database_right.php b/admin/layouts/field/database_right.php index 738776e97..b311d32ec 100644 --- a/admin/layouts/field/database_right.php +++ b/admin/layouts/field/database_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'indexes', 'null_switch', 'store', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/field/publishing.php b/admin/layouts/field/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/field/publishing.php +++ b/admin/layouts/field/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/field/publlshing.php b/admin/layouts/field/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/field/publlshing.php +++ b/admin/layouts/field/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/field/scripts_left.php b/admin/layouts/field/scripts_left.php index 7ba4d502c..3963c887f 100644 --- a/admin/layouts/field/scripts_left.php +++ b/admin/layouts/field/scripts_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_css_view', 'css_view', 'add_css_views', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/field/scripts_right.php b/admin/layouts/field/scripts_right.php index b38bc241a..2e852c926 100644 --- a/admin/layouts/field/scripts_right.php +++ b/admin/layouts/field/scripts_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_javascript_view_footer', 'javascript_view_footer', 'add_javascript_views_footer', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/field/set_properties_above.php b/admin/layouts/field/set_properties_above.php index 538a7f8f0..fe606e164 100644 --- a/admin/layouts/field/set_properties_above.php +++ b/admin/layouts/field/set_properties_above.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'fieldtype', 'name', 'catid' @@ -23,6 +34,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -31,3 +43,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/field/set_properties_fullwidth.php b/admin/layouts/field/set_properties_fullwidth.php index 0ee91fbe6..de505c49a 100644 --- a/admin/layouts/field/set_properties_fullwidth.php +++ b/admin/layouts/field/set_properties_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_select_field_type', 'note_filter_information' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/field/set_properties_under.php b/admin/layouts/field/set_properties_under.php index d4c77dda2..c1b7ce8e9 100644 --- a/admin/layouts/field/set_properties_under.php +++ b/admin/layouts/field/set_properties_under.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'not_required' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/field/type_info_fullwidth.php b/admin/layouts/field/type_info_fullwidth.php index 5ac146da2..7cc6478c3 100644 --- a/admin/layouts/field/type_info_fullwidth.php +++ b/admin/layouts/field/type_info_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'helpnote', 'xml' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/fieldtype/database_defaults_left.php b/admin/layouts/fieldtype/database_defaults_left.php index c47a0b0db..56d886fb4 100644 --- a/admin/layouts/fieldtype/database_defaults_left.php +++ b/admin/layouts/fieldtype/database_defaults_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'has_defaults', 'datatype', 'datalenght', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/fieldtype/database_defaults_right.php b/admin/layouts/fieldtype/database_defaults_right.php index 738776e97..b311d32ec 100644 --- a/admin/layouts/fieldtype/database_defaults_right.php +++ b/admin/layouts/fieldtype/database_defaults_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'indexes', 'null_switch', 'store', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/fieldtype/details_above.php b/admin/layouts/fieldtype/details_above.php index 1fb957c8f..3527a8cb4 100644 --- a/admin/layouts/fieldtype/details_above.php +++ b/admin/layouts/fieldtype/details_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'name' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/fieldtype/details_fullwidth.php b/admin/layouts/fieldtype/details_fullwidth.php index 1666a0816..c563d214f 100644 --- a/admin/layouts/fieldtype/details_fullwidth.php +++ b/admin/layouts/fieldtype/details_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_on_fields', 'properties', 'not_required' @@ -23,6 +34,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -31,3 +43,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/fieldtype/details_left.php b/admin/layouts/fieldtype/details_left.php index ce4ad69ad..79c66a29d 100644 --- a/admin/layouts/fieldtype/details_left.php +++ b/admin/layouts/fieldtype/details_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'catid', 'short_description' ); @@ -22,9 +33,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/fieldtype/details_right.php b/admin/layouts/fieldtype/details_right.php index 679874d4e..3ce9fbbfa 100644 --- a/admin/layouts/fieldtype/details_right.php +++ b/admin/layouts/fieldtype/details_right.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index 9e78718bf..87f383cbc 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->wapfields; +$items = $displayData->warfields; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/layouts/fieldtype/publishing.php b/admin/layouts/fieldtype/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/fieldtype/publishing.php +++ b/admin/layouts/fieldtype/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/fieldtype/publlshing.php b/admin/layouts/fieldtype/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/fieldtype/publlshing.php +++ b/admin/layouts/fieldtype/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/help_document/details_above.php b/admin/layouts/help_document/details_above.php index 481838ff8..2c4504f83 100644 --- a/admin/layouts/help_document/details_above.php +++ b/admin/layouts/help_document/details_above.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'title', 'alias' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/help_document/details_fullwidth.php b/admin/layouts/help_document/details_fullwidth.php index fc702b376..6e4ede945 100644 --- a/admin/layouts/help_document/details_fullwidth.php +++ b/admin/layouts/help_document/details_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'content' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/help_document/details_left.php b/admin/layouts/help_document/details_left.php index 2110045f5..c9581d983 100644 --- a/admin/layouts/help_document/details_left.php +++ b/admin/layouts/help_document/details_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'target', 'groups', 'location', @@ -25,9 +36,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/help_document/details_right.php b/admin/layouts/help_document/details_right.php index 29221087f..7171927ee 100644 --- a/admin/layouts/help_document/details_right.php +++ b/admin/layouts/help_document/details_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'type', 'url', 'article' @@ -23,9 +34,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/help_document/details_under.php b/admin/layouts/help_document/details_under.php index d4c77dda2..c1b7ce8e9 100644 --- a/admin/layouts/help_document/details_under.php +++ b/admin/layouts/help_document/details_under.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'not_required' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/help_document/publishing.php b/admin/layouts/help_document/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/help_document/publishing.php +++ b/admin/layouts/help_document/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/help_document/publlshing.php b/admin/layouts/help_document/publlshing.php index 7d86382ff..c40fd6c94 100644 --- a/admin/layouts/help_document/publlshing.php +++ b/admin/layouts/help_document/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'version', @@ -25,9 +36,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/admin_views_fullwidth.php b/admin/layouts/joomla_component/admin_views_fullwidth.php index ea4e55d8c..ddffd390b 100644 --- a/admin/layouts/joomla_component/admin_views_fullwidth.php +++ b/admin/layouts/joomla_component/admin_views_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_on_admin_views', 'note_display_component_admin_views' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/joomla_component/custom_admin_views_fullwidth.php b/admin/layouts/joomla_component/custom_admin_views_fullwidth.php index 4d22dc6c4..356d1c2ee 100644 --- a/admin/layouts/joomla_component/custom_admin_views_fullwidth.php +++ b/admin/layouts/joomla_component/custom_admin_views_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_on_custom_admin_views', 'note_display_component_custom_admin_views' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/joomla_component/dash_install_fullwidth.php b/admin/layouts/joomla_component/dash_install_fullwidth.php index 5a6e42f01..99069e861 100644 --- a/admin/layouts/joomla_component/dash_install_fullwidth.php +++ b/admin/layouts/joomla_component/dash_install_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_php_preflight_install', 'php_preflight_install', 'add_php_preflight_update', @@ -30,6 +41,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -38,3 +50,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/joomla_component/dash_install_left.php b/admin/layouts/joomla_component/dash_install_left.php index 3547d54d1..9ad875a90 100644 --- a/admin/layouts/joomla_component/dash_install_left.php +++ b/admin/layouts/joomla_component/dash_install_left.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'dashboard_type' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/dash_install_right.php b/admin/layouts/joomla_component/dash_install_right.php index d5a36d891..b5edf8afd 100644 --- a/admin/layouts/joomla_component/dash_install_right.php +++ b/admin/layouts/joomla_component/dash_install_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_dynamic_dashboard', 'dashboard', 'note_botton_component_dashboard' @@ -23,9 +34,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/details_above.php b/admin/layouts/joomla_component/details_above.php index d8761d659..0b9969524 100644 --- a/admin/layouts/joomla_component/details_above.php +++ b/admin/layouts/joomla_component/details_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'system_name' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/joomla_component/details_left.php b/admin/layouts/joomla_component/details_left.php index 89fc23a04..9f01c24f0 100644 --- a/admin/layouts/joomla_component/details_left.php +++ b/admin/layouts/joomla_component/details_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'name', 'name_code', 'component_version', @@ -32,9 +43,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/details_right.php b/admin/layouts/joomla_component/details_right.php index 1be7b87c8..7bd15612c 100644 --- a/admin/layouts/joomla_component/details_right.php +++ b/admin/layouts/joomla_component/details_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'companyname', 'author', 'email', @@ -33,9 +44,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/details_under.php b/admin/layouts/joomla_component/details_under.php index d4c77dda2..c1b7ce8e9 100644 --- a/admin/layouts/joomla_component/details_under.php +++ b/admin/layouts/joomla_component/details_under.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'not_required' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php b/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php index 120955d39..fa524f2a6 100644 --- a/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php +++ b/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_buildcomp_dynamic_mysql', 'buildcomp', 'buildcompsql' @@ -23,6 +34,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -31,3 +43,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/joomla_component/dynamic_integration_left.php b/admin/layouts/joomla_component/dynamic_integration_left.php index 36818ddf9..45d0c1960 100644 --- a/admin/layouts/joomla_component/dynamic_integration_left.php +++ b/admin/layouts/joomla_component/dynamic_integration_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_update_server', 'update_server_url', 'update_server_target', @@ -29,9 +40,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/dynamic_integration_right.php b/admin/layouts/joomla_component/dynamic_integration_right.php index f5315bdb4..72351b669 100644 --- a/admin/layouts/joomla_component/dynamic_integration_right.php +++ b/admin/layouts/joomla_component/dynamic_integration_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'translation_tool', 'note_crowdin', 'crowdin_project_identifier', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/libs_helpers_fullwidth.php b/admin/layouts/joomla_component/libs_helpers_fullwidth.php index 75471afa1..8ac6a3745 100644 --- a/admin/layouts/joomla_component/libs_helpers_fullwidth.php +++ b/admin/layouts/joomla_component/libs_helpers_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'creatuserhelper', 'adduikit', 'addfootable', @@ -40,6 +51,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -48,3 +60,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/joomla_component/mysql_fullwidth.php b/admin/layouts/joomla_component/mysql_fullwidth.php index 297d6dd2e..95a45a88b 100644 --- a/admin/layouts/joomla_component/mysql_fullwidth.php +++ b/admin/layouts/joomla_component/mysql_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_sql', 'sql', 'add_sql_uninstall', @@ -24,6 +35,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -32,3 +44,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/joomla_component/publishing.php b/admin/layouts/joomla_component/publishing.php index af672bb37..7f3f312c2 100644 --- a/admin/layouts/joomla_component/publishing.php +++ b/admin/layouts/joomla_component/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -30,9 +41,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/readme_left.php b/admin/layouts/joomla_component/readme_left.php index d904442c0..bc6fda557 100644 --- a/admin/layouts/joomla_component/readme_left.php +++ b/admin/layouts/joomla_component/readme_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'addreadme', 'readme' ); @@ -22,9 +33,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/readme_right.php b/admin/layouts/joomla_component/readme_right.php index c521ff3bd..9c4959e63 100644 --- a/admin/layouts/joomla_component/readme_right.php +++ b/admin/layouts/joomla_component/readme_right.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_readme' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/settings_fullwidth.php b/admin/layouts/joomla_component/settings_fullwidth.php index 4d7f7412f..83d1c02a6 100644 --- a/admin/layouts/joomla_component/settings_fullwidth.php +++ b/admin/layouts/joomla_component/settings_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'spacer_hr_seven', 'note_on_contributors', 'addcontributors', @@ -25,6 +36,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -33,3 +45,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/joomla_component/settings_left.php b/admin/layouts/joomla_component/settings_left.php index bd91f16e8..1926c7a9b 100644 --- a/admin/layouts/joomla_component/settings_left.php +++ b/admin/layouts/joomla_component/settings_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_moved_views', 'spacer_hr_one', 'note_mysql_tweak_options', @@ -27,9 +38,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/settings_right.php b/admin/layouts/joomla_component/settings_right.php index 9e99a711a..929cd3b08 100644 --- a/admin/layouts/joomla_component/settings_right.php +++ b/admin/layouts/joomla_component/settings_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_component_files_folders', 'spacer_hr_four', 'add_menu_prefix', @@ -32,9 +43,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/site_views_fullwidth.php b/admin/layouts/joomla_component/site_views_fullwidth.php index 456bcff1e..f8485fd37 100644 --- a/admin/layouts/joomla_component/site_views_fullwidth.php +++ b/admin/layouts/joomla_component/site_views_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_on_site_views', 'note_display_component_site_views' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/language/details_left.php b/admin/layouts/language/details_left.php index 5c6226fd3..18159298f 100644 --- a/admin/layouts/language/details_left.php +++ b/admin/layouts/language/details_left.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'name' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/language/details_right.php b/admin/layouts/language/details_right.php index b0c3c99ce..d5c6ea351 100644 --- a/admin/layouts/language/details_right.php +++ b/admin/layouts/language/details_right.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'langtag' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/language/publishing.php b/admin/layouts/language/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/language/publishing.php +++ b/admin/layouts/language/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/language/publlshing.php b/admin/layouts/language/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/language/publlshing.php +++ b/admin/layouts/language/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/language_translation/details_fullwidth.php b/admin/layouts/language_translation/details_fullwidth.php index aa696de85..bb4e00bdf 100644 --- a/admin/layouts/language_translation/details_fullwidth.php +++ b/admin/layouts/language_translation/details_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'source', 'translation', 'components' @@ -23,6 +34,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -31,3 +43,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/language_translation/publishing.php b/admin/layouts/language_translation/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/language_translation/publishing.php +++ b/admin/layouts/language_translation/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/language_translation/publlshing.php b/admin/layouts/language_translation/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/language_translation/publlshing.php +++ b/admin/layouts/language_translation/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/layout/custom_script_fullwidth.php b/admin/layouts/layout/custom_script_fullwidth.php index 086c0795d..99ccd4de2 100644 --- a/admin/layouts/layout/custom_script_fullwidth.php +++ b/admin/layouts/layout/custom_script_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_php_view', 'php_view' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/layout/details_fullwidth.php b/admin/layouts/layout/details_fullwidth.php index 761b526e3..c3f2241c1 100644 --- a/admin/layouts/layout/details_fullwidth.php +++ b/admin/layouts/layout/details_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'layout' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/layout/details_left.php b/admin/layouts/layout/details_left.php index 94595a664..b1e8dac3d 100644 --- a/admin/layouts/layout/details_left.php +++ b/admin/layouts/layout/details_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'name', 'alias', 'description', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/layout/details_right.php b/admin/layouts/layout/details_right.php index 9a1b6f719..1f3346970 100644 --- a/admin/layouts/layout/details_right.php +++ b/admin/layouts/layout/details_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'snippet', 'note_uikit_snippet', 'note_snippet_usage' @@ -23,9 +34,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/layout/details_rightside.php b/admin/layouts/layout/details_rightside.php index c959fb10a..67bfa97e3 100644 --- a/admin/layouts/layout/details_rightside.php +++ b/admin/layouts/layout/details_rightside.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'dynamic_get', 'dynamic_values' ); @@ -22,9 +33,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/layout/details_under.php b/admin/layouts/layout/details_under.php index d4c77dda2..c1b7ce8e9 100644 --- a/admin/layouts/layout/details_under.php +++ b/admin/layouts/layout/details_under.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'not_required' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/layout/publishing.php b/admin/layouts/layout/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/layout/publishing.php +++ b/admin/layouts/layout/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/layout/publlshing.php b/admin/layouts/layout/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/layout/publlshing.php +++ b/admin/layouts/layout/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library/behaviour_above.php b/admin/layouts/library/behaviour_above.php index cf89269be..62a28fbaf 100644 --- a/admin/layouts/library/behaviour_above.php +++ b/admin/layouts/library/behaviour_above.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'name', 'how', 'type' @@ -23,6 +34,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -31,3 +43,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/library/behaviour_fullwidth.php b/admin/layouts/library/behaviour_fullwidth.php index c5b68899e..fb59668b7 100644 --- a/admin/layouts/library/behaviour_fullwidth.php +++ b/admin/layouts/library/behaviour_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_no_behaviour_one', 'note_yes_behaviour_one', 'note_build_in_behaviour_one', @@ -25,6 +36,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -33,3 +45,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/library/behaviour_left.php b/admin/layouts/library/behaviour_left.php index bb381c8d9..f3d40f38c 100644 --- a/admin/layouts/library/behaviour_left.php +++ b/admin/layouts/library/behaviour_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_library_instruction', 'libraries' ); @@ -22,9 +33,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library/behaviour_right.php b/admin/layouts/library/behaviour_right.php index 679874d4e..3ce9fbbfa 100644 --- a/admin/layouts/library/behaviour_right.php +++ b/admin/layouts/library/behaviour_right.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library/behaviour_under.php b/admin/layouts/library/behaviour_under.php index d4c77dda2..c1b7ce8e9 100644 --- a/admin/layouts/library/behaviour_under.php +++ b/admin/layouts/library/behaviour_under.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'not_required' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/library/config_fullwidth.php b/admin/layouts/library/config_fullwidth.php index 64088b18b..3f32c559e 100644 --- a/admin/layouts/library/config_fullwidth.php +++ b/admin/layouts/library/config_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_no_behaviour_two', 'note_yes_behaviour_two', 'note_build_in_behaviour_two', @@ -24,6 +35,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -32,3 +44,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/library/files_folders_urls_fullwidth.php b/admin/layouts/library/files_folders_urls_fullwidth.php index 43c397a35..19ff750bf 100644 --- a/admin/layouts/library/files_folders_urls_fullwidth.php +++ b/admin/layouts/library/files_folders_urls_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_no_behaviour_three', 'note_build_in_behaviour_three', 'note_display_library_files_folders_urls' @@ -23,6 +34,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -31,3 +43,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/library/linked_fullwidth.php b/admin/layouts/library/linked_fullwidth.php index f72766e64..039e99c5d 100644 --- a/admin/layouts/library/linked_fullwidth.php +++ b/admin/layouts/library/linked_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_linked_to_notice' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/library/publishing.php b/admin/layouts/library/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/library/publishing.php +++ b/admin/layouts/library/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library/publlshing.php b/admin/layouts/library/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/library/publlshing.php +++ b/admin/layouts/library/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library_config/publishing.php b/admin/layouts/library_config/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/library_config/publishing.php +++ b/admin/layouts/library_config/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library_config/publlshing.php b/admin/layouts/library_config/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/library_config/publlshing.php +++ b/admin/layouts/library_config/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library_config/tweaks_above.php b/admin/layouts/library_config/tweaks_above.php index 9c6adbb27..8503987e0 100644 --- a/admin/layouts/library_config/tweaks_above.php +++ b/admin/layouts/library_config/tweaks_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'library' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/library_config/tweaks_fullwidth.php b/admin/layouts/library_config/tweaks_fullwidth.php index 3fcdda1e5..b74219ebe 100644 --- a/admin/layouts/library_config/tweaks_fullwidth.php +++ b/admin/layouts/library_config/tweaks_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'addconfig' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/library_files_folders_urls/advance_fullwidth.php b/admin/layouts/library_files_folders_urls/advance_fullwidth.php index a6c96f370..b5112d859 100644 --- a/admin/layouts/library_files_folders_urls/advance_fullwidth.php +++ b/admin/layouts/library_files_folders_urls/advance_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_add_files_fullpath', 'addfilesfullpath', 'note_add_folders_fullpath', @@ -25,6 +36,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -33,3 +45,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/library_files_folders_urls/basic_above.php b/admin/layouts/library_files_folders_urls/basic_above.php index 9c6adbb27..8503987e0 100644 --- a/admin/layouts/library_files_folders_urls/basic_above.php +++ b/admin/layouts/library_files_folders_urls/basic_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'library' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/library_files_folders_urls/basic_fullwidth.php b/admin/layouts/library_files_folders_urls/basic_fullwidth.php index 7dcdef114..60e54aae2 100644 --- a/admin/layouts/library_files_folders_urls/basic_fullwidth.php +++ b/admin/layouts/library_files_folders_urls/basic_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_add_urls', 'addurls', 'note_add_files', @@ -26,6 +37,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -34,3 +46,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/library_files_folders_urls/publishing.php b/admin/layouts/library_files_folders_urls/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/library_files_folders_urls/publishing.php +++ b/admin/layouts/library_files_folders_urls/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library_files_folders_urls/publlshing.php b/admin/layouts/library_files_folders_urls/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/library_files_folders_urls/publlshing.php +++ b/admin/layouts/library_files_folders_urls/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/placeholder/details_fullwidth.php b/admin/layouts/placeholder/details_fullwidth.php index 81b416823..66e50cfcf 100644 --- a/admin/layouts/placeholder/details_fullwidth.php +++ b/admin/layouts/placeholder/details_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_placeholders_placedin' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/placeholder/details_left.php b/admin/layouts/placeholder/details_left.php index e768c77e1..97c37799b 100644 --- a/admin/layouts/placeholder/details_left.php +++ b/admin/layouts/placeholder/details_left.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'target' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/placeholder/details_right.php b/admin/layouts/placeholder/details_right.php index 6cd004a6e..a4b3f71b9 100644 --- a/admin/layouts/placeholder/details_right.php +++ b/admin/layouts/placeholder/details_right.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'value' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/placeholder/publishing.php b/admin/layouts/placeholder/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/placeholder/publishing.php +++ b/admin/layouts/placeholder/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/placeholder/publlshing.php b/admin/layouts/placeholder/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/placeholder/publlshing.php +++ b/admin/layouts/placeholder/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/server/details_above.php b/admin/layouts/server/details_above.php index d34733ceb..0e0361fcc 100644 --- a/admin/layouts/server/details_above.php +++ b/admin/layouts/server/details_above.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'name', 'protocol' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/server/details_fullwidth.php b/admin/layouts/server/details_fullwidth.php index c8b458ebf..064de9bd9 100644 --- a/admin/layouts/server/details_fullwidth.php +++ b/admin/layouts/server/details_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_ftp_signature', 'signature', 'note_ssh_security', @@ -24,6 +35,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -32,3 +44,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/server/details_left.php b/admin/layouts/server/details_left.php index da3f41193..e3257bc34 100644 --- a/admin/layouts/server/details_left.php +++ b/admin/layouts/server/details_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'username', 'host', 'port', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/server/details_right.php b/admin/layouts/server/details_right.php index 484c26bcd..154e5469b 100644 --- a/admin/layouts/server/details_right.php +++ b/admin/layouts/server/details_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'authentication', 'password', 'private', @@ -25,9 +36,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/server/linked_components_fullwidth.php b/admin/layouts/server/linked_components_fullwidth.php index 1b07ca66f..859a76e18 100644 --- a/admin/layouts/server/linked_components_fullwidth.php +++ b/admin/layouts/server/linked_components_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->wazlinked_components; +$items = $displayData->wbblinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/layouts/server/publishing.php b/admin/layouts/server/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/server/publishing.php +++ b/admin/layouts/server/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/server/publlshing.php b/admin/layouts/server/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/server/publlshing.php +++ b/admin/layouts/server/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/site_view/custom_buttons_fullwidth.php b/admin/layouts/site_view/custom_buttons_fullwidth.php index 5d9f0db34..665c1c65d 100644 --- a/admin/layouts/site_view/custom_buttons_fullwidth.php +++ b/admin/layouts/site_view/custom_buttons_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_custom_toolbar_placeholder', 'custom_button', 'php_controller', @@ -24,6 +35,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -32,3 +44,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/site_view/custom_buttons_left.php b/admin/layouts/site_view/custom_buttons_left.php index 4838206d2..6c13821c3 100644 --- a/admin/layouts/site_view/custom_buttons_left.php +++ b/admin/layouts/site_view/custom_buttons_left.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_custom_button' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/site_view/custom_buttons_right.php b/admin/layouts/site_view/custom_buttons_right.php index 2428befae..9a91c2772 100644 --- a/admin/layouts/site_view/custom_buttons_right.php +++ b/admin/layouts/site_view/custom_buttons_right.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'button_position' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/site_view/details_above.php b/admin/layouts/site_view/details_above.php index 564ef15e9..e36b108b9 100644 --- a/admin/layouts/site_view/details_above.php +++ b/admin/layouts/site_view/details_above.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'system_name', 'context' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/site_view/details_fullwidth.php b/admin/layouts/site_view/details_fullwidth.php index 7e5054615..6d03f6c71 100644 --- a/admin/layouts/site_view/details_fullwidth.php +++ b/admin/layouts/site_view/details_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'default' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/site_view/details_left.php b/admin/layouts/site_view/details_left.php index 686776af3..3c95591f7 100644 --- a/admin/layouts/site_view/details_left.php +++ b/admin/layouts/site_view/details_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'name', 'codename', 'description', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/site_view/details_right.php b/admin/layouts/site_view/details_right.php index 9a1b6f719..1f3346970 100644 --- a/admin/layouts/site_view/details_right.php +++ b/admin/layouts/site_view/details_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'snippet', 'note_uikit_snippet', 'note_snippet_usage' @@ -23,9 +34,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/site_view/details_rightside.php b/admin/layouts/site_view/details_rightside.php index dddfb3d0f..76933ba52 100644 --- a/admin/layouts/site_view/details_rightside.php +++ b/admin/layouts/site_view/details_rightside.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'custom_get', 'main_get', 'dynamic_get', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/site_view/details_under.php b/admin/layouts/site_view/details_under.php index d4c77dda2..c1b7ce8e9 100644 --- a/admin/layouts/site_view/details_under.php +++ b/admin/layouts/site_view/details_under.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'not_required' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/site_view/javascript_css_fullwidth.php b/admin/layouts/site_view/javascript_css_fullwidth.php index 182cd1d05..dcf04dde8 100644 --- a/admin/layouts/site_view/javascript_css_fullwidth.php +++ b/admin/layouts/site_view/javascript_css_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_javascript_file', 'javascript_file', 'add_js_document', @@ -28,6 +39,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -36,3 +48,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/site_view/linked_components_fullwidth.php b/admin/layouts/site_view/linked_components_fullwidth.php index f72766e64..039e99c5d 100644 --- a/admin/layouts/site_view/linked_components_fullwidth.php +++ b/admin/layouts/site_view/linked_components_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_linked_to_notice' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/site_view/php_fullwidth.php b/admin/layouts/site_view/php_fullwidth.php index cf7142f5a..38eca1009 100644 --- a/admin/layouts/site_view/php_fullwidth.php +++ b/admin/layouts/site_view/php_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_php_ajax', 'php_ajaxmethod', 'ajax_input', @@ -31,6 +42,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -39,3 +51,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/site_view/publishing.php b/admin/layouts/site_view/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/site_view/publishing.php +++ b/admin/layouts/site_view/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/site_view/publlshing.php b/admin/layouts/site_view/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/site_view/publlshing.php +++ b/admin/layouts/site_view/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet/contributor_fullwidth.php b/admin/layouts/snippet/contributor_fullwidth.php index 7c3b14d09..e98254a15 100644 --- a/admin/layouts/snippet/contributor_fullwidth.php +++ b/admin/layouts/snippet/contributor_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'note_contributor_details' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/snippet/contributor_left.php b/admin/layouts/snippet/contributor_left.php index 1c3e5f647..469c5e7a1 100644 --- a/admin/layouts/snippet/contributor_left.php +++ b/admin/layouts/snippet/contributor_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'contributor_company', 'contributor_website' ); @@ -22,9 +33,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet/contributor_right.php b/admin/layouts/snippet/contributor_right.php index b0885808e..ac2e16f7a 100644 --- a/admin/layouts/snippet/contributor_right.php +++ b/admin/layouts/snippet/contributor_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'contributor_name', 'contributor_email' ); @@ -22,9 +33,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet/details_above.php b/admin/layouts/snippet/details_above.php index 561d8f227..68f0ca1c9 100644 --- a/admin/layouts/snippet/details_above.php +++ b/admin/layouts/snippet/details_above.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'name', 'url', 'library' @@ -23,6 +34,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -31,3 +43,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/snippet/details_left.php b/admin/layouts/snippet/details_left.php index 804b79f76..ca18f40a0 100644 --- a/admin/layouts/snippet/details_left.php +++ b/admin/layouts/snippet/details_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'type', 'heading', 'description', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet/details_right.php b/admin/layouts/snippet/details_right.php index 622c652db..40e620d0a 100644 --- a/admin/layouts/snippet/details_right.php +++ b/admin/layouts/snippet/details_right.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'snippet' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet/publishing.php b/admin/layouts/snippet/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/snippet/publishing.php +++ b/admin/layouts/snippet/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet/publlshing.php b/admin/layouts/snippet/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/snippet/publlshing.php +++ b/admin/layouts/snippet/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet_type/details_left.php b/admin/layouts/snippet_type/details_left.php index 5c6226fd3..18159298f 100644 --- a/admin/layouts/snippet_type/details_left.php +++ b/admin/layouts/snippet_type/details_left.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'name' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet_type/details_right.php b/admin/layouts/snippet_type/details_right.php index 679874d4e..3ce9fbbfa 100644 --- a/admin/layouts/snippet_type/details_right.php +++ b/admin/layouts/snippet_type/details_right.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'description' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet_type/publishing.php b/admin/layouts/snippet_type/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/snippet_type/publishing.php +++ b/admin/layouts/snippet_type/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet_type/publlshing.php b/admin/layouts/snippet_type/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/snippet_type/publlshing.php +++ b/admin/layouts/snippet_type/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/template/custom_script_fullwidth.php b/admin/layouts/template/custom_script_fullwidth.php index 086c0795d..99ccd4de2 100644 --- a/admin/layouts/template/custom_script_fullwidth.php +++ b/admin/layouts/template/custom_script_fullwidth.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'add_php_view', 'php_view' ); @@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/template/details_fullwidth.php b/admin/layouts/template/details_fullwidth.php index 32c676529..4a7880a1e 100644 --- a/admin/layouts/template/details_fullwidth.php +++ b/admin/layouts/template/details_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'template' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/template/details_left.php b/admin/layouts/template/details_left.php index 94595a664..b1e8dac3d 100644 --- a/admin/layouts/template/details_left.php +++ b/admin/layouts/template/details_left.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'name', 'alias', 'description', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/template/details_right.php b/admin/layouts/template/details_right.php index 771a1ebef..5a572e3e4 100644 --- a/admin/layouts/template/details_right.php +++ b/admin/layouts/template/details_right.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'snippet', 'note_snippet_usage', 'note_uikit_snippet' @@ -23,9 +34,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/template/details_rightside.php b/admin/layouts/template/details_rightside.php index c959fb10a..67bfa97e3 100644 --- a/admin/layouts/template/details_rightside.php +++ b/admin/layouts/template/details_rightside.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'dynamic_get', 'dynamic_values' ); @@ -22,9 +33,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/template/details_under.php b/admin/layouts/template/details_under.php index d4c77dda2..c1b7ce8e9 100644 --- a/admin/layouts/template/details_under.php +++ b/admin/layouts/template/details_under.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'not_required' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/template/publishing.php b/admin/layouts/template/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/template/publishing.php +++ b/admin/layouts/template/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/template/publlshing.php b/admin/layouts/template/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/template/publlshing.php +++ b/admin/layouts/template/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/validation_rule/extends_formrule_above.php b/admin/layouts/validation_rule/extends_formrule_above.php index 7af99fba1..ad8370616 100644 --- a/admin/layouts/validation_rule/extends_formrule_above.php +++ b/admin/layouts/validation_rule/extends_formrule_above.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'inherit' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/validation_rule/extends_formrule_fullwidth.php b/admin/layouts/validation_rule/extends_formrule_fullwidth.php index 9c7afee5d..19fb17350 100644 --- a/admin/layouts/validation_rule/extends_formrule_fullwidth.php +++ b/admin/layouts/validation_rule/extends_formrule_fullwidth.php @@ -12,15 +12,27 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'php' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array(); renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+ diff --git a/admin/layouts/validation_rule/extends_formrule_left.php b/admin/layouts/validation_rule/extends_formrule_left.php index 5c6226fd3..18159298f 100644 --- a/admin/layouts/validation_rule/extends_formrule_left.php +++ b/admin/layouts/validation_rule/extends_formrule_left.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'name' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/validation_rule/extends_formrule_right.php b/admin/layouts/validation_rule/extends_formrule_right.php index fbca02b91..57ab8d289 100644 --- a/admin/layouts/validation_rule/extends_formrule_right.php +++ b/admin/layouts/validation_rule/extends_formrule_right.php @@ -12,18 +12,31 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'short_description' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/validation_rule/publishing.php b/admin/layouts/validation_rule/publishing.php index 07d6717ac..68e3657ce 100644 --- a/admin/layouts/validation_rule/publishing.php +++ b/admin/layouts/validation_rule/publishing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'created', 'created_by', 'modified', @@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/validation_rule/publlshing.php b/admin/layouts/validation_rule/publlshing.php index 8ab7976f8..a7ff8580c 100644 --- a/admin/layouts/validation_rule/publlshing.php +++ b/admin/layouts/validation_rule/publlshing.php @@ -12,9 +12,20 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +// get the form $form = $displayData->getForm(); -$fields = $displayData->get('fields') ?: array( +// get the layout fields override method name (from layout path/ID) +$layout_path_array = explode('.', $this->getLayoutId()); +// Since we cannot pass the layout and tab names as parameters to the model method +// this name combination of tab and layout in the method name is the only work around +// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name. +// example of layout name: details_left.php +// example of method name: getFields_details_left() +$fields_tab_layout = 'fields_' . $layout_path_array[1]; + +// get the fields +$fields = $displayData->get($fields_tab_layout) ?: array( 'published', 'ordering', 'access', @@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> + setFieldAttribute($field, 'type', 'hidden'); ?> renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/models/admin_custom_tabs.php b/admin/models/admin_custom_tabs.php index c5d77729b..2f02ef692 100644 --- a/admin/models/admin_custom_tabs.php +++ b/admin/models/admin_custom_tabs.php @@ -18,13 +18,29 @@ use Joomla\Registry\Registry; * Componentbuilder Admin_custom_tabs Model */ class ComponentbuilderModelAdmin_custom_tabs extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'tabs' => array( + 'fullwidth' => array( + 'tabs' + ), + 'above' => array( + 'admin_view' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * diff --git a/admin/models/admin_fields.php b/admin/models/admin_fields.php index 781a7682d..9e7504f88 100644 --- a/admin/models/admin_fields.php +++ b/admin/models/admin_fields.php @@ -18,13 +18,30 @@ use Joomla\Registry\Registry; * Componentbuilder Admin_fields Model */ class ComponentbuilderModelAdmin_fields extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'fields' => array( + 'fullwidth' => array( + 'note_on_views', + 'addfields' + ), + 'above' => array( + 'admin_view' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * diff --git a/admin/models/admin_fields_conditions.php b/admin/models/admin_fields_conditions.php index 8330a7c0b..2e2013d7e 100644 --- a/admin/models/admin_fields_conditions.php +++ b/admin/models/admin_fields_conditions.php @@ -18,13 +18,30 @@ use Joomla\Registry\Registry; * Componentbuilder Admin_fields_conditions Model */ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'conditions' => array( + 'fullwidth' => array( + 'note_on_conditions', + 'addconditions' + ), + 'above' => array( + 'admin_view' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * diff --git a/admin/models/admin_fields_relations.php b/admin/models/admin_fields_relations.php index 2eaa3dd13..555d5a17f 100644 --- a/admin/models/admin_fields_relations.php +++ b/admin/models/admin_fields_relations.php @@ -18,13 +18,30 @@ use Joomla\Registry\Registry; * Componentbuilder Admin_fields_relations Model */ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'relations' => array( + 'fullwidth' => array( + 'note_on_relations', + 'addrelations' + ), + 'above' => array( + 'admin_view' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index 7bcce1a50..60b101f90 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -18,13 +18,176 @@ use Joomla\Registry\Registry; * Componentbuilder Admin_view Model */ class ComponentbuilderModelAdmin_view extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'name_single', + 'name_list', + 'type', + 'icon', + 'icon_add', + 'icon_category' + ), + 'right' => array( + 'short_description', + 'description', + 'add_fadein' + ), + 'fullwidth' => array( + 'note_linked_to_notice' + ), + 'above' => array( + 'system_name' + ), + 'under' => array( + 'not_required' + ) + ), + 'php' => array( + 'fullwidth' => array( + 'add_php_ajax', + 'php_ajaxmethod', + 'ajax_input', + 'add_php_getitem', + 'php_getitem', + 'add_php_getitems', + 'php_getitems', + 'add_php_getitems_after_all', + 'php_getitems_after_all', + 'add_php_getlistquery', + 'php_getlistquery', + 'add_php_getform', + 'php_getform', + 'add_php_before_save', + 'php_before_save', + 'add_php_save', + 'php_save', + 'add_php_postsavehook', + 'php_postsavehook', + 'add_php_allowadd', + 'php_allowadd', + 'add_php_allowedit', + 'php_allowedit', + 'add_php_before_cancel', + 'php_before_cancel', + 'add_php_after_cancel', + 'php_after_cancel', + 'add_php_batchcopy', + 'php_batchcopy', + 'add_php_batchmove', + 'php_batchmove', + 'add_php_before_publish', + 'php_before_publish', + 'add_php_after_publish', + 'php_after_publish', + 'add_php_before_delete', + 'php_before_delete', + 'add_php_after_delete', + 'php_after_delete', + 'add_php_document', + 'php_document' + ) + ), + 'mysql' => array( + 'left' => array( + 'mysql_table_engine', + 'mysql_table_charset', + 'mysql_table_collate', + 'mysql_table_row_format', + 'add_sql', + 'source', + 'addtables' + ), + 'fullwidth' => array( + 'sql' + ) + ), + 'custom_import' => array( + 'fullwidth' => array( + 'note_beginner_import', + 'note_advanced_import', + 'add_custom_import', + 'php_import_display', + 'html_import_view', + 'php_import', + 'php_import_headers', + 'php_import_setdata', + 'php_import_save', + 'php_import_ext' + ) + ), + 'settings' => array( + 'fullwidth' => array( + 'note_on_permissions', + 'addpermissions', + 'note_on_tabs', + 'addtabs', + 'note_custom_tabs_note', + 'note_on_linked_views', + 'addlinked_views' + ) + ), + 'fields' => array( + 'left' => array( + 'note_create_edit_notice', + 'alias_builder_type', + 'note_alias_builder_custom', + 'note_alias_builder_default', + 'alias_builder' + ), + 'right' => array( + 'note_create_edit_buttons' + ), + 'fullwidth' => array( + 'note_create_edit_display' + ) + ), + 'css' => array( + 'fullwidth' => array( + 'add_css_view', + 'css_view', + 'add_css_views', + 'css_views' + ) + ), + 'javascript' => array( + 'fullwidth' => array( + 'add_javascript_view_file', + 'javascript_view_file', + 'add_javascript_view_footer', + 'javascript_view_footer', + 'add_javascript_views_file', + 'javascript_views_file', + 'add_javascript_views_footer', + 'javascript_views_footer' + ) + ), + 'custom_buttons' => array( + 'left' => array( + 'add_custom_button', + 'custom_button' + ), + 'fullwidth' => array( + 'php_controller', + 'php_model', + 'php_controller_list', + 'php_model_list' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * @@ -52,10 +215,17 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin return JTable::getInstance($type, $prefix, $config); } + /** + * get VDM session key + * + * @return string the session key + * + */ public function getVDM() { return $this->vastDevMod; } + /** * Method to get a single record. @@ -104,12 +274,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import_save = base64_decode($item->php_import_save); } - if (!empty($item->php_getitems)) - { - // base64 Decode php_getitems. - $item->php_getitems = base64_decode($item->php_getitems); - } - if (!empty($item->php_getitems_after_all)) { // base64 Decode php_getitems_after_all. @@ -182,6 +346,24 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->javascript_view_footer = base64_decode($item->javascript_view_footer); } + if (!empty($item->php_before_cancel)) + { + // base64 Decode php_before_cancel. + $item->php_before_cancel = base64_decode($item->php_before_cancel); + } + + if (!empty($item->php_after_cancel)) + { + // base64 Decode php_after_cancel. + $item->php_after_cancel = base64_decode($item->php_after_cancel); + } + + if (!empty($item->javascript_views_file)) + { + // base64 Decode javascript_views_file. + $item->javascript_views_file = base64_decode($item->javascript_views_file); + } + if (!empty($item->php_batchcopy)) { // base64 Decode php_batchcopy. @@ -194,10 +376,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_batchmove = base64_decode($item->php_batchmove); } - if (!empty($item->javascript_views_file)) + if (!empty($item->javascript_views_footer)) { - // base64 Decode javascript_views_file. - $item->javascript_views_file = base64_decode($item->javascript_views_file); + // base64 Decode javascript_views_footer. + $item->javascript_views_footer = base64_decode($item->javascript_views_footer); } if (!empty($item->php_before_publish)) @@ -212,42 +394,36 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_after_publish = base64_decode($item->php_after_publish); } - if (!empty($item->javascript_views_footer)) - { - // base64 Decode javascript_views_footer. - $item->javascript_views_footer = base64_decode($item->javascript_views_footer); - } - if (!empty($item->php_before_delete)) { // base64 Decode php_before_delete. $item->php_before_delete = base64_decode($item->php_before_delete); } - if (!empty($item->php_after_delete)) - { - // base64 Decode php_after_delete. - $item->php_after_delete = base64_decode($item->php_after_delete); - } - - if (!empty($item->php_document)) - { - // base64 Decode php_document. - $item->php_document = base64_decode($item->php_document); - } - if (!empty($item->php_controller)) { // base64 Decode php_controller. $item->php_controller = base64_decode($item->php_controller); } + if (!empty($item->php_after_delete)) + { + // base64 Decode php_after_delete. + $item->php_after_delete = base64_decode($item->php_after_delete); + } + if (!empty($item->php_model)) { // base64 Decode php_model. $item->php_model = base64_decode($item->php_model); } + if (!empty($item->php_document)) + { + // base64 Decode php_document. + $item->php_document = base64_decode($item->php_document); + } + if (!empty($item->php_controller_list)) { // base64 Decode php_controller_list. @@ -260,24 +436,30 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_model_list = base64_decode($item->php_model_list); } - if (!empty($item->sql)) - { - // base64 Decode sql. - $item->sql = base64_decode($item->sql); - } - if (!empty($item->php_ajaxmethod)) { // base64 Decode php_ajaxmethod. $item->php_ajaxmethod = base64_decode($item->php_ajaxmethod); } + if (!empty($item->sql)) + { + // base64 Decode sql. + $item->sql = base64_decode($item->sql); + } + if (!empty($item->php_import_display)) { // base64 Decode php_import_display. $item->php_import_display = base64_decode($item->php_import_display); } + if (!empty($item->php_getitem)) + { + // base64 Decode php_getitem. + $item->php_getitem = base64_decode($item->php_getitem); + } + if (!empty($item->php_import)) { // base64 Decode php_import. @@ -290,10 +472,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import_setdata = base64_decode($item->php_import_setdata); } - if (!empty($item->php_getitem)) + if (!empty($item->php_getitems)) { - // base64 Decode php_getitem. - $item->php_getitem = base64_decode($item->php_getitem); + // base64 Decode php_getitems. + $item->php_getitems = base64_decode($item->php_getitems); } if (!empty($item->php_import_ext)) @@ -419,6 +601,22 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin { $this->_db->updateObject('#__componentbuilder_admin_view', $objectUpdate, 'id'); } + + // update the mysql_table_engine defaults + if (isset($item->mysql_table_engine) && is_numeric($item->mysql_table_engine)) + { + $item->mysql_table_engine = 'MyISAM'; + } + // update the mysql_table_charset defaults + if (isset($item->mysql_table_charset) && is_numeric($item->mysql_table_charset)) + { + $item->mysql_table_charset = 'utf8'; + } + // update the mysql_table_collate defaults + if (isset($item->mysql_table_collate) && is_numeric($item->mysql_table_collate)) + { + $item->mysql_table_collate = 'utf8_general_ci'; + } if (!empty($item->id)) { @@ -1331,12 +1529,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_import_save'] = base64_encode($data['php_import_save']); } - // Set the php_getitems string to base64 string. - if (isset($data['php_getitems'])) - { - $data['php_getitems'] = base64_encode($data['php_getitems']); - } - // Set the php_getitems_after_all string to base64 string. if (isset($data['php_getitems_after_all'])) { @@ -1409,6 +1601,24 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']); } + // Set the php_before_cancel string to base64 string. + if (isset($data['php_before_cancel'])) + { + $data['php_before_cancel'] = base64_encode($data['php_before_cancel']); + } + + // Set the php_after_cancel string to base64 string. + if (isset($data['php_after_cancel'])) + { + $data['php_after_cancel'] = base64_encode($data['php_after_cancel']); + } + + // Set the javascript_views_file string to base64 string. + if (isset($data['javascript_views_file'])) + { + $data['javascript_views_file'] = base64_encode($data['javascript_views_file']); + } + // Set the php_batchcopy string to base64 string. if (isset($data['php_batchcopy'])) { @@ -1421,10 +1631,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_batchmove'] = base64_encode($data['php_batchmove']); } - // Set the javascript_views_file string to base64 string. - if (isset($data['javascript_views_file'])) + // Set the javascript_views_footer string to base64 string. + if (isset($data['javascript_views_footer'])) { - $data['javascript_views_file'] = base64_encode($data['javascript_views_file']); + $data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']); } // Set the php_before_publish string to base64 string. @@ -1439,42 +1649,36 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_after_publish'] = base64_encode($data['php_after_publish']); } - // Set the javascript_views_footer string to base64 string. - if (isset($data['javascript_views_footer'])) - { - $data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']); - } - // Set the php_before_delete string to base64 string. if (isset($data['php_before_delete'])) { $data['php_before_delete'] = base64_encode($data['php_before_delete']); } - // Set the php_after_delete string to base64 string. - if (isset($data['php_after_delete'])) - { - $data['php_after_delete'] = base64_encode($data['php_after_delete']); - } - - // Set the php_document string to base64 string. - if (isset($data['php_document'])) - { - $data['php_document'] = base64_encode($data['php_document']); - } - // Set the php_controller string to base64 string. if (isset($data['php_controller'])) { $data['php_controller'] = base64_encode($data['php_controller']); } + // Set the php_after_delete string to base64 string. + if (isset($data['php_after_delete'])) + { + $data['php_after_delete'] = base64_encode($data['php_after_delete']); + } + // Set the php_model string to base64 string. if (isset($data['php_model'])) { $data['php_model'] = base64_encode($data['php_model']); } + // Set the php_document string to base64 string. + if (isset($data['php_document'])) + { + $data['php_document'] = base64_encode($data['php_document']); + } + // Set the php_controller_list string to base64 string. if (isset($data['php_controller_list'])) { @@ -1487,24 +1691,30 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_model_list'] = base64_encode($data['php_model_list']); } - // Set the sql string to base64 string. - if (isset($data['sql'])) - { - $data['sql'] = base64_encode($data['sql']); - } - // Set the php_ajaxmethod string to base64 string. if (isset($data['php_ajaxmethod'])) { $data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']); } + // Set the sql string to base64 string. + if (isset($data['sql'])) + { + $data['sql'] = base64_encode($data['sql']); + } + // Set the php_import_display string to base64 string. if (isset($data['php_import_display'])) { $data['php_import_display'] = base64_encode($data['php_import_display']); } + // Set the php_getitem string to base64 string. + if (isset($data['php_getitem'])) + { + $data['php_getitem'] = base64_encode($data['php_getitem']); + } + // Set the php_import string to base64 string. if (isset($data['php_import'])) { @@ -1517,10 +1727,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_import_setdata'] = base64_encode($data['php_import_setdata']); } - // Set the php_getitem string to base64 string. - if (isset($data['php_getitem'])) + // Set the php_getitems string to base64 string. + if (isset($data['php_getitems'])) { - $data['php_getitem'] = base64_encode($data['php_getitem']); + $data['php_getitems'] = base64_encode($data['php_getitems']); } // Set the php_import_ext string to base64 string. diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index 6ee4f09f9..a39053ef8 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -31,8 +31,8 @@ class ComponentbuilderModelAdmin_views extends JModelList 'a.name_single','name_single', 'a.short_description','short_description', 'a.add_fadein','add_fadein', - 'a.type','type', 'a.add_custom_import','add_custom_import', + 'a.type','type', 'a.add_custom_button','add_custom_button', 'a.add_php_ajax','add_php_ajax' ); @@ -67,12 +67,12 @@ class ComponentbuilderModelAdmin_views extends JModelList $add_fadein = $this->getUserStateFromRequest($this->context . '.filter.add_fadein', 'filter_add_fadein'); $this->setState('filter.add_fadein', $add_fadein); - $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); - $this->setState('filter.type', $type); - $add_custom_import = $this->getUserStateFromRequest($this->context . '.filter.add_custom_import', 'filter_add_custom_import'); $this->setState('filter.add_custom_import', $add_custom_import); + $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type'); + $this->setState('filter.type', $type); + $add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button'); $this->setState('filter.add_custom_button', $add_custom_button); @@ -136,10 +136,10 @@ class ComponentbuilderModelAdmin_views extends JModelList { // convert add_fadein $item->add_fadein = $this->selectionTranslation($item->add_fadein, 'add_fadein'); - // convert type - $item->type = $this->selectionTranslation($item->type, 'type'); // convert add_custom_import $item->add_custom_import = $this->selectionTranslation($item->add_custom_import, 'add_custom_import'); + // convert type + $item->type = $this->selectionTranslation($item->type, 'type'); // convert add_custom_button $item->add_custom_button = $this->selectionTranslation($item->add_custom_button, 'add_custom_button'); // convert add_php_ajax @@ -172,19 +172,6 @@ class ComponentbuilderModelAdmin_views extends JModelList return $add_fadeinArray[$value]; } } - // Array of type language strings - if ($name === 'type') - { - $typeArray = array( - 1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_READWRITE', - 2 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY' - ); - // Now check if value is found in this array - if (isset($typeArray[$value]) && ComponentbuilderHelper::checkString($typeArray[$value])) - { - return $typeArray[$value]; - } - } // Array of add_custom_import language strings if ($name === 'add_custom_import') { @@ -198,6 +185,19 @@ class ComponentbuilderModelAdmin_views extends JModelList return $add_custom_importArray[$value]; } } + // Array of type language strings + if ($name === 'type') + { + $typeArray = array( + 1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_READWRITE', + 2 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY' + ); + // Now check if value is found in this array + if (isset($typeArray[$value]) && ComponentbuilderHelper::checkString($typeArray[$value])) + { + return $typeArray[$value]; + } + } // Array of add_custom_button language strings if ($name === 'add_custom_button') { @@ -282,7 +282,7 @@ class ComponentbuilderModelAdmin_views extends JModelList else { $search = $db->quote('%' . $db->escape($search) . '%'); - $query->where('(a.system_name LIKE '.$search.' OR a.name_single LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.description LIKE '.$search.' OR a.type LIKE '.$search.' OR a.name_list LIKE '.$search.')'); + $query->where('(a.system_name LIKE '.$search.' OR a.name_single LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.name_list LIKE '.$search.' OR a.description LIKE '.$search.' OR a.type LIKE '.$search.')'); } } @@ -291,16 +291,16 @@ class ComponentbuilderModelAdmin_views extends JModelList { $query->where('a.add_fadein = ' . $db->quote($db->escape($add_fadein))); } - // Filter by Type. - if ($type = $this->getState('filter.type')) - { - $query->where('a.type = ' . $db->quote($db->escape($type))); - } // Filter by Add_custom_import. if ($add_custom_import = $this->getState('filter.add_custom_import')) { $query->where('a.add_custom_import = ' . $db->quote($db->escape($add_custom_import))); } + // Filter by Type. + if ($type = $this->getState('filter.type')) + { + $query->where('a.type = ' . $db->quote($db->escape($type))); + } // Filter by Add_custom_button. if ($add_custom_button = $this->getState('filter.add_custom_button')) { @@ -382,8 +382,6 @@ class ComponentbuilderModelAdmin_views extends JModelList $item->html_import_view = base64_decode($item->html_import_view); // decode php_import_save $item->php_import_save = base64_decode($item->php_import_save); - // decode php_getitems - $item->php_getitems = base64_decode($item->php_getitems); // decode php_getitems_after_all $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); // decode php_getlistquery @@ -408,44 +406,50 @@ class ComponentbuilderModelAdmin_views extends JModelList $item->php_allowedit = base64_decode($item->php_allowedit); // decode javascript_view_footer $item->javascript_view_footer = base64_decode($item->javascript_view_footer); + // decode php_before_cancel + $item->php_before_cancel = base64_decode($item->php_before_cancel); + // decode php_after_cancel + $item->php_after_cancel = base64_decode($item->php_after_cancel); + // decode javascript_views_file + $item->javascript_views_file = base64_decode($item->javascript_views_file); // decode php_batchcopy $item->php_batchcopy = base64_decode($item->php_batchcopy); // decode php_batchmove $item->php_batchmove = base64_decode($item->php_batchmove); - // decode javascript_views_file - $item->javascript_views_file = base64_decode($item->javascript_views_file); + // decode javascript_views_footer + $item->javascript_views_footer = base64_decode($item->javascript_views_footer); // decode php_before_publish $item->php_before_publish = base64_decode($item->php_before_publish); // decode php_after_publish $item->php_after_publish = base64_decode($item->php_after_publish); - // decode javascript_views_footer - $item->javascript_views_footer = base64_decode($item->javascript_views_footer); // decode php_before_delete $item->php_before_delete = base64_decode($item->php_before_delete); - // decode php_after_delete - $item->php_after_delete = base64_decode($item->php_after_delete); - // decode php_document - $item->php_document = base64_decode($item->php_document); // decode php_controller $item->php_controller = base64_decode($item->php_controller); + // decode php_after_delete + $item->php_after_delete = base64_decode($item->php_after_delete); // decode php_model $item->php_model = base64_decode($item->php_model); + // decode php_document + $item->php_document = base64_decode($item->php_document); // decode php_controller_list $item->php_controller_list = base64_decode($item->php_controller_list); // decode php_model_list $item->php_model_list = base64_decode($item->php_model_list); - // decode sql - $item->sql = base64_decode($item->sql); // decode php_ajaxmethod $item->php_ajaxmethod = base64_decode($item->php_ajaxmethod); + // decode sql + $item->sql = base64_decode($item->sql); // decode php_import_display $item->php_import_display = base64_decode($item->php_import_display); + // decode php_getitem + $item->php_getitem = base64_decode($item->php_getitem); // decode php_import $item->php_import = base64_decode($item->php_import); // decode php_import_setdata $item->php_import_setdata = base64_decode($item->php_import_setdata); - // decode php_getitem - $item->php_getitem = base64_decode($item->php_getitem); + // decode php_getitems + $item->php_getitems = base64_decode($item->php_getitems); // decode php_import_ext $item->php_import_ext = base64_decode($item->php_import_ext); // unset the values we don't want exported. @@ -512,8 +516,8 @@ class ComponentbuilderModelAdmin_views extends JModelList $id .= ':' . $this->getState('filter.name_single'); $id .= ':' . $this->getState('filter.short_description'); $id .= ':' . $this->getState('filter.add_fadein'); - $id .= ':' . $this->getState('filter.type'); $id .= ':' . $this->getState('filter.add_custom_import'); + $id .= ':' . $this->getState('filter.type'); $id .= ':' . $this->getState('filter.add_custom_button'); $id .= ':' . $this->getState('filter.add_php_ajax'); diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 6c09e19d2..c72d9bd91 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -315,6 +315,7 @@ class ComponentbuilderModelAjax extends JModelList 'component_config' => 'components_config', 'component_dashboard' => 'components_dashboard', 'component_files_folders' => 'components_files_folders', + 'custom_code' => 'custom_codes', 'language' => true); public function getButton($type, $size) @@ -341,11 +342,16 @@ class ComponentbuilderModelAjax extends JModelList $ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'] . '&return=' . urlencode(base64_encode($return_url)); } // build url (A tag) - $startAtag = ''; - // build the smaller button - if (2 == $size) + $startAtag = 'onclick="UIkit2.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \'index.php?option=com_componentbuilder&view=' . $type . '&layout=edit' . $ref . '\' })" href="javascript:void(0)" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($type, 'W')).'">'; + // build the smallest button + if (3 == $size) { - $button = $startAtag.' ' . JText::_('COM_COMPONENTBUILDER_CREATE') . ''; + $button = ''; + } + // build the smaller button + elseif (2 == $size) + { + $button = ' ' . JText::_('COM_COMPONENTBUILDER_CREATE') . ''; } else // build the big button @@ -354,7 +360,7 @@ class ComponentbuilderModelAjax extends JModelList
-
'.$startAtag.' +
' . JText::_('COM_COMPONENTBUILDER_NEW') . ' @@ -521,6 +527,7 @@ class ComponentbuilderModelAjax extends JModelList 'dashboard_add' => 'setYesNo', 'checkin' => 'setYesNo', 'history' => 'setYesNo', + 'joomla_fields' => 'setYesNo', 'port' => 'setYesNo', 'edit_create_site_view' => 'setYesNo', 'icomoon' => 'setIcoMoon', @@ -574,6 +581,7 @@ class ComponentbuilderModelAjax extends JModelList 'submenu' => JText::_('COM_COMPONENTBUILDER_SUBMENU'), 'checkin' => JText::_('COM_COMPONENTBUILDER_AUTO_CHECKIN'), 'history' => JText::_('COM_COMPONENTBUILDER_KEEP_HISTORY'), + 'joomla_fields' => JText::_('COM_COMPONENTBUILDER_JOOMLA_FIELDS'), 'port' => JText::_('COM_COMPONENTBUILDER_EXPORTIMPORT_DATA'), 'edit_create_site_view' => JText::_('COM_COMPONENTBUILDER_EDITCREATE_SITE_VIEW'), 'icomoon' => JText::_('COM_COMPONENTBUILDER_ICON'), @@ -1934,6 +1942,23 @@ class ComponentbuilderModelAjax extends JModelList // only continue if this is a legitimate call if (isset($view['a_id']) && $view['a_id'] == $id && isset($view['a_view']) && ($target = $this->getCodeSearchKeys($view['a_view'], 'query_')) !== false) { + // reset the buttons bucket + $buttons = array(); + // some helper for some fields + $helper = array('xml' => 'note_select_field_type'); + // get input + $jinput = JFactory::getApplication()->input; + $return_here = $jinput->get('return_here', null, 'base64'); + // set the return here value if not found + if (ComponentbuilderHelper::checkString($return_here)) + { + $return_here = '&return=' . $return_here; + } + else + { + $return_here = '&ref=' . $view['a_view'] . '&refid=' . (int) $id; + } + // start db query $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName($target['select'])) @@ -1944,8 +1969,6 @@ class ComponentbuilderModelAjax extends JModelList if ($db->loadRowList()) { $data = $db->loadAssoc(); - // some helper for some fields - $helper = array('xml' => 'note_select_field_type'); // reset the bucket $bucket = array(); foreach ($data as $key => $value) @@ -1973,25 +1996,20 @@ class ComponentbuilderModelAjax extends JModelList // get all custom codes in value $bucket[$key] = ComponentbuilderHelper::getAllBetween($value, '[CUSTOMC' . 'ODE=', ']'); } + // check if field has string length + if (ComponentbuilderHelper::checkString($value)) + { + $buttons[$key] = array(); + if (($button = $this->getButton('custom_code', 3)) && ComponentbuilderHelper::checkString($button)) + { + $buttons[$key]['_create'] = $button; + } + } } } // check if any values found if (ComponentbuilderHelper::checkArray($bucket)) { - // get input - $jinput = JFactory::getApplication()->input; - $return_here = $jinput->get('return_here', null, 'base64'); - // set the return here value if not found - if (ComponentbuilderHelper::checkString($return_here)) - { - $return_here = '&return=' . $return_here; - } - else - { - $return_here = '&ref=' . $view['a_view'] . '&refid=' . (int) $id; - } - // reset the buttons bucket - $buttons = array(); foreach ($bucket as $field => $customcodes) { $edit_icon = ' '; @@ -2000,7 +2018,6 @@ class ComponentbuilderModelAjax extends JModelList { $field = $helper[$field]; } - $buttons[$field] = array(); foreach ($customcodes as $customcode) { $key = (array) explode('+', $customcode); @@ -2012,13 +2029,13 @@ class ComponentbuilderModelAjax extends JModelList } } } - // only continue if we have buttons in array - if (ComponentbuilderHelper::checkArray($buttons, true)) - { - return $buttons; - } } } + // only continue if we have buttons in array + if (ComponentbuilderHelper::checkArray($buttons, true)) + { + return $buttons; + } } return false; } @@ -2257,7 +2274,14 @@ class ComponentbuilderModelAjax extends JModelList 'not_base64' => array('dashboard_tab' => 'json'), 'name' => 'joomla_component->id:joomla_component.system_name' ), - // #__componentbuilder_admin_view (c) + // #__componentbuilder_component_placeholders (c) + 'component_placeholders' => array( + 'search' => array('id', 'joomla_component', 'addplaceholders'), + 'views' => 'components_placeholders', + 'not_base64' => array('addplaceholders' => 'json'), + 'name' => 'joomla_component->id:joomla_component.system_name' + ), + // #__componentbuilder_admin_view (d) 'admin_view' => array( 'search' => array('id', 'system_name', 'javascript_view_file', 'javascript_view_footer', 'javascript_views_file', 'javascript_views_footer', 'html_import_view', @@ -2270,14 +2294,21 @@ class ComponentbuilderModelAjax extends JModelList 'not_base64' => array(), 'name' => 'system_name' ), - // #__componentbuilder_admin_fields_relations (d) + // #__componentbuilder_admin_fields_relations (e) 'admin_fields_relations' => array( 'search' => array('id', 'admin_view', 'addrelations'), 'views' => 'admins_fields_relations', 'not_base64' => array('addrelations' => 'json'), 'name' => 'admin_view->id:admin_view.system_name' ), - // #__componentbuilder_custom_admin_view (e) + // #__componentbuilder_admin_custom_tabs (f) + 'admin_custom_tabs' => array( + 'search' => array('id', 'admin_view', 'tabs'), + 'views' => 'admins_custom_tabs', + 'not_base64' => array('tabs' => 'json'), + 'name' => 'admin_view->id:admin_view.system_name' + ), + // #__componentbuilder_custom_admin_view (g) 'custom_admin_view' => array( 'search' => array('id', 'system_name', 'default', 'php_view', 'php_jview', 'php_jview_display', 'php_document', 'js_document', 'css_document', 'css', 'php_ajaxmethod', 'php_model', 'php_controller'), @@ -2285,7 +2316,7 @@ class ComponentbuilderModelAjax extends JModelList 'not_base64' => array(), 'name' => 'system_name' ), - // #__componentbuilder_site_view (f) + // #__componentbuilder_site_view (h) 'site_view' => array( 'search' => array('id', 'system_name', 'default', 'php_view', 'php_jview', 'php_jview_display', 'php_document', 'js_document', 'css_document', 'css', 'php_ajaxmethod', 'php_model', 'php_controller'), @@ -2293,7 +2324,7 @@ class ComponentbuilderModelAjax extends JModelList 'not_base64' => array(), 'name' => 'system_name' ), - // #__componentbuilder_field (g) + // #__componentbuilder_field (i) 'field' => array( 'search' => array('id', 'name', 'xml', 'javascript_view_footer', 'javascript_views_footer'), 'views' => 'fields', @@ -2301,14 +2332,14 @@ class ComponentbuilderModelAjax extends JModelList 'base64_search' => array('xml' => array('start' => 'type_php', '_start' => '="', 'end' => '"')), 'name' => 'name' ), - // #__componentbuilder_fieldtype (h) + // #__componentbuilder_fieldtype (j) 'fieldtype' => array( 'search' => array('id', 'name', 'properties'), 'views' => 'fieldtypes', 'not_base64' => array('properties' => 'json'), 'name' => 'name' ), - // #__componentbuilder_dynamic_get (i) + // #__componentbuilder_dynamic_get (k) 'dynamic_get' => array( 'search' => array('id', 'name', 'php_before_getitem', 'php_after_getitem', 'php_before_getitems', 'php_after_getitems', 'php_getlistquery'), @@ -2316,35 +2347,35 @@ class ComponentbuilderModelAjax extends JModelList 'not_base64' => array(), 'name' => 'name' ), - // #__componentbuilder_template (j) + // #__componentbuilder_template (l) 'template' => array( 'search' => array('id', 'name', 'php_view', 'template'), 'views' => 'templates', 'not_base64' => array(), 'name' => 'name' ), - // #__componentbuilder_layout (k) + // #__componentbuilder_layout (m) 'layout' => array( 'search' => array('id', 'name', 'php_view', 'layout'), 'views' => 'layouts', 'not_base64' => array(), 'name' => 'name' ), - // #__componentbuilder_library (l) + // #__componentbuilder_library (n) 'library' => array( 'search' => array('id', 'name', 'php_setdocument'), 'views' => 'libraries', 'not_base64' => array(), 'name' => 'name' ), - // #__componentbuilder_custom_code (m) + // #__componentbuilder_custom_code (o) 'custom_code' => array( 'search' => array('id', 'system_name', 'code'), 'views' => 'custom_codes', 'not_base64' => array(), 'name' => 'system_name' ), - // #__componentbuilder_validation_rule (n) + // #__componentbuilder_validation_rule (p) 'validation_rule' => array( 'search' => array('id', 'name', 'php'), 'views' => 'validation_rules', diff --git a/admin/models/component_admin_views.php b/admin/models/component_admin_views.php index f5e2eb08b..41ea25f34 100644 --- a/admin/models/component_admin_views.php +++ b/admin/models/component_admin_views.php @@ -18,13 +18,30 @@ use Joomla\Registry\Registry; * Componentbuilder Component_admin_views Model */ class ComponentbuilderModelComponent_admin_views extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'views' => array( + 'fullwidth' => array( + 'note_on_admin_views', + 'addadmin_views' + ), + 'above' => array( + 'joomla_component' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * diff --git a/admin/models/component_config.php b/admin/models/component_config.php index e64c50b5f..6d2601dc4 100644 --- a/admin/models/component_config.php +++ b/admin/models/component_config.php @@ -18,13 +18,29 @@ use Joomla\Registry\Registry; * Componentbuilder Component_config Model */ class ComponentbuilderModelComponent_config extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'tweaks' => array( + 'fullwidth' => array( + 'addconfig' + ), + 'above' => array( + 'joomla_component' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * diff --git a/admin/models/component_custom_admin_menus.php b/admin/models/component_custom_admin_menus.php index bba09a02a..6ad3c4e29 100644 --- a/admin/models/component_custom_admin_menus.php +++ b/admin/models/component_custom_admin_menus.php @@ -18,13 +18,29 @@ use Joomla\Registry\Registry; * Componentbuilder Component_custom_admin_menus Model */ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'tweaks' => array( + 'fullwidth' => array( + 'addcustommenus' + ), + 'above' => array( + 'joomla_component' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * diff --git a/admin/models/component_custom_admin_views.php b/admin/models/component_custom_admin_views.php index 221693ada..fa75cb6e0 100644 --- a/admin/models/component_custom_admin_views.php +++ b/admin/models/component_custom_admin_views.php @@ -18,13 +18,30 @@ use Joomla\Registry\Registry; * Componentbuilder Component_custom_admin_views Model */ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'views' => array( + 'fullwidth' => array( + 'note_on_custom_admin_views', + 'addcustom_admin_views' + ), + 'above' => array( + 'joomla_component' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * diff --git a/admin/models/component_dashboard.php b/admin/models/component_dashboard.php index 33ba984a1..3c386aeeb 100644 --- a/admin/models/component_dashboard.php +++ b/admin/models/component_dashboard.php @@ -18,13 +18,30 @@ use Joomla\Registry\Registry; * Componentbuilder Component_dashboard Model */ class ComponentbuilderModelComponent_dashboard extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'dashboard' => array( + 'fullwidth' => array( + 'php_dashboard_methods', + 'dashboard_tab' + ), + 'above' => array( + 'joomla_component' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * diff --git a/admin/models/component_files_folders.php b/admin/models/component_files_folders.php index aacab03f7..a055f8093 100644 --- a/admin/models/component_files_folders.php +++ b/admin/models/component_files_folders.php @@ -18,13 +18,41 @@ use Joomla\Registry\Registry; * Componentbuilder Component_files_folders Model */ class ComponentbuilderModelComponent_files_folders extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'basic' => array( + 'fullwidth' => array( + 'note_add_files', + 'addfiles', + 'note_add_folders', + 'addfolders' + ), + 'above' => array( + 'joomla_component' + ) + ), + 'advance' => array( + 'fullwidth' => array( + 'note_add_files_fullpath', + 'addfilesfullpath', + 'note_add_folders_fullpath', + 'addfoldersfullpath', + 'note_constant_paths' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * diff --git a/admin/models/component_mysql_tweaks.php b/admin/models/component_mysql_tweaks.php index 969c2cd89..ea0bfa93b 100644 --- a/admin/models/component_mysql_tweaks.php +++ b/admin/models/component_mysql_tweaks.php @@ -18,13 +18,29 @@ use Joomla\Registry\Registry; * Componentbuilder Component_mysql_tweaks Model */ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'tweaks' => array( + 'fullwidth' => array( + 'sql_tweak' + ), + 'above' => array( + 'joomla_component' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * diff --git a/admin/models/component_placeholders.php b/admin/models/component_placeholders.php index 217c5877f..1255bc8ab 100644 --- a/admin/models/component_placeholders.php +++ b/admin/models/component_placeholders.php @@ -18,13 +18,29 @@ use Joomla\Registry\Registry; * Componentbuilder Component_placeholders Model */ class ComponentbuilderModelComponent_placeholders extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'fullwidth' => array( + 'addplaceholders' + ), + 'above' => array( + 'joomla_component' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * diff --git a/admin/models/component_site_views.php b/admin/models/component_site_views.php index b4c67352d..49a5ca3c1 100644 --- a/admin/models/component_site_views.php +++ b/admin/models/component_site_views.php @@ -18,13 +18,30 @@ use Joomla\Registry\Registry; * Componentbuilder Component_site_views Model */ class ComponentbuilderModelComponent_site_views extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'views' => array( + 'fullwidth' => array( + 'note_on_site_views', + 'addsite_views' + ), + 'above' => array( + 'joomla_component' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * diff --git a/admin/models/component_updates.php b/admin/models/component_updates.php index 5a57c5565..d5736ca78 100644 --- a/admin/models/component_updates.php +++ b/admin/models/component_updates.php @@ -18,13 +18,29 @@ use Joomla\Registry\Registry; * Componentbuilder Component_updates Model */ class ComponentbuilderModelComponent_updates extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'updates' => array( + 'fullwidth' => array( + 'version_update' + ), + 'above' => array( + 'joomla_component' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * diff --git a/admin/models/custom_admin_view.php b/admin/models/custom_admin_view.php index f6751cff1..f7cbca17b 100644 --- a/admin/models/custom_admin_view.php +++ b/admin/models/custom_admin_view.php @@ -18,13 +18,95 @@ use Joomla\Registry\Registry; * Componentbuilder Custom_admin_view Model */ class ComponentbuilderModelCustom_admin_view extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'name', + 'codename', + 'description', + 'note_libraries_selection', + 'libraries', + 'note_add_language_string' + ), + 'right' => array( + 'icon', + 'snippet', + 'note_uikit_snippet', + 'note_snippet_usage' + ), + 'fullwidth' => array( + 'default' + ), + 'above' => array( + 'system_name', + 'context' + ), + 'under' => array( + 'not_required' + ), + 'rightside' => array( + 'custom_get', + 'main_get', + 'dynamic_get', + 'dynamic_values' + ) + ), + 'php' => array( + 'fullwidth' => array( + 'add_php_ajax', + 'php_ajaxmethod', + 'ajax_input', + 'add_php_document', + 'php_document', + 'add_php_view', + 'php_view', + 'add_php_jview_display', + 'php_jview_display', + 'add_php_jview', + 'php_jview' + ) + ), + 'javascript_css' => array( + 'fullwidth' => array( + 'add_js_document', + 'js_document', + 'add_javascript_file', + 'javascript_file', + 'add_css_document', + 'css_document', + 'add_css', + 'css' + ) + ), + 'custom_buttons' => array( + 'left' => array( + 'add_custom_button', + 'custom_button' + ), + 'fullwidth' => array( + 'php_controller', + 'php_model' + ) + ), + 'linked_components' => array( + 'fullwidth' => array( + 'note_linked_to_notice' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * @@ -52,10 +134,17 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin return JTable::getInstance($type, $prefix, $config); } + /** + * get VDM session key + * + * @return string the session key + * + */ public function getVDM() { return $this->vastDevMod; } + /** * Method to get a single record. diff --git a/admin/models/custom_code.php b/admin/models/custom_code.php index 7417e9b5a..534c3b3cd 100644 --- a/admin/models/custom_code.php +++ b/admin/models/custom_code.php @@ -18,13 +18,48 @@ use Joomla\Registry\Registry; * Componentbuilder Custom_code Model */ class ComponentbuilderModelCustom_code extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'comment_type', + 'component', + 'type', + 'hashtarget' + ), + 'right' => array( + 'from_line', + 'to_line', + 'hashendtarget' + ), + 'fullwidth' => array( + 'path', + 'note_jcb_placeholder', + 'code', + 'note_placeholders_explained' + ), + 'above' => array( + 'target', + 'system_name', + 'function_name' + ), + 'under' => array( + 'not_required' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * @@ -52,10 +87,17 @@ class ComponentbuilderModelCustom_code extends JModelAdmin return JTable::getInstance($type, $prefix, $config); } + /** + * get VDM session key + * + * @return string the session key + * + */ public function getVDM() { return $this->vastDevMod; } + /** * Method to get a single record. diff --git a/admin/models/dynamic_get.php b/admin/models/dynamic_get.php index aa7936163..0d899b1c5 100644 --- a/admin/models/dynamic_get.php +++ b/admin/models/dynamic_get.php @@ -18,13 +18,88 @@ use Joomla\Registry\Registry; * Componentbuilder Dynamic_get Model */ class ComponentbuilderModelDynamic_get extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'main' => array( + 'left' => array( + 'main_source', + 'view_table_main', + 'db_table_main', + 'select_all', + 'view_selection', + 'db_selection' + ), + 'right' => array( + 'plugin_events' + ), + 'fullwidth' => array( + 'php_custom_get', + 'note_linked_to_notice' + ), + 'above' => array( + 'name', + 'gettype', + 'getcustom', + 'pagination' + ), + 'under' => array( + 'not_required' + ) + ), + 'abacus' => array( + 'left' => array( + 'addcalculation' + ), + 'fullwidth' => array( + 'note_calculation_item', + 'note_calculation_items', + 'php_calculation' + ) + ), + 'custom_script' => array( + 'fullwidth' => array( + 'add_php_before_getitem', + 'php_before_getitem', + 'add_php_after_getitem', + 'php_after_getitem', + 'add_php_getlistquery', + 'php_getlistquery', + 'add_php_before_getitems', + 'php_before_getitems', + 'add_php_after_getitems', + 'php_after_getitems', + 'add_php_router_parse', + 'php_router_parse' + ) + ), + 'joint' => array( + 'fullwidth' => array( + 'join_view_table', + 'join_db_table' + ) + ), + 'tweak' => array( + 'fullwidth' => array( + 'filter', + 'where', + 'order', + 'group', + 'global' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * @@ -52,10 +127,17 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin return JTable::getInstance($type, $prefix, $config); } + /** + * get VDM session key + * + * @return string the session key + * + */ public function getVDM() { return $this->vastDevMod; } + /** * Method to get a single record. diff --git a/admin/models/field.php b/admin/models/field.php index a0809d2b6..4ee506d06 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -18,13 +18,74 @@ use Joomla\Registry\Registry; * Componentbuilder Field Model */ class ComponentbuilderModelField extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'set_properties' => array( + 'fullwidth' => array( + 'note_select_field_type', + 'note_filter_information' + ), + 'above' => array( + 'fieldtype', + 'name', + 'catid' + ), + 'under' => array( + 'not_required' + ) + ), + 'database' => array( + 'left' => array( + 'datatype', + 'datalenght', + 'datalenght_other', + 'datadefault', + 'datadefault_other' + ), + 'right' => array( + 'indexes', + 'null_switch', + 'store', + 'note_whmcs_encryption' + ), + 'fullwidth' => array( + 'note_no_database_settings_needed', + 'note_database_settings_needed' + ) + ), + 'scripts' => array( + 'left' => array( + 'add_css_view', + 'css_view', + 'add_css_views', + 'css_views' + ), + 'right' => array( + 'add_javascript_view_footer', + 'javascript_view_footer', + 'add_javascript_views_footer', + 'javascript_views_footer' + ) + ), + 'type_info' => array( + 'fullwidth' => array( + 'helpnote', + 'xml' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * @@ -52,10 +113,17 @@ class ComponentbuilderModelField extends JModelAdmin return JTable::getInstance($type, $prefix, $config); } + /** + * get VDM session key + * + * @return string the session key + * + */ public function getVDM() { return $this->vastDevMod; } + /** * Method to get a single record. @@ -923,8 +991,6 @@ class ComponentbuilderModelField extends JModelAdmin // make sure we have the correct values if (ComponentbuilderHelper::checkArray($property) && isset($property['name']) && ComponentbuilderHelper::checkString($property['name']) && (isset($property['value']) || 'default' === $property['name'])) { - // fix the name (TODO) - // $property['name'] = ComponentbuilderHelper::safeString($property['name']); // some fixes, just in case (more can be added) switch ($property['name']) { @@ -937,7 +1003,7 @@ class ComponentbuilderModelField extends JModelAdmin } else { - $property['value'] = ComponentbuilderHelper::safeString($property['value']); + $property['value'] = ComponentbuilderHelper::safeFieldName($property['value']); } break; case 'type': diff --git a/admin/models/fields/adminsviews.php b/admin/models/fields/adminsviews.php index b459a6a64..6c0728229 100644 --- a/admin/models/fields/adminsviews.php +++ b/admin/models/fields/adminsviews.php @@ -35,22 +35,23 @@ class JFormFieldAdminsviews extends JFormFieldList */ protected function getOptions() { - $db = JFactory::getDBO(); - $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.id','a.system_name'),array('id','adminviews_system_name'))); - $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); - $query->where($db->quoteName('a.published') . ' >= 1'); - $query->order('a.system_name ASC'); - $db->setQuery((string)$query); - $items = $db->loadObjectList(); - $options = array(); - if ($items) - { - foreach($items as $item) - { - $options[] = JHtml::_('select.option', $item->id, $item->adminviews_system_name); - } - } + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.system_name'),array('id','adminviews_system_name'))); + $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.system_name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->adminviews_system_name); + } + } + return $options; } } diff --git a/admin/models/fields/component.php b/admin/models/fields/component.php index 9d42bd301..9404fd994 100644 --- a/admin/models/fields/component.php +++ b/admin/models/fields/component.php @@ -38,15 +38,15 @@ class JFormFieldComponent extends JFormFieldList protected function getInput() { // see if we should add buttons - $setButton = $this->getAttribute('button'); + $set_button = $this->getAttribute('button'); // get html $html = parent::getInput(); // if true set button - if ($setButton === 'true') + if ($set_button === 'true') { $button = array(); $script = array(); - $buttonName = $this->getAttribute('name'); + $button_code_name = $this->getAttribute('name'); // get the input from url $app = JFactory::getApplication(); $jinput = $app->input; @@ -70,55 +70,52 @@ class JFormFieldComponent extends JFormFieldList $ref .= '&return=' . $_return; $refJ .= '&return=' . $_return; } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object $user = JFactory::getUser(); // only add if user allowed to create joomla_component if ($user->authorise('joomla_component.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' '; } // only add if user allowed to edit joomla_component - if (($buttonName === 'joomla_component' || $buttonName === 'joomla_components') && $user->authorise('joomla_component.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('joomla_component.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; // build script $script[] = " jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - function ".$buttonName."Button(value) { + function ".$button_code_name."Button(value) { if (value > 0) { // hide the create button - jQuery('#".$buttonName."Create').hide(); + jQuery('#".$button_code_name."Create').hide(); // show edit button - jQuery('#".$buttonName."Edit').show(); + jQuery('#".$button_code_name."Edit').show(); var url = 'index.php?option=com_componentbuilder&view=joomla_components&task=joomla_component.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); + jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button - jQuery('#".$buttonName."Create').show(); + jQuery('#".$button_code_name."Create').show(); // hide edit button - jQuery('#".$buttonName."Edit').hide(); + jQuery('#".$button_code_name."Edit').hide(); } }"; } @@ -143,23 +140,23 @@ class JFormFieldComponent extends JFormFieldList protected function getOptions() { $db = JFactory::getDBO(); -$query = $db->getQuery(true); -$query->select($db->quoteName(array('a.id','a.system_name'),array('id','component_system_name'))); -$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); -$query->where($db->quoteName('a.published') . ' >= 1'); -$query->order('a.system_name ASC'); -$db->setQuery((string)$query); -$items = $db->loadObjectList(); -$options = array(); -if ($items) -{ - $options[] = JHtml::_('select.option', '', 'Select an option'); - foreach($items as $item) - { - $options[] = JHtml::_('select.option', $item->id, $item->component_system_name); - } -} + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.system_name'),array('id','component_system_name'))); + $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); + $query->where($db->quoteName('a.published') . ' >= 1'); + $query->order('a.system_name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', 'Select an option'); + foreach($items as $item) + { + $options[] = JHtml::_('select.option', $item->id, $item->component_system_name); + } + } -return $options; + return $options; } } diff --git a/admin/models/fields/dynamicget.php b/admin/models/fields/dynamicget.php index 467b2d143..49198710e 100644 --- a/admin/models/fields/dynamicget.php +++ b/admin/models/fields/dynamicget.php @@ -38,15 +38,15 @@ class JFormFieldDynamicget extends JFormFieldList protected function getInput() { // see if we should add buttons - $setButton = $this->getAttribute('button'); + $set_button = $this->getAttribute('button'); // get html $html = parent::getInput(); // if true set button - if ($setButton === 'true') + if ($set_button === 'true') { $button = array(); $script = array(); - $buttonName = $this->getAttribute('name'); + $button_code_name = $this->getAttribute('name'); // get the input from url $app = JFactory::getApplication(); $jinput = $app->input; @@ -70,55 +70,52 @@ class JFormFieldDynamicget extends JFormFieldList $ref .= '&return=' . $_return; $refJ .= '&return=' . $_return; } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object $user = JFactory::getUser(); // only add if user allowed to create dynamic_get if ($user->authorise('dynamic_get.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' '; } // only add if user allowed to edit dynamic_get - if (($buttonName === 'dynamic_get' || $buttonName === 'dynamic_gets') && $user->authorise('dynamic_get.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('dynamic_get.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; // build script $script[] = " jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - function ".$buttonName."Button(value) { + function ".$button_code_name."Button(value) { if (value > 0) { // hide the create button - jQuery('#".$buttonName."Create').hide(); + jQuery('#".$button_code_name."Create').hide(); // show edit button - jQuery('#".$buttonName."Edit').show(); + jQuery('#".$button_code_name."Edit').show(); var url = 'index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); + jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button - jQuery('#".$buttonName."Create').show(); + jQuery('#".$button_code_name."Create').show(); // hide edit button - jQuery('#".$buttonName."Edit').hide(); + jQuery('#".$button_code_name."Edit').hide(); } }"; } diff --git a/admin/models/fields/fieldtypes.php b/admin/models/fields/fieldtypes.php index 61e7d0ae6..97290a607 100644 --- a/admin/models/fields/fieldtypes.php +++ b/admin/models/fields/fieldtypes.php @@ -38,15 +38,15 @@ class JFormFieldFieldtypes extends JFormFieldList protected function getInput() { // see if we should add buttons - $setButton = $this->getAttribute('button'); + $set_button = $this->getAttribute('button'); // get html $html = parent::getInput(); // if true set button - if ($setButton === 'true') + if ($set_button === 'true') { $button = array(); $script = array(); - $buttonName = $this->getAttribute('name'); + $button_code_name = $this->getAttribute('name'); // get the input from url $app = JFactory::getApplication(); $jinput = $app->input; @@ -70,55 +70,52 @@ class JFormFieldFieldtypes extends JFormFieldList $ref .= '&return=' . $_return; $refJ .= '&return=' . $_return; } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object $user = JFactory::getUser(); // only add if user allowed to create fieldtype if ($user->authorise('fieldtype.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' '; } // only add if user allowed to edit fieldtype - if (($buttonName === 'fieldtype' || $buttonName === 'fieldtypes') && $user->authorise('fieldtype.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('fieldtype.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; // build script $script[] = " jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - function ".$buttonName."Button(value) { + function ".$button_code_name."Button(value) { if (value > 0) { // hide the create button - jQuery('#".$buttonName."Create').hide(); + jQuery('#".$button_code_name."Create').hide(); // show edit button - jQuery('#".$buttonName."Edit').show(); + jQuery('#".$button_code_name."Edit').show(); var url = 'index.php?option=com_componentbuilder&view=fieldtypes&task=fieldtype.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); + jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button - jQuery('#".$buttonName."Create').show(); + jQuery('#".$button_code_name."Create').show(); // hide edit button - jQuery('#".$buttonName."Edit').hide(); + jQuery('#".$button_code_name."Edit').hide(); } }"; } diff --git a/admin/models/fields/libraries.php b/admin/models/fields/libraries.php index 48e979f9a..b3548346c 100644 --- a/admin/models/fields/libraries.php +++ b/admin/models/fields/libraries.php @@ -38,15 +38,15 @@ class JFormFieldLibraries extends JFormFieldList protected function getInput() { // see if we should add buttons - $setButton = $this->getAttribute('button'); + $set_button = $this->getAttribute('button'); // get html $html = parent::getInput(); // if true set button - if ($setButton === 'true') + if ($set_button === 'true') { $button = array(); $script = array(); - $buttonName = $this->getAttribute('name'); + $button_code_name = $this->getAttribute('name'); // get the input from url $app = JFactory::getApplication(); $jinput = $app->input; @@ -70,55 +70,52 @@ class JFormFieldLibraries extends JFormFieldList $ref .= '&return=' . $_return; $refJ .= '&return=' . $_return; } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object $user = JFactory::getUser(); // only add if user allowed to create library if ($user->authorise('library.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' '; } // only add if user allowed to edit library - if (($buttonName === 'library' || $buttonName === 'libraries') && $user->authorise('library.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('library.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; // build script $script[] = " jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - function ".$buttonName."Button(value) { + function ".$button_code_name."Button(value) { if (value > 0) { // hide the create button - jQuery('#".$buttonName."Create').hide(); + jQuery('#".$button_code_name."Create').hide(); // show edit button - jQuery('#".$buttonName."Edit').show(); + jQuery('#".$button_code_name."Edit').show(); var url = 'index.php?option=com_componentbuilder&view=libraries&task=library.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); + jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button - jQuery('#".$buttonName."Create').show(); + jQuery('#".$button_code_name."Create').show(); // hide edit button - jQuery('#".$buttonName."Edit').hide(); + jQuery('#".$button_code_name."Edit').hide(); } }"; } diff --git a/admin/models/fields/librariesx.php b/admin/models/fields/librariesx.php index 4846fa031..963cf17d0 100644 --- a/admin/models/fields/librariesx.php +++ b/admin/models/fields/librariesx.php @@ -38,15 +38,15 @@ class JFormFieldLibrariesx extends JFormFieldList protected function getInput() { // see if we should add buttons - $setButton = $this->getAttribute('button'); + $set_button = $this->getAttribute('button'); // get html $html = parent::getInput(); // if true set button - if ($setButton === 'true') + if ($set_button === 'true') { $button = array(); $script = array(); - $buttonName = $this->getAttribute('name'); + $button_code_name = $this->getAttribute('name'); // get the input from url $app = JFactory::getApplication(); $jinput = $app->input; @@ -70,55 +70,52 @@ class JFormFieldLibrariesx extends JFormFieldList $ref .= '&return=' . $_return; $refJ .= '&return=' . $_return; } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object $user = JFactory::getUser(); // only add if user allowed to create library if ($user->authorise('library.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' '; } // only add if user allowed to edit library - if (($buttonName === 'library' || $buttonName === 'libraries') && $user->authorise('library.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('library.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; // build script $script[] = " jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - function ".$buttonName."Button(value) { + function ".$button_code_name."Button(value) { if (value > 0) { // hide the create button - jQuery('#".$buttonName."Create').hide(); + jQuery('#".$button_code_name."Create').hide(); // show edit button - jQuery('#".$buttonName."Edit').show(); + jQuery('#".$button_code_name."Edit').show(); var url = 'index.php?option=com_componentbuilder&view=libraries&task=library.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); + jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button - jQuery('#".$buttonName."Create').show(); + jQuery('#".$button_code_name."Create').show(); // hide edit button - jQuery('#".$buttonName."Edit').hide(); + jQuery('#".$button_code_name."Edit').hide(); } }"; } diff --git a/admin/models/fields/library.php b/admin/models/fields/library.php index 98d37479b..98ae99b44 100644 --- a/admin/models/fields/library.php +++ b/admin/models/fields/library.php @@ -38,15 +38,15 @@ class JFormFieldLibrary extends JFormFieldList protected function getInput() { // see if we should add buttons - $setButton = $this->getAttribute('button'); + $set_button = $this->getAttribute('button'); // get html $html = parent::getInput(); // if true set button - if ($setButton === 'true') + if ($set_button === 'true') { $button = array(); $script = array(); - $buttonName = $this->getAttribute('name'); + $button_code_name = $this->getAttribute('name'); // get the input from url $app = JFactory::getApplication(); $jinput = $app->input; @@ -70,55 +70,52 @@ class JFormFieldLibrary extends JFormFieldList $ref .= '&return=' . $_return; $refJ .= '&return=' . $_return; } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object $user = JFactory::getUser(); // only add if user allowed to create library if ($user->authorise('library.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' '; } // only add if user allowed to edit library - if (($buttonName === 'library' || $buttonName === 'libraries') && $user->authorise('library.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('library.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; // build script $script[] = " jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - function ".$buttonName."Button(value) { + function ".$button_code_name."Button(value) { if (value > 0) { // hide the create button - jQuery('#".$buttonName."Create').hide(); + jQuery('#".$button_code_name."Create').hide(); // show edit button - jQuery('#".$buttonName."Edit').show(); + jQuery('#".$button_code_name."Edit').show(); var url = 'index.php?option=com_componentbuilder&view=libraries&task=library.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); + jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button - jQuery('#".$buttonName."Create').show(); + jQuery('#".$button_code_name."Create').show(); // hide edit button - jQuery('#".$buttonName."Edit').hide(); + jQuery('#".$button_code_name."Edit').hide(); } }"; } diff --git a/admin/models/fields/maingets.php b/admin/models/fields/maingets.php index fd4dbedb8..bdf871525 100644 --- a/admin/models/fields/maingets.php +++ b/admin/models/fields/maingets.php @@ -38,15 +38,15 @@ class JFormFieldMaingets extends JFormFieldList protected function getInput() { // see if we should add buttons - $setButton = $this->getAttribute('button'); + $set_button = $this->getAttribute('button'); // get html $html = parent::getInput(); // if true set button - if ($setButton === 'true') + if ($set_button === 'true') { $button = array(); $script = array(); - $buttonName = $this->getAttribute('name'); + $button_code_name = $this->getAttribute('name'); // get the input from url $app = JFactory::getApplication(); $jinput = $app->input; @@ -70,55 +70,52 @@ class JFormFieldMaingets extends JFormFieldList $ref .= '&return=' . $_return; $refJ .= '&return=' . $_return; } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object $user = JFactory::getUser(); // only add if user allowed to create dynamic_get if ($user->authorise('dynamic_get.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' '; } // only add if user allowed to edit dynamic_get - if (($buttonName === 'dynamic_get' || $buttonName === 'dynamic_gets') && $user->authorise('dynamic_get.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('dynamic_get.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; // build script $script[] = " jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - function ".$buttonName."Button(value) { + function ".$button_code_name."Button(value) { if (value > 0) { // hide the create button - jQuery('#".$buttonName."Create').hide(); + jQuery('#".$button_code_name."Create').hide(); // show edit button - jQuery('#".$buttonName."Edit').show(); + jQuery('#".$button_code_name."Edit').show(); var url = 'index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); + jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button - jQuery('#".$buttonName."Create').show(); + jQuery('#".$button_code_name."Create').show(); // hide edit button - jQuery('#".$buttonName."Edit').hide(); + jQuery('#".$button_code_name."Edit').hide(); } }"; } diff --git a/admin/models/fields/servers.php b/admin/models/fields/servers.php index 4b919abb3..8e565392d 100644 --- a/admin/models/fields/servers.php +++ b/admin/models/fields/servers.php @@ -38,15 +38,15 @@ class JFormFieldServers extends JFormFieldList protected function getInput() { // see if we should add buttons - $setButton = $this->getAttribute('button'); + $set_button = $this->getAttribute('button'); // get html $html = parent::getInput(); // if true set button - if ($setButton === 'true') + if ($set_button === 'true') { $button = array(); $script = array(); - $buttonName = $this->getAttribute('name'); + $button_code_name = $this->getAttribute('name'); // get the input from url $app = JFactory::getApplication(); $jinput = $app->input; @@ -70,55 +70,52 @@ class JFormFieldServers extends JFormFieldList $ref .= '&return=' . $_return; $refJ .= '&return=' . $_return; } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object $user = JFactory::getUser(); // only add if user allowed to create server if ($user->authorise('server.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' '; } // only add if user allowed to edit server - if (($buttonName === 'server' || $buttonName === 'servers') && $user->authorise('server.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('server.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; // build script $script[] = " jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - function ".$buttonName."Button(value) { + function ".$button_code_name."Button(value) { if (value > 0) { // hide the create button - jQuery('#".$buttonName."Create').hide(); + jQuery('#".$button_code_name."Create').hide(); // show edit button - jQuery('#".$buttonName."Edit').show(); + jQuery('#".$button_code_name."Edit').show(); var url = 'index.php?option=com_componentbuilder&view=servers&task=server.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); + jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button - jQuery('#".$buttonName."Create').show(); + jQuery('#".$button_code_name."Create').show(); // hide edit button - jQuery('#".$buttonName."Edit').hide(); + jQuery('#".$button_code_name."Edit').hide(); } }"; } diff --git a/admin/models/fields/snippets.php b/admin/models/fields/snippets.php index 9ca601511..d5c46f2fb 100644 --- a/admin/models/fields/snippets.php +++ b/admin/models/fields/snippets.php @@ -38,15 +38,15 @@ class JFormFieldSnippets extends JFormFieldList protected function getInput() { // see if we should add buttons - $setButton = $this->getAttribute('button'); + $set_button = $this->getAttribute('button'); // get html $html = parent::getInput(); // if true set button - if ($setButton === 'true') + if ($set_button === 'true') { $button = array(); $script = array(); - $buttonName = $this->getAttribute('name'); + $button_code_name = $this->getAttribute('name'); // get the input from url $app = JFactory::getApplication(); $jinput = $app->input; @@ -70,55 +70,52 @@ class JFormFieldSnippets extends JFormFieldList $ref .= '&return=' . $_return; $refJ .= '&return=' . $_return; } + // get button label + $button_label = trim($button_code_name); + $button_label = preg_replace('/_+/', ' ', $button_label); + $button_label = preg_replace('/\s+/', ' ', $button_label); + $button_label = preg_replace("/[^A-Za-z ]/", '', $button_label); + $button_label = ucfirst(strtolower($button_label)); + // get user object $user = JFactory::getUser(); // only add if user allowed to create snippet if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build Create button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ' '; } // only add if user allowed to edit snippet - if (($buttonName === 'snippet' || $buttonName === 'snippets') && $user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. + if ($user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area. { // build edit button - $buttonNamee = trim($buttonName); - $buttonNamee = preg_replace('/_+/', ' ', $buttonNamee); - $buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee); - $buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee); - $buttonNamee = ucfirst(strtolower($buttonNamee)); - $button[] = ''; // build script $script[] = " jQuery(document).ready(function() { - jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) { + jQuery('#adminForm').on('change', '#jform_".$button_code_name."',function (e) { e.preventDefault(); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val(); - ".$buttonName."Button(".$buttonName."Value); + var ".$button_code_name."Value = jQuery('#jform_".$button_code_name."').val(); + ".$button_code_name."Button(".$button_code_name."Value); }); - function ".$buttonName."Button(value) { + function ".$button_code_name."Button(value) { if (value > 0) { // hide the create button - jQuery('#".$buttonName."Create').hide(); + jQuery('#".$button_code_name."Create').hide(); // show edit button - jQuery('#".$buttonName."Edit').show(); + jQuery('#".$button_code_name."Edit').show(); var url = 'index.php?option=com_componentbuilder&view=snippets&task=snippet.edit&id='+value+'".$refJ."'; - jQuery('#".$buttonName."Edit').attr('href', url); + jQuery('#".$button_code_name."Edit').attr('href', url); } else { // show the create button - jQuery('#".$buttonName."Create').show(); + jQuery('#".$button_code_name."Create').show(); // hide edit button - jQuery('#".$buttonName."Edit').hide(); + jQuery('#".$button_code_name."Edit').hide(); } }"; } diff --git a/admin/models/fields/viewtabs.php b/admin/models/fields/viewtabs.php index 8fda47d15..1fec7ef29 100644 --- a/admin/models/fields/viewtabs.php +++ b/admin/models/fields/viewtabs.php @@ -35,7 +35,7 @@ class JFormFieldViewtabs extends JFormFieldList */ protected function getOptions() { - // get the input from url + // get the input from url $jinput = JFactory::getApplication()->input; // get the view name & id $fieldsID = $jinput->getInt('id', 0); @@ -77,14 +77,19 @@ class JFormFieldViewtabs extends JFormFieldList if (isset($item->addtabs) && ComponentbuilderHelper::checkJson($item->addtabs)) { $items = json_decode($item->addtabs, true); - $nr = 1; - foreach($items as $itemName) + // check if the array has values + if (ComponentbuilderHelper::checkArray($items)) { - $options[] = JHtml::_('select.option', $nr, $itemName['name']); - $nr++; + $nr = 1; + foreach($items as $itemName) + { + $options[] = JHtml::_('select.option', $nr, $itemName['name']); + $nr++; + } } } - else + // check if any were loaded + if (!ComponentbuilderHelper::checkArray($options)) { $options[] = JHtml::_('select.option', 1, JText::_('COM_COMPONENTBUILDER_DETAILS')); } diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 6a2d0300e..8e12d7c13 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -18,13 +18,54 @@ use Joomla\Registry\Registry; * Componentbuilder Fieldtype Model */ class ComponentbuilderModelFieldtype extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'catid', + 'short_description' + ), + 'right' => array( + 'description' + ), + 'fullwidth' => array( + 'note_on_fields', + 'properties', + 'not_required' + ), + 'above' => array( + 'name' + ) + ), + 'database_defaults' => array( + 'left' => array( + 'has_defaults', + 'datatype', + 'datalenght', + 'datalenght_other', + 'datadefault', + 'datadefault_other' + ), + 'right' => array( + 'indexes', + 'null_switch', + 'store', + 'note_whmcs_encryption' + ) + ) + ); + /** * @var string The prefix to use with controller messages. * @since 1.6 */ protected $text_prefix = 'COM_COMPONENTBUILDER'; - + /** * The type alias for this content type. * @@ -52,10 +93,17 @@ class ComponentbuilderModelFieldtype extends JModelAdmin return JTable::getInstance($type, $prefix, $config); } + /** + * get VDM session key + * + * @return string the session key + * + */ public function getVDM() { return $this->vastDevMod; } + /** * Method to get a single record. @@ -155,7 +203,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getWapfields() + public function getWarfields() { // Get the user object. $user = JFactory::getUser(); @@ -237,13 +285,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationWapfields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationWarfields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationWapfields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationWarfields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationWapfields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationWarfields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationWapfields($item->store, 'store'); + $item->store = $this->selectionTranslationWarfields($item->store, 'store'); } } @@ -257,7 +305,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return translatable string */ - public function selectionTranslationWapfields($value,$name) + public function selectionTranslationWarfields($value,$name) { // Array of datatype language strings if ($name === 'datatype') diff --git a/admin/models/forms/admin_custom_tabs.xml b/admin/models/forms/admin_custom_tabs.xml index 02991f1d7..786c03827 100644 --- a/admin/models/forms/admin_custom_tabs.xml +++ b/admin/models/forms/admin_custom_tabs.xml @@ -119,7 +119,6 @@ class="fieldMedium" multiple="false" default="1" - required="false" button="false" /> @@ -130,7 +129,6 @@ description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_POSITION_DESCRIPTION" class="list_class" multiple="false" - required="false" default="1"> diff --git a/admin/models/forms/admin_fields_conditions.xml b/admin/models/forms/admin_fields_conditions.xml index e86813520..44257b742 100644 --- a/admin/models/forms/admin_fields_conditions.xml +++ b/admin/models/forms/admin_fields_conditions.xml @@ -118,7 +118,7 @@ class="fieldMedium" multiple="true" default="" - required="false" + required="true" button="false" /> @@ -130,7 +130,7 @@ class="list_class" multiple="false" filter="INT" - required="false" + required="true" default="1"> + COM_COMPONENTBUILDER_ADMIN_VIEW_NO + + + + + + + + + + + + + + +
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/custom_admin_view.xml b/admin/models/forms/custom_admin_view.xml index 8dd317152..a358eef46 100644 --- a/admin/models/forms/custom_admin_view.xml +++ b/admin/models/forms/custom_admin_view.xml @@ -405,7 +405,7 @@ class="text_area" readonly="false" disabled="false" - required="false" + required="true" filter="STRING" message="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_VALUE_NAME_MESSAGE" hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_VALUE_NAME_HINT" @@ -421,7 +421,7 @@ class="text_area" readonly="false" disabled="false" - required="false" + required="true" filter="WORD" message="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_TASK_NAME_MESSAGE" hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_TASK_NAME_HINT" @@ -438,7 +438,7 @@ class="text_area" readonly="false" disabled="false" - required="false" + required="true" filter="STRING" message="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_INPUT_DEFAULT_MESSAGE" hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_INPUT_DEFAULT_HINT" @@ -452,7 +452,7 @@ class="list_class" multiple="false" filter="WORD" - required="false" + required="true" default="INT"> diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js index 03abec751..8791d8d4f 100644 --- a/admin/models/forms/field.js +++ b/admin/models/forms/field.js @@ -9,61 +9,61 @@ */ // Some Global Values -jform_vvvvwarwaa_required = false; -jform_vvvvwaswab_required = false; jform_vvvvwatwac_required = false; jform_vvvvwauwad_required = false; -jform_vvvvwaxwae_required = false; -jform_vvvvwaywaf_required = false; +jform_vvvvwavwae_required = false; +jform_vvvvwawwaf_required = false; jform_vvvvwazwag_required = false; jform_vvvvwbawah_required = false; +jform_vvvvwbbwai_required = false; +jform_vvvvwbcwaj_required = false; // Initial Script jQuery(document).ready(function() { - var datalenght_vvvvwar = jQuery("#jform_datalenght").val(); - vvvvwar(datalenght_vvvvwar); + var datalenght_vvvvwat = jQuery("#jform_datalenght").val(); + vvvvwat(datalenght_vvvvwat); - var datadefault_vvvvwas = jQuery("#jform_datadefault").val(); - vvvvwas(datadefault_vvvvwas); + var datadefault_vvvvwau = jQuery("#jform_datadefault").val(); + vvvvwau(datadefault_vvvvwau); - var datatype_vvvvwat = jQuery("#jform_datatype").val(); - vvvvwat(datatype_vvvvwat); - - var datatype_vvvvwau = jQuery("#jform_datatype").val(); - vvvvwau(datatype_vvvvwau); - - var store_vvvvwav = jQuery("#jform_store").val(); var datatype_vvvvwav = jQuery("#jform_datatype").val(); - vvvvwav(store_vvvvwav,datatype_vvvvwav); + vvvvwav(datatype_vvvvwav); - var add_css_view_vvvvwax = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvwax(add_css_view_vvvvwax); + var datatype_vvvvwaw = jQuery("#jform_datatype").val(); + vvvvwaw(datatype_vvvvwaw); - var add_css_views_vvvvway = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvway(add_css_views_vvvvway); + var store_vvvvwax = jQuery("#jform_store").val(); + var datatype_vvvvwax = jQuery("#jform_datatype").val(); + vvvvwax(store_vvvvwax,datatype_vvvvwax); - var add_javascript_view_footer_vvvvwaz = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvwaz(add_javascript_view_footer_vvvvwaz); + var add_css_view_vvvvwaz = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvwaz(add_css_view_vvvvwaz); - var add_javascript_views_footer_vvvvwba = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvwba(add_javascript_views_footer_vvvvwba); + var add_css_views_vvvvwba = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvwba(add_css_views_vvvvwba); + + var add_javascript_view_footer_vvvvwbb = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvwbb(add_javascript_view_footer_vvvvwbb); + + var add_javascript_views_footer_vvvvwbc = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvwbc(add_javascript_views_footer_vvvvwbc); }); -// the vvvvwar function -function vvvvwar(datalenght_vvvvwar) +// the vvvvwat function +function vvvvwat(datalenght_vvvvwat) { - if (isSet(datalenght_vvvvwar) && datalenght_vvvvwar.constructor !== Array) + if (isSet(datalenght_vvvvwat) && datalenght_vvvvwat.constructor !== Array) { - var temp_vvvvwar = datalenght_vvvvwar; - var datalenght_vvvvwar = []; - datalenght_vvvvwar.push(temp_vvvvwar); + var temp_vvvvwat = datalenght_vvvvwat; + var datalenght_vvvvwat = []; + datalenght_vvvvwat.push(temp_vvvvwat); } - else if (!isSet(datalenght_vvvvwar)) + else if (!isSet(datalenght_vvvvwat)) { - var datalenght_vvvvwar = []; + var datalenght_vvvvwat = []; } - var datalenght = datalenght_vvvvwar.some(datalenght_vvvvwar_SomeFunc); + var datalenght = datalenght_vvvvwat.some(datalenght_vvvvwat_SomeFunc); // set this function logic @@ -71,151 +71,35 @@ function vvvvwar(datalenght_vvvvwar) { jQuery('#jform_datalenght_other').closest('.control-group').show(); // add required attribute to datalenght_other field - if (jform_vvvvwarwaa_required) + if (jform_vvvvwatwac_required) { updateFieldRequired('datalenght_other',0); jQuery('#jform_datalenght_other').prop('required','required'); jQuery('#jform_datalenght_other').attr('aria-required',true); jQuery('#jform_datalenght_other').addClass('required'); - jform_vvvvwarwaa_required = false; + jform_vvvvwatwac_required = false; } } else { jQuery('#jform_datalenght_other').closest('.control-group').hide(); // remove required attribute from datalenght_other field - if (!jform_vvvvwarwaa_required) + if (!jform_vvvvwatwac_required) { updateFieldRequired('datalenght_other',1); jQuery('#jform_datalenght_other').removeAttr('required'); jQuery('#jform_datalenght_other').removeAttr('aria-required'); jQuery('#jform_datalenght_other').removeClass('required'); - jform_vvvvwarwaa_required = true; - } - } -} - -// the vvvvwar Some function -function datalenght_vvvvwar_SomeFunc(datalenght_vvvvwar) -{ - // set the function logic - if (datalenght_vvvvwar == 'Other') - { - return true; - } - return false; -} - -// the vvvvwas function -function vvvvwas(datadefault_vvvvwas) -{ - if (isSet(datadefault_vvvvwas) && datadefault_vvvvwas.constructor !== Array) - { - var temp_vvvvwas = datadefault_vvvvwas; - var datadefault_vvvvwas = []; - datadefault_vvvvwas.push(temp_vvvvwas); - } - else if (!isSet(datadefault_vvvvwas)) - { - var datadefault_vvvvwas = []; - } - var datadefault = datadefault_vvvvwas.some(datadefault_vvvvwas_SomeFunc); - - - // set this function logic - if (datadefault) - { - jQuery('#jform_datadefault_other').closest('.control-group').show(); - // add required attribute to datadefault_other field - if (jform_vvvvwaswab_required) - { - updateFieldRequired('datadefault_other',0); - jQuery('#jform_datadefault_other').prop('required','required'); - jQuery('#jform_datadefault_other').attr('aria-required',true); - jQuery('#jform_datadefault_other').addClass('required'); - jform_vvvvwaswab_required = false; - } - } - else - { - jQuery('#jform_datadefault_other').closest('.control-group').hide(); - // remove required attribute from datadefault_other field - if (!jform_vvvvwaswab_required) - { - updateFieldRequired('datadefault_other',1); - jQuery('#jform_datadefault_other').removeAttr('required'); - jQuery('#jform_datadefault_other').removeAttr('aria-required'); - jQuery('#jform_datadefault_other').removeClass('required'); - jform_vvvvwaswab_required = true; - } - } -} - -// the vvvvwas Some function -function datadefault_vvvvwas_SomeFunc(datadefault_vvvvwas) -{ - // set the function logic - if (datadefault_vvvvwas == 'Other') - { - return true; - } - return false; -} - -// the vvvvwat function -function vvvvwat(datatype_vvvvwat) -{ - if (isSet(datatype_vvvvwat) && datatype_vvvvwat.constructor !== Array) - { - var temp_vvvvwat = datatype_vvvvwat; - var datatype_vvvvwat = []; - datatype_vvvvwat.push(temp_vvvvwat); - } - else if (!isSet(datatype_vvvvwat)) - { - var datatype_vvvvwat = []; - } - var datatype = datatype_vvvvwat.some(datatype_vvvvwat_SomeFunc); - - - // set this function logic - if (datatype) - { - jQuery('#jform_datadefault').closest('.control-group').show(); - jQuery('#jform_datalenght').closest('.control-group').show(); - jQuery('#jform_indexes').closest('.control-group').show(); - // add required attribute to indexes field - if (jform_vvvvwatwac_required) - { - updateFieldRequired('indexes',0); - jQuery('#jform_indexes').prop('required','required'); - jQuery('#jform_indexes').attr('aria-required',true); - jQuery('#jform_indexes').addClass('required'); - jform_vvvvwatwac_required = false; - } - } - else - { - jQuery('#jform_datadefault').closest('.control-group').hide(); - jQuery('#jform_datalenght').closest('.control-group').hide(); - jQuery('#jform_indexes').closest('.control-group').hide(); - // remove required attribute from indexes field - if (!jform_vvvvwatwac_required) - { - updateFieldRequired('indexes',1); - jQuery('#jform_indexes').removeAttr('required'); - jQuery('#jform_indexes').removeAttr('aria-required'); - jQuery('#jform_indexes').removeClass('required'); jform_vvvvwatwac_required = true; } } } // the vvvvwat Some function -function datatype_vvvvwat_SomeFunc(datatype_vvvvwat) +function datalenght_vvvvwat_SomeFunc(datalenght_vvvvwat) { // set the function logic - if (datatype_vvvvwat == 'CHAR' || datatype_vvvvwat == 'VARCHAR' || datatype_vvvvwat == 'DATETIME' || datatype_vvvvwat == 'DATE' || datatype_vvvvwat == 'TIME' || datatype_vvvvwat == 'INT' || datatype_vvvvwat == 'TINYINT' || datatype_vvvvwat == 'BIGINT' || datatype_vvvvwat == 'FLOAT' || datatype_vvvvwat == 'DECIMAL' || datatype_vvvvwat == 'DOUBLE') + if (datalenght_vvvvwat == 'Other') { return true; } @@ -223,55 +107,55 @@ function datatype_vvvvwat_SomeFunc(datatype_vvvvwat) } // the vvvvwau function -function vvvvwau(datatype_vvvvwau) +function vvvvwau(datadefault_vvvvwau) { - if (isSet(datatype_vvvvwau) && datatype_vvvvwau.constructor !== Array) + if (isSet(datadefault_vvvvwau) && datadefault_vvvvwau.constructor !== Array) { - var temp_vvvvwau = datatype_vvvvwau; - var datatype_vvvvwau = []; - datatype_vvvvwau.push(temp_vvvvwau); + var temp_vvvvwau = datadefault_vvvvwau; + var datadefault_vvvvwau = []; + datadefault_vvvvwau.push(temp_vvvvwau); } - else if (!isSet(datatype_vvvvwau)) + else if (!isSet(datadefault_vvvvwau)) { - var datatype_vvvvwau = []; + var datadefault_vvvvwau = []; } - var datatype = datatype_vvvvwau.some(datatype_vvvvwau_SomeFunc); + var datadefault = datadefault_vvvvwau.some(datadefault_vvvvwau_SomeFunc); // set this function logic - if (datatype) + if (datadefault) { - jQuery('#jform_store').closest('.control-group').show(); - // add required attribute to store field + jQuery('#jform_datadefault_other').closest('.control-group').show(); + // add required attribute to datadefault_other field if (jform_vvvvwauwad_required) { - updateFieldRequired('store',0); - jQuery('#jform_store').prop('required','required'); - jQuery('#jform_store').attr('aria-required',true); - jQuery('#jform_store').addClass('required'); + updateFieldRequired('datadefault_other',0); + jQuery('#jform_datadefault_other').prop('required','required'); + jQuery('#jform_datadefault_other').attr('aria-required',true); + jQuery('#jform_datadefault_other').addClass('required'); jform_vvvvwauwad_required = false; } } else { - jQuery('#jform_store').closest('.control-group').hide(); - // remove required attribute from store field + jQuery('#jform_datadefault_other').closest('.control-group').hide(); + // remove required attribute from datadefault_other field if (!jform_vvvvwauwad_required) { - updateFieldRequired('store',1); - jQuery('#jform_store').removeAttr('required'); - jQuery('#jform_store').removeAttr('aria-required'); - jQuery('#jform_store').removeClass('required'); + updateFieldRequired('datadefault_other',1); + jQuery('#jform_datadefault_other').removeAttr('required'); + jQuery('#jform_datadefault_other').removeAttr('aria-required'); + jQuery('#jform_datadefault_other').removeClass('required'); jform_vvvvwauwad_required = true; } } } // the vvvvwau Some function -function datatype_vvvvwau_SomeFunc(datatype_vvvvwau) +function datadefault_vvvvwau_SomeFunc(datadefault_vvvvwau) { // set the function logic - if (datatype_vvvvwau == 'CHAR' || datatype_vvvvwau == 'VARCHAR' || datatype_vvvvwau == 'TEXT' || datatype_vvvvwau == 'MEDIUMTEXT' || datatype_vvvvwau == 'LONGTEXT' || datatype_vvvvwau == 'BLOB' || datatype_vvvvwau == 'TINYBLOB' || datatype_vvvvwau == 'MEDIUMBLOB' || datatype_vvvvwau == 'LONGBLOB') + if (datadefault_vvvvwau == 'Other') { return true; } @@ -279,20 +163,8 @@ function datatype_vvvvwau_SomeFunc(datatype_vvvvwau) } // the vvvvwav function -function vvvvwav(store_vvvvwav,datatype_vvvvwav) +function vvvvwav(datatype_vvvvwav) { - if (isSet(store_vvvvwav) && store_vvvvwav.constructor !== Array) - { - var temp_vvvvwav = store_vvvvwav; - var store_vvvvwav = []; - store_vvvvwav.push(temp_vvvvwav); - } - else if (!isSet(store_vvvvwav)) - { - var store_vvvvwav = []; - } - var store = store_vvvvwav.some(store_vvvvwav_SomeFunc); - if (isSet(datatype_vvvvwav) && datatype_vvvvwav.constructor !== Array) { var temp_vvvvwav = datatype_vvvvwav; @@ -306,6 +178,134 @@ function vvvvwav(store_vvvvwav,datatype_vvvvwav) var datatype = datatype_vvvvwav.some(datatype_vvvvwav_SomeFunc); + // set this function logic + if (datatype) + { + jQuery('#jform_datadefault').closest('.control-group').show(); + jQuery('#jform_datalenght').closest('.control-group').show(); + jQuery('#jform_indexes').closest('.control-group').show(); + // add required attribute to indexes field + if (jform_vvvvwavwae_required) + { + updateFieldRequired('indexes',0); + jQuery('#jform_indexes').prop('required','required'); + jQuery('#jform_indexes').attr('aria-required',true); + jQuery('#jform_indexes').addClass('required'); + jform_vvvvwavwae_required = false; + } + } + else + { + jQuery('#jform_datadefault').closest('.control-group').hide(); + jQuery('#jform_datalenght').closest('.control-group').hide(); + jQuery('#jform_indexes').closest('.control-group').hide(); + // remove required attribute from indexes field + if (!jform_vvvvwavwae_required) + { + updateFieldRequired('indexes',1); + jQuery('#jform_indexes').removeAttr('required'); + jQuery('#jform_indexes').removeAttr('aria-required'); + jQuery('#jform_indexes').removeClass('required'); + jform_vvvvwavwae_required = true; + } + } +} + +// the vvvvwav Some function +function datatype_vvvvwav_SomeFunc(datatype_vvvvwav) +{ + // set the function logic + if (datatype_vvvvwav == 'CHAR' || datatype_vvvvwav == 'VARCHAR' || datatype_vvvvwav == 'DATETIME' || datatype_vvvvwav == 'DATE' || datatype_vvvvwav == 'TIME' || datatype_vvvvwav == 'INT' || datatype_vvvvwav == 'TINYINT' || datatype_vvvvwav == 'BIGINT' || datatype_vvvvwav == 'FLOAT' || datatype_vvvvwav == 'DECIMAL' || datatype_vvvvwav == 'DOUBLE') + { + return true; + } + return false; +} + +// the vvvvwaw function +function vvvvwaw(datatype_vvvvwaw) +{ + if (isSet(datatype_vvvvwaw) && datatype_vvvvwaw.constructor !== Array) + { + var temp_vvvvwaw = datatype_vvvvwaw; + var datatype_vvvvwaw = []; + datatype_vvvvwaw.push(temp_vvvvwaw); + } + else if (!isSet(datatype_vvvvwaw)) + { + var datatype_vvvvwaw = []; + } + var datatype = datatype_vvvvwaw.some(datatype_vvvvwaw_SomeFunc); + + + // set this function logic + if (datatype) + { + jQuery('#jform_store').closest('.control-group').show(); + // add required attribute to store field + if (jform_vvvvwawwaf_required) + { + updateFieldRequired('store',0); + jQuery('#jform_store').prop('required','required'); + jQuery('#jform_store').attr('aria-required',true); + jQuery('#jform_store').addClass('required'); + jform_vvvvwawwaf_required = false; + } + } + else + { + jQuery('#jform_store').closest('.control-group').hide(); + // remove required attribute from store field + if (!jform_vvvvwawwaf_required) + { + updateFieldRequired('store',1); + jQuery('#jform_store').removeAttr('required'); + jQuery('#jform_store').removeAttr('aria-required'); + jQuery('#jform_store').removeClass('required'); + jform_vvvvwawwaf_required = true; + } + } +} + +// the vvvvwaw Some function +function datatype_vvvvwaw_SomeFunc(datatype_vvvvwaw) +{ + // set the function logic + if (datatype_vvvvwaw == 'CHAR' || datatype_vvvvwaw == 'VARCHAR' || datatype_vvvvwaw == 'TEXT' || datatype_vvvvwaw == 'MEDIUMTEXT' || datatype_vvvvwaw == 'LONGTEXT' || datatype_vvvvwaw == 'BLOB' || datatype_vvvvwaw == 'TINYBLOB' || datatype_vvvvwaw == 'MEDIUMBLOB' || datatype_vvvvwaw == 'LONGBLOB') + { + return true; + } + return false; +} + +// the vvvvwax function +function vvvvwax(store_vvvvwax,datatype_vvvvwax) +{ + if (isSet(store_vvvvwax) && store_vvvvwax.constructor !== Array) + { + var temp_vvvvwax = store_vvvvwax; + var store_vvvvwax = []; + store_vvvvwax.push(temp_vvvvwax); + } + else if (!isSet(store_vvvvwax)) + { + var store_vvvvwax = []; + } + var store = store_vvvvwax.some(store_vvvvwax_SomeFunc); + + if (isSet(datatype_vvvvwax) && datatype_vvvvwax.constructor !== Array) + { + var temp_vvvvwax = datatype_vvvvwax; + var datatype_vvvvwax = []; + datatype_vvvvwax.push(temp_vvvvwax); + } + else if (!isSet(datatype_vvvvwax)) + { + var datatype_vvvvwax = []; + } + var datatype = datatype_vvvvwax.some(datatype_vvvvwax_SomeFunc); + + // set this function logic if (store && datatype) { @@ -317,152 +317,152 @@ function vvvvwav(store_vvvvwav,datatype_vvvvwav) } } -// the vvvvwav Some function -function store_vvvvwav_SomeFunc(store_vvvvwav) +// the vvvvwax Some function +function store_vvvvwax_SomeFunc(store_vvvvwax) { // set the function logic - if (store_vvvvwav == 4) + if (store_vvvvwax == 4) { return true; } return false; } -// the vvvvwav Some function -function datatype_vvvvwav_SomeFunc(datatype_vvvvwav) +// the vvvvwax Some function +function datatype_vvvvwax_SomeFunc(datatype_vvvvwax) { // set the function logic - if (datatype_vvvvwav == 'CHAR' || datatype_vvvvwav == 'VARCHAR' || datatype_vvvvwav == 'TEXT' || datatype_vvvvwav == 'MEDIUMTEXT' || datatype_vvvvwav == 'LONGTEXT' || datatype_vvvvwav == 'BLOB' || datatype_vvvvwav == 'TINYBLOB' || datatype_vvvvwav == 'MEDIUMBLOB' || datatype_vvvvwav == 'LONGBLOB') + if (datatype_vvvvwax == 'CHAR' || datatype_vvvvwax == 'VARCHAR' || datatype_vvvvwax == 'TEXT' || datatype_vvvvwax == 'MEDIUMTEXT' || datatype_vvvvwax == 'LONGTEXT' || datatype_vvvvwax == 'BLOB' || datatype_vvvvwax == 'TINYBLOB' || datatype_vvvvwax == 'MEDIUMBLOB' || datatype_vvvvwax == 'LONGBLOB') { return true; } return false; } -// the vvvvwax function -function vvvvwax(add_css_view_vvvvwax) +// the vvvvwaz function +function vvvvwaz(add_css_view_vvvvwaz) { // set the function logic - if (add_css_view_vvvvwax == 1) + if (add_css_view_vvvvwaz == 1) { jQuery('#jform_css_view-lbl').closest('.control-group').show(); // add required attribute to css_view field - if (jform_vvvvwaxwae_required) + if (jform_vvvvwazwag_required) { updateFieldRequired('css_view',0); jQuery('#jform_css_view').prop('required','required'); jQuery('#jform_css_view').attr('aria-required',true); jQuery('#jform_css_view').addClass('required'); - jform_vvvvwaxwae_required = false; + jform_vvvvwazwag_required = false; } } else { jQuery('#jform_css_view-lbl').closest('.control-group').hide(); // remove required attribute from css_view field - if (!jform_vvvvwaxwae_required) + if (!jform_vvvvwazwag_required) { updateFieldRequired('css_view',1); jQuery('#jform_css_view').removeAttr('required'); jQuery('#jform_css_view').removeAttr('aria-required'); jQuery('#jform_css_view').removeClass('required'); - jform_vvvvwaxwae_required = true; - } - } -} - -// the vvvvway function -function vvvvway(add_css_views_vvvvway) -{ - // set the function logic - if (add_css_views_vvvvway == 1) - { - jQuery('#jform_css_views-lbl').closest('.control-group').show(); - // add required attribute to css_views field - if (jform_vvvvwaywaf_required) - { - updateFieldRequired('css_views',0); - jQuery('#jform_css_views').prop('required','required'); - jQuery('#jform_css_views').attr('aria-required',true); - jQuery('#jform_css_views').addClass('required'); - jform_vvvvwaywaf_required = false; - } - } - else - { - jQuery('#jform_css_views-lbl').closest('.control-group').hide(); - // remove required attribute from css_views field - if (!jform_vvvvwaywaf_required) - { - updateFieldRequired('css_views',1); - jQuery('#jform_css_views').removeAttr('required'); - jQuery('#jform_css_views').removeAttr('aria-required'); - jQuery('#jform_css_views').removeClass('required'); - jform_vvvvwaywaf_required = true; - } - } -} - -// the vvvvwaz function -function vvvvwaz(add_javascript_view_footer_vvvvwaz) -{ - // set the function logic - if (add_javascript_view_footer_vvvvwaz == 1) - { - jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); - // add required attribute to javascript_view_footer field - if (jform_vvvvwazwag_required) - { - updateFieldRequired('javascript_view_footer',0); - jQuery('#jform_javascript_view_footer').prop('required','required'); - jQuery('#jform_javascript_view_footer').attr('aria-required',true); - jQuery('#jform_javascript_view_footer').addClass('required'); - jform_vvvvwazwag_required = false; - } - } - else - { - jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').hide(); - // remove required attribute from javascript_view_footer field - if (!jform_vvvvwazwag_required) - { - updateFieldRequired('javascript_view_footer',1); - jQuery('#jform_javascript_view_footer').removeAttr('required'); - jQuery('#jform_javascript_view_footer').removeAttr('aria-required'); - jQuery('#jform_javascript_view_footer').removeClass('required'); jform_vvvvwazwag_required = true; } } } // the vvvvwba function -function vvvvwba(add_javascript_views_footer_vvvvwba) +function vvvvwba(add_css_views_vvvvwba) { // set the function logic - if (add_javascript_views_footer_vvvvwba == 1) + if (add_css_views_vvvvwba == 1) + { + jQuery('#jform_css_views-lbl').closest('.control-group').show(); + // add required attribute to css_views field + if (jform_vvvvwbawah_required) + { + updateFieldRequired('css_views',0); + jQuery('#jform_css_views').prop('required','required'); + jQuery('#jform_css_views').attr('aria-required',true); + jQuery('#jform_css_views').addClass('required'); + jform_vvvvwbawah_required = false; + } + } + else + { + jQuery('#jform_css_views-lbl').closest('.control-group').hide(); + // remove required attribute from css_views field + if (!jform_vvvvwbawah_required) + { + updateFieldRequired('css_views',1); + jQuery('#jform_css_views').removeAttr('required'); + jQuery('#jform_css_views').removeAttr('aria-required'); + jQuery('#jform_css_views').removeClass('required'); + jform_vvvvwbawah_required = true; + } + } +} + +// the vvvvwbb function +function vvvvwbb(add_javascript_view_footer_vvvvwbb) +{ + // set the function logic + if (add_javascript_view_footer_vvvvwbb == 1) + { + jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); + // add required attribute to javascript_view_footer field + if (jform_vvvvwbbwai_required) + { + updateFieldRequired('javascript_view_footer',0); + jQuery('#jform_javascript_view_footer').prop('required','required'); + jQuery('#jform_javascript_view_footer').attr('aria-required',true); + jQuery('#jform_javascript_view_footer').addClass('required'); + jform_vvvvwbbwai_required = false; + } + } + else + { + jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').hide(); + // remove required attribute from javascript_view_footer field + if (!jform_vvvvwbbwai_required) + { + updateFieldRequired('javascript_view_footer',1); + jQuery('#jform_javascript_view_footer').removeAttr('required'); + jQuery('#jform_javascript_view_footer').removeAttr('aria-required'); + jQuery('#jform_javascript_view_footer').removeClass('required'); + jform_vvvvwbbwai_required = true; + } + } +} + +// the vvvvwbc function +function vvvvwbc(add_javascript_views_footer_vvvvwbc) +{ + // set the function logic + if (add_javascript_views_footer_vvvvwbc == 1) { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show(); // add required attribute to javascript_views_footer field - if (jform_vvvvwbawah_required) + if (jform_vvvvwbcwaj_required) { updateFieldRequired('javascript_views_footer',0); jQuery('#jform_javascript_views_footer').prop('required','required'); jQuery('#jform_javascript_views_footer').attr('aria-required',true); jQuery('#jform_javascript_views_footer').addClass('required'); - jform_vvvvwbawah_required = false; + jform_vvvvwbcwaj_required = false; } } else { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').hide(); // remove required attribute from javascript_views_footer field - if (!jform_vvvvwbawah_required) + if (!jform_vvvvwbcwaj_required) { updateFieldRequired('javascript_views_footer',1); jQuery('#jform_javascript_views_footer').removeAttr('required'); jQuery('#jform_javascript_views_footer').removeAttr('aria-required'); jQuery('#jform_javascript_views_footer').removeClass('required'); - jform_vvvvwbawah_required = true; + jform_vvvvwbcwaj_required = true; } } } @@ -873,7 +873,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/fieldtype.js b/admin/models/forms/fieldtype.js index 927afbd1a..1c20f92c3 100644 --- a/admin/models/forms/fieldtype.js +++ b/admin/models/forms/fieldtype.js @@ -9,149 +9,70 @@ */ // Some Global Values -jform_vvvvwbbwai_required = false; -jform_vvvvwbdwaj_required = false; -jform_vvvvwbfwak_required = false; -jform_vvvvwbgwal_required = false; +jform_vvvvwbdwak_required = false; +jform_vvvvwbfwal_required = false; jform_vvvvwbhwam_required = false; -jform_vvvvwbmwan_required = false; -jform_vvvvwbmwao_required = false; +jform_vvvvwbiwan_required = false; +jform_vvvvwbjwao_required = false; +jform_vvvvwbowap_required = false; +jform_vvvvwbowaq_required = false; // Initial Script jQuery(document).ready(function() { - var datalenght_vvvvwbb = jQuery("#jform_datalenght").val(); - var has_defaults_vvvvwbb = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbb(datalenght_vvvvwbb,has_defaults_vvvvwbb); - - var datadefault_vvvvwbd = jQuery("#jform_datadefault").val(); + var datalenght_vvvvwbd = jQuery("#jform_datalenght").val(); var has_defaults_vvvvwbd = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbd(datadefault_vvvvwbd,has_defaults_vvvvwbd); + vvvvwbd(datalenght_vvvvwbd,has_defaults_vvvvwbd); - var datatype_vvvvwbf = jQuery("#jform_datatype").val(); + var datadefault_vvvvwbf = jQuery("#jform_datadefault").val(); var has_defaults_vvvvwbf = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbf(datatype_vvvvwbf,has_defaults_vvvvwbf); - - var has_defaults_vvvvwbg = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - var datatype_vvvvwbg = jQuery("#jform_datatype").val(); - vvvvwbg(has_defaults_vvvvwbg,datatype_vvvvwbg); + vvvvwbf(datadefault_vvvvwbf,has_defaults_vvvvwbf); var datatype_vvvvwbh = jQuery("#jform_datatype").val(); var has_defaults_vvvvwbh = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwbh(datatype_vvvvwbh,has_defaults_vvvvwbh); - var store_vvvvwbj = jQuery("#jform_store").val(); + var has_defaults_vvvvwbi = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + var datatype_vvvvwbi = jQuery("#jform_datatype").val(); + vvvvwbi(has_defaults_vvvvwbi,datatype_vvvvwbi); + var datatype_vvvvwbj = jQuery("#jform_datatype").val(); var has_defaults_vvvvwbj = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbj(store_vvvvwbj,datatype_vvvvwbj,has_defaults_vvvvwbj); + vvvvwbj(datatype_vvvvwbj,has_defaults_vvvvwbj); - var datatype_vvvvwbk = jQuery("#jform_datatype").val(); - var store_vvvvwbk = jQuery("#jform_store").val(); - var has_defaults_vvvvwbk = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbk(datatype_vvvvwbk,store_vvvvwbk,has_defaults_vvvvwbk); - - var has_defaults_vvvvwbl = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var store_vvvvwbl = jQuery("#jform_store").val(); var datatype_vvvvwbl = jQuery("#jform_datatype").val(); - vvvvwbl(has_defaults_vvvvwbl,store_vvvvwbl,datatype_vvvvwbl); + var has_defaults_vvvvwbl = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwbl(store_vvvvwbl,datatype_vvvvwbl,has_defaults_vvvvwbl); + var datatype_vvvvwbm = jQuery("#jform_datatype").val(); + var store_vvvvwbm = jQuery("#jform_store").val(); var has_defaults_vvvvwbm = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwbm(has_defaults_vvvvwbm); + vvvvwbm(datatype_vvvvwbm,store_vvvvwbm,has_defaults_vvvvwbm); + + var has_defaults_vvvvwbn = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + var store_vvvvwbn = jQuery("#jform_store").val(); + var datatype_vvvvwbn = jQuery("#jform_datatype").val(); + vvvvwbn(has_defaults_vvvvwbn,store_vvvvwbn,datatype_vvvvwbn); + + var has_defaults_vvvvwbo = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwbo(has_defaults_vvvvwbo); }); -// the vvvvwbb function -function vvvvwbb(datalenght_vvvvwbb,has_defaults_vvvvwbb) -{ - if (isSet(datalenght_vvvvwbb) && datalenght_vvvvwbb.constructor !== Array) - { - var temp_vvvvwbb = datalenght_vvvvwbb; - var datalenght_vvvvwbb = []; - datalenght_vvvvwbb.push(temp_vvvvwbb); - } - else if (!isSet(datalenght_vvvvwbb)) - { - var datalenght_vvvvwbb = []; - } - var datalenght = datalenght_vvvvwbb.some(datalenght_vvvvwbb_SomeFunc); - - if (isSet(has_defaults_vvvvwbb) && has_defaults_vvvvwbb.constructor !== Array) - { - var temp_vvvvwbb = has_defaults_vvvvwbb; - var has_defaults_vvvvwbb = []; - has_defaults_vvvvwbb.push(temp_vvvvwbb); - } - else if (!isSet(has_defaults_vvvvwbb)) - { - var has_defaults_vvvvwbb = []; - } - var has_defaults = has_defaults_vvvvwbb.some(has_defaults_vvvvwbb_SomeFunc); - - - // set this function logic - if (datalenght && has_defaults) - { - jQuery('#jform_datalenght_other').closest('.control-group').show(); - // add required attribute to datalenght_other field - if (jform_vvvvwbbwai_required) - { - updateFieldRequired('datalenght_other',0); - jQuery('#jform_datalenght_other').prop('required','required'); - jQuery('#jform_datalenght_other').attr('aria-required',true); - jQuery('#jform_datalenght_other').addClass('required'); - jform_vvvvwbbwai_required = false; - } - } - else - { - jQuery('#jform_datalenght_other').closest('.control-group').hide(); - // remove required attribute from datalenght_other field - if (!jform_vvvvwbbwai_required) - { - updateFieldRequired('datalenght_other',1); - jQuery('#jform_datalenght_other').removeAttr('required'); - jQuery('#jform_datalenght_other').removeAttr('aria-required'); - jQuery('#jform_datalenght_other').removeClass('required'); - jform_vvvvwbbwai_required = true; - } - } -} - -// the vvvvwbb Some function -function datalenght_vvvvwbb_SomeFunc(datalenght_vvvvwbb) -{ - // set the function logic - if (datalenght_vvvvwbb == 'Other') - { - return true; - } - return false; -} - -// the vvvvwbb Some function -function has_defaults_vvvvwbb_SomeFunc(has_defaults_vvvvwbb) -{ - // set the function logic - if (has_defaults_vvvvwbb == 1) - { - return true; - } - return false; -} - // the vvvvwbd function -function vvvvwbd(datadefault_vvvvwbd,has_defaults_vvvvwbd) +function vvvvwbd(datalenght_vvvvwbd,has_defaults_vvvvwbd) { - if (isSet(datadefault_vvvvwbd) && datadefault_vvvvwbd.constructor !== Array) + if (isSet(datalenght_vvvvwbd) && datalenght_vvvvwbd.constructor !== Array) { - var temp_vvvvwbd = datadefault_vvvvwbd; - var datadefault_vvvvwbd = []; - datadefault_vvvvwbd.push(temp_vvvvwbd); + var temp_vvvvwbd = datalenght_vvvvwbd; + var datalenght_vvvvwbd = []; + datalenght_vvvvwbd.push(temp_vvvvwbd); } - else if (!isSet(datadefault_vvvvwbd)) + else if (!isSet(datalenght_vvvvwbd)) { - var datadefault_vvvvwbd = []; + var datalenght_vvvvwbd = []; } - var datadefault = datadefault_vvvvwbd.some(datadefault_vvvvwbd_SomeFunc); + var datalenght = datalenght_vvvvwbd.some(datalenght_vvvvwbd_SomeFunc); if (isSet(has_defaults_vvvvwbd) && has_defaults_vvvvwbd.constructor !== Array) { @@ -167,39 +88,39 @@ function vvvvwbd(datadefault_vvvvwbd,has_defaults_vvvvwbd) // set this function logic - if (datadefault && has_defaults) + if (datalenght && has_defaults) { - jQuery('#jform_datadefault_other').closest('.control-group').show(); - // add required attribute to datadefault_other field - if (jform_vvvvwbdwaj_required) + jQuery('#jform_datalenght_other').closest('.control-group').show(); + // add required attribute to datalenght_other field + if (jform_vvvvwbdwak_required) { - updateFieldRequired('datadefault_other',0); - jQuery('#jform_datadefault_other').prop('required','required'); - jQuery('#jform_datadefault_other').attr('aria-required',true); - jQuery('#jform_datadefault_other').addClass('required'); - jform_vvvvwbdwaj_required = false; + updateFieldRequired('datalenght_other',0); + jQuery('#jform_datalenght_other').prop('required','required'); + jQuery('#jform_datalenght_other').attr('aria-required',true); + jQuery('#jform_datalenght_other').addClass('required'); + jform_vvvvwbdwak_required = false; } } else { - jQuery('#jform_datadefault_other').closest('.control-group').hide(); - // remove required attribute from datadefault_other field - if (!jform_vvvvwbdwaj_required) + jQuery('#jform_datalenght_other').closest('.control-group').hide(); + // remove required attribute from datalenght_other field + if (!jform_vvvvwbdwak_required) { - updateFieldRequired('datadefault_other',1); - jQuery('#jform_datadefault_other').removeAttr('required'); - jQuery('#jform_datadefault_other').removeAttr('aria-required'); - jQuery('#jform_datadefault_other').removeClass('required'); - jform_vvvvwbdwaj_required = true; + updateFieldRequired('datalenght_other',1); + jQuery('#jform_datalenght_other').removeAttr('required'); + jQuery('#jform_datalenght_other').removeAttr('aria-required'); + jQuery('#jform_datalenght_other').removeClass('required'); + jform_vvvvwbdwak_required = true; } } } // the vvvvwbd Some function -function datadefault_vvvvwbd_SomeFunc(datadefault_vvvvwbd) +function datalenght_vvvvwbd_SomeFunc(datalenght_vvvvwbd) { // set the function logic - if (datadefault_vvvvwbd == 'Other') + if (datalenght_vvvvwbd == 'Other') { return true; } @@ -218,19 +139,19 @@ function has_defaults_vvvvwbd_SomeFunc(has_defaults_vvvvwbd) } // the vvvvwbf function -function vvvvwbf(datatype_vvvvwbf,has_defaults_vvvvwbf) +function vvvvwbf(datadefault_vvvvwbf,has_defaults_vvvvwbf) { - if (isSet(datatype_vvvvwbf) && datatype_vvvvwbf.constructor !== Array) + if (isSet(datadefault_vvvvwbf) && datadefault_vvvvwbf.constructor !== Array) { - var temp_vvvvwbf = datatype_vvvvwbf; - var datatype_vvvvwbf = []; - datatype_vvvvwbf.push(temp_vvvvwbf); + var temp_vvvvwbf = datadefault_vvvvwbf; + var datadefault_vvvvwbf = []; + datadefault_vvvvwbf.push(temp_vvvvwbf); } - else if (!isSet(datatype_vvvvwbf)) + else if (!isSet(datadefault_vvvvwbf)) { - var datatype_vvvvwbf = []; + var datadefault_vvvvwbf = []; } - var datatype = datatype_vvvvwbf.some(datatype_vvvvwbf_SomeFunc); + var datadefault = datadefault_vvvvwbf.some(datadefault_vvvvwbf_SomeFunc); if (isSet(has_defaults_vvvvwbf) && has_defaults_vvvvwbf.constructor !== Array) { @@ -246,43 +167,39 @@ function vvvvwbf(datatype_vvvvwbf,has_defaults_vvvvwbf) // set this function logic - if (datatype && has_defaults) + if (datadefault && has_defaults) { - jQuery('#jform_datadefault').closest('.control-group').show(); - jQuery('#jform_datalenght').closest('.control-group').show(); - jQuery('#jform_indexes').closest('.control-group').show(); - // add required attribute to indexes field - if (jform_vvvvwbfwak_required) + jQuery('#jform_datadefault_other').closest('.control-group').show(); + // add required attribute to datadefault_other field + if (jform_vvvvwbfwal_required) { - updateFieldRequired('indexes',0); - jQuery('#jform_indexes').prop('required','required'); - jQuery('#jform_indexes').attr('aria-required',true); - jQuery('#jform_indexes').addClass('required'); - jform_vvvvwbfwak_required = false; + updateFieldRequired('datadefault_other',0); + jQuery('#jform_datadefault_other').prop('required','required'); + jQuery('#jform_datadefault_other').attr('aria-required',true); + jQuery('#jform_datadefault_other').addClass('required'); + jform_vvvvwbfwal_required = false; } } else { - jQuery('#jform_datadefault').closest('.control-group').hide(); - jQuery('#jform_datalenght').closest('.control-group').hide(); - jQuery('#jform_indexes').closest('.control-group').hide(); - // remove required attribute from indexes field - if (!jform_vvvvwbfwak_required) + jQuery('#jform_datadefault_other').closest('.control-group').hide(); + // remove required attribute from datadefault_other field + if (!jform_vvvvwbfwal_required) { - updateFieldRequired('indexes',1); - jQuery('#jform_indexes').removeAttr('required'); - jQuery('#jform_indexes').removeAttr('aria-required'); - jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwbfwak_required = true; + updateFieldRequired('datadefault_other',1); + jQuery('#jform_datadefault_other').removeAttr('required'); + jQuery('#jform_datadefault_other').removeAttr('aria-required'); + jQuery('#jform_datadefault_other').removeClass('required'); + jform_vvvvwbfwal_required = true; } } } // the vvvvwbf Some function -function datatype_vvvvwbf_SomeFunc(datatype_vvvvwbf) +function datadefault_vvvvwbf_SomeFunc(datadefault_vvvvwbf) { // set the function logic - if (datatype_vvvvwbf == 'CHAR' || datatype_vvvvwbf == 'VARCHAR' || datatype_vvvvwbf == 'DATETIME' || datatype_vvvvwbf == 'DATE' || datatype_vvvvwbf == 'TIME' || datatype_vvvvwbf == 'INT' || datatype_vvvvwbf == 'TINYINT' || datatype_vvvvwbf == 'BIGINT' || datatype_vvvvwbf == 'FLOAT' || datatype_vvvvwbf == 'DECIMAL' || datatype_vvvvwbf == 'DOUBLE') + if (datadefault_vvvvwbf == 'Other') { return true; } @@ -300,89 +217,6 @@ function has_defaults_vvvvwbf_SomeFunc(has_defaults_vvvvwbf) return false; } -// the vvvvwbg function -function vvvvwbg(has_defaults_vvvvwbg,datatype_vvvvwbg) -{ - if (isSet(has_defaults_vvvvwbg) && has_defaults_vvvvwbg.constructor !== Array) - { - var temp_vvvvwbg = has_defaults_vvvvwbg; - var has_defaults_vvvvwbg = []; - has_defaults_vvvvwbg.push(temp_vvvvwbg); - } - else if (!isSet(has_defaults_vvvvwbg)) - { - var has_defaults_vvvvwbg = []; - } - var has_defaults = has_defaults_vvvvwbg.some(has_defaults_vvvvwbg_SomeFunc); - - if (isSet(datatype_vvvvwbg) && datatype_vvvvwbg.constructor !== Array) - { - var temp_vvvvwbg = datatype_vvvvwbg; - var datatype_vvvvwbg = []; - datatype_vvvvwbg.push(temp_vvvvwbg); - } - else if (!isSet(datatype_vvvvwbg)) - { - var datatype_vvvvwbg = []; - } - var datatype = datatype_vvvvwbg.some(datatype_vvvvwbg_SomeFunc); - - - // set this function logic - if (has_defaults && datatype) - { - jQuery('#jform_datadefault').closest('.control-group').show(); - jQuery('#jform_datalenght').closest('.control-group').show(); - jQuery('#jform_indexes').closest('.control-group').show(); - // add required attribute to indexes field - if (jform_vvvvwbgwal_required) - { - updateFieldRequired('indexes',0); - jQuery('#jform_indexes').prop('required','required'); - jQuery('#jform_indexes').attr('aria-required',true); - jQuery('#jform_indexes').addClass('required'); - jform_vvvvwbgwal_required = false; - } - } - else - { - jQuery('#jform_datadefault').closest('.control-group').hide(); - jQuery('#jform_datalenght').closest('.control-group').hide(); - jQuery('#jform_indexes').closest('.control-group').hide(); - // remove required attribute from indexes field - if (!jform_vvvvwbgwal_required) - { - updateFieldRequired('indexes',1); - jQuery('#jform_indexes').removeAttr('required'); - jQuery('#jform_indexes').removeAttr('aria-required'); - jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwbgwal_required = true; - } - } -} - -// the vvvvwbg Some function -function has_defaults_vvvvwbg_SomeFunc(has_defaults_vvvvwbg) -{ - // set the function logic - if (has_defaults_vvvvwbg == 1) - { - return true; - } - return false; -} - -// the vvvvwbg Some function -function datatype_vvvvwbg_SomeFunc(datatype_vvvvwbg) -{ - // set the function logic - if (datatype_vvvvwbg == 'CHAR' || datatype_vvvvwbg == 'VARCHAR' || datatype_vvvvwbg == 'DATETIME' || datatype_vvvvwbg == 'DATE' || datatype_vvvvwbg == 'TIME' || datatype_vvvvwbg == 'INT' || datatype_vvvvwbg == 'TINYINT' || datatype_vvvvwbg == 'BIGINT' || datatype_vvvvwbg == 'FLOAT' || datatype_vvvvwbg == 'DECIMAL' || datatype_vvvvwbg == 'DOUBLE') - { - return true; - } - return false; -} - // the vvvvwbh function function vvvvwbh(datatype_vvvvwbh,has_defaults_vvvvwbh) { @@ -414,27 +248,31 @@ function vvvvwbh(datatype_vvvvwbh,has_defaults_vvvvwbh) // set this function logic if (datatype && has_defaults) { - jQuery('#jform_store').closest('.control-group').show(); - // add required attribute to store field + jQuery('#jform_datadefault').closest('.control-group').show(); + jQuery('#jform_datalenght').closest('.control-group').show(); + jQuery('#jform_indexes').closest('.control-group').show(); + // add required attribute to indexes field if (jform_vvvvwbhwam_required) { - updateFieldRequired('store',0); - jQuery('#jform_store').prop('required','required'); - jQuery('#jform_store').attr('aria-required',true); - jQuery('#jform_store').addClass('required'); + updateFieldRequired('indexes',0); + jQuery('#jform_indexes').prop('required','required'); + jQuery('#jform_indexes').attr('aria-required',true); + jQuery('#jform_indexes').addClass('required'); jform_vvvvwbhwam_required = false; } } else { - jQuery('#jform_store').closest('.control-group').hide(); - // remove required attribute from store field + jQuery('#jform_datadefault').closest('.control-group').hide(); + jQuery('#jform_datalenght').closest('.control-group').hide(); + jQuery('#jform_indexes').closest('.control-group').hide(); + // remove required attribute from indexes field if (!jform_vvvvwbhwam_required) { - updateFieldRequired('store',1); - jQuery('#jform_store').removeAttr('required'); - jQuery('#jform_store').removeAttr('aria-required'); - jQuery('#jform_store').removeClass('required'); + updateFieldRequired('indexes',1); + jQuery('#jform_indexes').removeAttr('required'); + jQuery('#jform_indexes').removeAttr('aria-required'); + jQuery('#jform_indexes').removeClass('required'); jform_vvvvwbhwam_required = true; } } @@ -444,7 +282,7 @@ function vvvvwbh(datatype_vvvvwbh,has_defaults_vvvvwbh) function datatype_vvvvwbh_SomeFunc(datatype_vvvvwbh) { // set the function logic - if (datatype_vvvvwbh == 'CHAR' || datatype_vvvvwbh == 'VARCHAR' || datatype_vvvvwbh == 'TEXT' || datatype_vvvvwbh == 'MEDIUMTEXT' || datatype_vvvvwbh == 'LONGTEXT' || datatype_vvvvwbh == 'BLOB' || datatype_vvvvwbh == 'TINYBLOB' || datatype_vvvvwbh == 'MEDIUMBLOB' || datatype_vvvvwbh == 'LONGBLOB') + if (datatype_vvvvwbh == 'CHAR' || datatype_vvvvwbh == 'VARCHAR' || datatype_vvvvwbh == 'DATETIME' || datatype_vvvvwbh == 'DATE' || datatype_vvvvwbh == 'TIME' || datatype_vvvvwbh == 'INT' || datatype_vvvvwbh == 'TINYINT' || datatype_vvvvwbh == 'BIGINT' || datatype_vvvvwbh == 'FLOAT' || datatype_vvvvwbh == 'DECIMAL' || datatype_vvvvwbh == 'DOUBLE') { return true; } @@ -462,21 +300,92 @@ function has_defaults_vvvvwbh_SomeFunc(has_defaults_vvvvwbh) return false; } -// the vvvvwbj function -function vvvvwbj(store_vvvvwbj,datatype_vvvvwbj,has_defaults_vvvvwbj) +// the vvvvwbi function +function vvvvwbi(has_defaults_vvvvwbi,datatype_vvvvwbi) { - if (isSet(store_vvvvwbj) && store_vvvvwbj.constructor !== Array) + if (isSet(has_defaults_vvvvwbi) && has_defaults_vvvvwbi.constructor !== Array) { - var temp_vvvvwbj = store_vvvvwbj; - var store_vvvvwbj = []; - store_vvvvwbj.push(temp_vvvvwbj); + var temp_vvvvwbi = has_defaults_vvvvwbi; + var has_defaults_vvvvwbi = []; + has_defaults_vvvvwbi.push(temp_vvvvwbi); } - else if (!isSet(store_vvvvwbj)) + else if (!isSet(has_defaults_vvvvwbi)) { - var store_vvvvwbj = []; + var has_defaults_vvvvwbi = []; } - var store = store_vvvvwbj.some(store_vvvvwbj_SomeFunc); + var has_defaults = has_defaults_vvvvwbi.some(has_defaults_vvvvwbi_SomeFunc); + if (isSet(datatype_vvvvwbi) && datatype_vvvvwbi.constructor !== Array) + { + var temp_vvvvwbi = datatype_vvvvwbi; + var datatype_vvvvwbi = []; + datatype_vvvvwbi.push(temp_vvvvwbi); + } + else if (!isSet(datatype_vvvvwbi)) + { + var datatype_vvvvwbi = []; + } + var datatype = datatype_vvvvwbi.some(datatype_vvvvwbi_SomeFunc); + + + // set this function logic + if (has_defaults && datatype) + { + jQuery('#jform_datadefault').closest('.control-group').show(); + jQuery('#jform_datalenght').closest('.control-group').show(); + jQuery('#jform_indexes').closest('.control-group').show(); + // add required attribute to indexes field + if (jform_vvvvwbiwan_required) + { + updateFieldRequired('indexes',0); + jQuery('#jform_indexes').prop('required','required'); + jQuery('#jform_indexes').attr('aria-required',true); + jQuery('#jform_indexes').addClass('required'); + jform_vvvvwbiwan_required = false; + } + } + else + { + jQuery('#jform_datadefault').closest('.control-group').hide(); + jQuery('#jform_datalenght').closest('.control-group').hide(); + jQuery('#jform_indexes').closest('.control-group').hide(); + // remove required attribute from indexes field + if (!jform_vvvvwbiwan_required) + { + updateFieldRequired('indexes',1); + jQuery('#jform_indexes').removeAttr('required'); + jQuery('#jform_indexes').removeAttr('aria-required'); + jQuery('#jform_indexes').removeClass('required'); + jform_vvvvwbiwan_required = true; + } + } +} + +// the vvvvwbi Some function +function has_defaults_vvvvwbi_SomeFunc(has_defaults_vvvvwbi) +{ + // set the function logic + if (has_defaults_vvvvwbi == 1) + { + return true; + } + return false; +} + +// the vvvvwbi Some function +function datatype_vvvvwbi_SomeFunc(datatype_vvvvwbi) +{ + // set the function logic + if (datatype_vvvvwbi == 'CHAR' || datatype_vvvvwbi == 'VARCHAR' || datatype_vvvvwbi == 'DATETIME' || datatype_vvvvwbi == 'DATE' || datatype_vvvvwbi == 'TIME' || datatype_vvvvwbi == 'INT' || datatype_vvvvwbi == 'TINYINT' || datatype_vvvvwbi == 'BIGINT' || datatype_vvvvwbi == 'FLOAT' || datatype_vvvvwbi == 'DECIMAL' || datatype_vvvvwbi == 'DOUBLE') + { + return true; + } + return false; +} + +// the vvvvwbj function +function vvvvwbj(datatype_vvvvwbj,has_defaults_vvvvwbj) +{ if (isSet(datatype_vvvvwbj) && datatype_vvvvwbj.constructor !== Array) { var temp_vvvvwbj = datatype_vvvvwbj; @@ -503,27 +412,34 @@ function vvvvwbj(store_vvvvwbj,datatype_vvvvwbj,has_defaults_vvvvwbj) // set this function logic - if (store && datatype && has_defaults) + if (datatype && has_defaults) { - jQuery('.note_whmcs_encryption').closest('.control-group').show(); + jQuery('#jform_store').closest('.control-group').show(); + // add required attribute to store field + if (jform_vvvvwbjwao_required) + { + updateFieldRequired('store',0); + jQuery('#jform_store').prop('required','required'); + jQuery('#jform_store').attr('aria-required',true); + jQuery('#jform_store').addClass('required'); + jform_vvvvwbjwao_required = false; + } } else { - jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + jQuery('#jform_store').closest('.control-group').hide(); + // remove required attribute from store field + if (!jform_vvvvwbjwao_required) + { + updateFieldRequired('store',1); + jQuery('#jform_store').removeAttr('required'); + jQuery('#jform_store').removeAttr('aria-required'); + jQuery('#jform_store').removeClass('required'); + jform_vvvvwbjwao_required = true; + } } } -// the vvvvwbj Some function -function store_vvvvwbj_SomeFunc(store_vvvvwbj) -{ - // set the function logic - if (store_vvvvwbj == 4) - { - return true; - } - return false; -} - // the vvvvwbj Some function function datatype_vvvvwbj_SomeFunc(datatype_vvvvwbj) { @@ -546,105 +462,9 @@ function has_defaults_vvvvwbj_SomeFunc(has_defaults_vvvvwbj) return false; } -// the vvvvwbk function -function vvvvwbk(datatype_vvvvwbk,store_vvvvwbk,has_defaults_vvvvwbk) -{ - if (isSet(datatype_vvvvwbk) && datatype_vvvvwbk.constructor !== Array) - { - var temp_vvvvwbk = datatype_vvvvwbk; - var datatype_vvvvwbk = []; - datatype_vvvvwbk.push(temp_vvvvwbk); - } - else if (!isSet(datatype_vvvvwbk)) - { - var datatype_vvvvwbk = []; - } - var datatype = datatype_vvvvwbk.some(datatype_vvvvwbk_SomeFunc); - - if (isSet(store_vvvvwbk) && store_vvvvwbk.constructor !== Array) - { - var temp_vvvvwbk = store_vvvvwbk; - var store_vvvvwbk = []; - store_vvvvwbk.push(temp_vvvvwbk); - } - else if (!isSet(store_vvvvwbk)) - { - var store_vvvvwbk = []; - } - var store = store_vvvvwbk.some(store_vvvvwbk_SomeFunc); - - if (isSet(has_defaults_vvvvwbk) && has_defaults_vvvvwbk.constructor !== Array) - { - var temp_vvvvwbk = has_defaults_vvvvwbk; - var has_defaults_vvvvwbk = []; - has_defaults_vvvvwbk.push(temp_vvvvwbk); - } - else if (!isSet(has_defaults_vvvvwbk)) - { - var has_defaults_vvvvwbk = []; - } - var has_defaults = has_defaults_vvvvwbk.some(has_defaults_vvvvwbk_SomeFunc); - - - // set this function logic - if (datatype && store && has_defaults) - { - jQuery('.note_whmcs_encryption').closest('.control-group').show(); - } - else - { - jQuery('.note_whmcs_encryption').closest('.control-group').hide(); - } -} - -// the vvvvwbk Some function -function datatype_vvvvwbk_SomeFunc(datatype_vvvvwbk) -{ - // set the function logic - if (datatype_vvvvwbk == 'CHAR' || datatype_vvvvwbk == 'VARCHAR' || datatype_vvvvwbk == 'TEXT' || datatype_vvvvwbk == 'MEDIUMTEXT' || datatype_vvvvwbk == 'LONGTEXT' || datatype_vvvvwbk == 'BLOB' || datatype_vvvvwbk == 'TINYBLOB' || datatype_vvvvwbk == 'MEDIUMBLOB' || datatype_vvvvwbk == 'LONGBLOB') - { - return true; - } - return false; -} - -// the vvvvwbk Some function -function store_vvvvwbk_SomeFunc(store_vvvvwbk) -{ - // set the function logic - if (store_vvvvwbk == 4) - { - return true; - } - return false; -} - -// the vvvvwbk Some function -function has_defaults_vvvvwbk_SomeFunc(has_defaults_vvvvwbk) -{ - // set the function logic - if (has_defaults_vvvvwbk == 1) - { - return true; - } - return false; -} - // the vvvvwbl function -function vvvvwbl(has_defaults_vvvvwbl,store_vvvvwbl,datatype_vvvvwbl) +function vvvvwbl(store_vvvvwbl,datatype_vvvvwbl,has_defaults_vvvvwbl) { - if (isSet(has_defaults_vvvvwbl) && has_defaults_vvvvwbl.constructor !== Array) - { - var temp_vvvvwbl = has_defaults_vvvvwbl; - var has_defaults_vvvvwbl = []; - has_defaults_vvvvwbl.push(temp_vvvvwbl); - } - else if (!isSet(has_defaults_vvvvwbl)) - { - var has_defaults_vvvvwbl = []; - } - var has_defaults = has_defaults_vvvvwbl.some(has_defaults_vvvvwbl_SomeFunc); - if (isSet(store_vvvvwbl) && store_vvvvwbl.constructor !== Array) { var temp_vvvvwbl = store_vvvvwbl; @@ -669,9 +489,21 @@ function vvvvwbl(has_defaults_vvvvwbl,store_vvvvwbl,datatype_vvvvwbl) } var datatype = datatype_vvvvwbl.some(datatype_vvvvwbl_SomeFunc); + if (isSet(has_defaults_vvvvwbl) && has_defaults_vvvvwbl.constructor !== Array) + { + var temp_vvvvwbl = has_defaults_vvvvwbl; + var has_defaults_vvvvwbl = []; + has_defaults_vvvvwbl.push(temp_vvvvwbl); + } + else if (!isSet(has_defaults_vvvvwbl)) + { + var has_defaults_vvvvwbl = []; + } + var has_defaults = has_defaults_vvvvwbl.some(has_defaults_vvvvwbl_SomeFunc); + // set this function logic - if (has_defaults && store && datatype) + if (store && datatype && has_defaults) { jQuery('.note_whmcs_encryption').closest('.control-group').show(); } @@ -681,17 +513,6 @@ function vvvvwbl(has_defaults_vvvvwbl,store_vvvvwbl,datatype_vvvvwbl) } } -// the vvvvwbl Some function -function has_defaults_vvvvwbl_SomeFunc(has_defaults_vvvvwbl) -{ - // set the function logic - if (has_defaults_vvvvwbl == 1) - { - return true; - } - return false; -} - // the vvvvwbl Some function function store_vvvvwbl_SomeFunc(store_vvvvwbl) { @@ -714,54 +535,233 @@ function datatype_vvvvwbl_SomeFunc(datatype_vvvvwbl) return false; } +// the vvvvwbl Some function +function has_defaults_vvvvwbl_SomeFunc(has_defaults_vvvvwbl) +{ + // set the function logic + if (has_defaults_vvvvwbl == 1) + { + return true; + } + return false; +} + // the vvvvwbm function -function vvvvwbm(has_defaults_vvvvwbm) +function vvvvwbm(datatype_vvvvwbm,store_vvvvwbm,has_defaults_vvvvwbm) +{ + if (isSet(datatype_vvvvwbm) && datatype_vvvvwbm.constructor !== Array) + { + var temp_vvvvwbm = datatype_vvvvwbm; + var datatype_vvvvwbm = []; + datatype_vvvvwbm.push(temp_vvvvwbm); + } + else if (!isSet(datatype_vvvvwbm)) + { + var datatype_vvvvwbm = []; + } + var datatype = datatype_vvvvwbm.some(datatype_vvvvwbm_SomeFunc); + + if (isSet(store_vvvvwbm) && store_vvvvwbm.constructor !== Array) + { + var temp_vvvvwbm = store_vvvvwbm; + var store_vvvvwbm = []; + store_vvvvwbm.push(temp_vvvvwbm); + } + else if (!isSet(store_vvvvwbm)) + { + var store_vvvvwbm = []; + } + var store = store_vvvvwbm.some(store_vvvvwbm_SomeFunc); + + if (isSet(has_defaults_vvvvwbm) && has_defaults_vvvvwbm.constructor !== Array) + { + var temp_vvvvwbm = has_defaults_vvvvwbm; + var has_defaults_vvvvwbm = []; + has_defaults_vvvvwbm.push(temp_vvvvwbm); + } + else if (!isSet(has_defaults_vvvvwbm)) + { + var has_defaults_vvvvwbm = []; + } + var has_defaults = has_defaults_vvvvwbm.some(has_defaults_vvvvwbm_SomeFunc); + + + // set this function logic + if (datatype && store && has_defaults) + { + jQuery('.note_whmcs_encryption').closest('.control-group').show(); + } + else + { + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + } +} + +// the vvvvwbm Some function +function datatype_vvvvwbm_SomeFunc(datatype_vvvvwbm) +{ + // set the function logic + if (datatype_vvvvwbm == 'CHAR' || datatype_vvvvwbm == 'VARCHAR' || datatype_vvvvwbm == 'TEXT' || datatype_vvvvwbm == 'MEDIUMTEXT' || datatype_vvvvwbm == 'LONGTEXT' || datatype_vvvvwbm == 'BLOB' || datatype_vvvvwbm == 'TINYBLOB' || datatype_vvvvwbm == 'MEDIUMBLOB' || datatype_vvvvwbm == 'LONGBLOB') + { + return true; + } + return false; +} + +// the vvvvwbm Some function +function store_vvvvwbm_SomeFunc(store_vvvvwbm) +{ + // set the function logic + if (store_vvvvwbm == 4) + { + return true; + } + return false; +} + +// the vvvvwbm Some function +function has_defaults_vvvvwbm_SomeFunc(has_defaults_vvvvwbm) { // set the function logic if (has_defaults_vvvvwbm == 1) + { + return true; + } + return false; +} + +// the vvvvwbn function +function vvvvwbn(has_defaults_vvvvwbn,store_vvvvwbn,datatype_vvvvwbn) +{ + if (isSet(has_defaults_vvvvwbn) && has_defaults_vvvvwbn.constructor !== Array) + { + var temp_vvvvwbn = has_defaults_vvvvwbn; + var has_defaults_vvvvwbn = []; + has_defaults_vvvvwbn.push(temp_vvvvwbn); + } + else if (!isSet(has_defaults_vvvvwbn)) + { + var has_defaults_vvvvwbn = []; + } + var has_defaults = has_defaults_vvvvwbn.some(has_defaults_vvvvwbn_SomeFunc); + + if (isSet(store_vvvvwbn) && store_vvvvwbn.constructor !== Array) + { + var temp_vvvvwbn = store_vvvvwbn; + var store_vvvvwbn = []; + store_vvvvwbn.push(temp_vvvvwbn); + } + else if (!isSet(store_vvvvwbn)) + { + var store_vvvvwbn = []; + } + var store = store_vvvvwbn.some(store_vvvvwbn_SomeFunc); + + if (isSet(datatype_vvvvwbn) && datatype_vvvvwbn.constructor !== Array) + { + var temp_vvvvwbn = datatype_vvvvwbn; + var datatype_vvvvwbn = []; + datatype_vvvvwbn.push(temp_vvvvwbn); + } + else if (!isSet(datatype_vvvvwbn)) + { + var datatype_vvvvwbn = []; + } + var datatype = datatype_vvvvwbn.some(datatype_vvvvwbn_SomeFunc); + + + // set this function logic + if (has_defaults && store && datatype) + { + jQuery('.note_whmcs_encryption').closest('.control-group').show(); + } + else + { + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + } +} + +// the vvvvwbn Some function +function has_defaults_vvvvwbn_SomeFunc(has_defaults_vvvvwbn) +{ + // set the function logic + if (has_defaults_vvvvwbn == 1) + { + return true; + } + return false; +} + +// the vvvvwbn Some function +function store_vvvvwbn_SomeFunc(store_vvvvwbn) +{ + // set the function logic + if (store_vvvvwbn == 4) + { + return true; + } + return false; +} + +// the vvvvwbn Some function +function datatype_vvvvwbn_SomeFunc(datatype_vvvvwbn) +{ + // set the function logic + if (datatype_vvvvwbn == 'CHAR' || datatype_vvvvwbn == 'VARCHAR' || datatype_vvvvwbn == 'TEXT' || datatype_vvvvwbn == 'MEDIUMTEXT' || datatype_vvvvwbn == 'LONGTEXT' || datatype_vvvvwbn == 'BLOB' || datatype_vvvvwbn == 'TINYBLOB' || datatype_vvvvwbn == 'MEDIUMBLOB' || datatype_vvvvwbn == 'LONGBLOB') + { + return true; + } + return false; +} + +// the vvvvwbo function +function vvvvwbo(has_defaults_vvvvwbo) +{ + // set the function logic + if (has_defaults_vvvvwbo == 1) { jQuery('#jform_datatype').closest('.control-group').show(); // add required attribute to datatype field - if (jform_vvvvwbmwan_required) + if (jform_vvvvwbowap_required) { updateFieldRequired('datatype',0); jQuery('#jform_datatype').prop('required','required'); jQuery('#jform_datatype').attr('aria-required',true); jQuery('#jform_datatype').addClass('required'); - jform_vvvvwbmwan_required = false; + jform_vvvvwbowap_required = false; } jQuery('#jform_null_switch').closest('.control-group').show(); // add required attribute to null_switch field - if (jform_vvvvwbmwao_required) + if (jform_vvvvwbowaq_required) { updateFieldRequired('null_switch',0); jQuery('#jform_null_switch').prop('required','required'); jQuery('#jform_null_switch').attr('aria-required',true); jQuery('#jform_null_switch').addClass('required'); - jform_vvvvwbmwao_required = false; + jform_vvvvwbowaq_required = false; } } else { jQuery('#jform_datatype').closest('.control-group').hide(); // remove required attribute from datatype field - if (!jform_vvvvwbmwan_required) + if (!jform_vvvvwbowap_required) { updateFieldRequired('datatype',1); jQuery('#jform_datatype').removeAttr('required'); jQuery('#jform_datatype').removeAttr('aria-required'); jQuery('#jform_datatype').removeClass('required'); - jform_vvvvwbmwan_required = true; + jform_vvvvwbowap_required = true; } jQuery('#jform_null_switch').closest('.control-group').hide(); // remove required attribute from null_switch field - if (!jform_vvvvwbmwao_required) + if (!jform_vvvvwbowaq_required) { updateFieldRequired('null_switch',1); jQuery('#jform_null_switch').removeAttr('required'); jQuery('#jform_null_switch').removeAttr('aria-required'); jQuery('#jform_null_switch').removeClass('required'); - jform_vvvvwbmwao_required = true; + jform_vvvvwbowaq_required = true; } } } @@ -829,7 +829,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/fieldtype.xml b/admin/models/forms/fieldtype.xml index 4dfdde50e..d29eef73b 100644 --- a/admin/models/forms/fieldtype.xml +++ b/admin/models/forms/fieldtype.xml @@ -278,7 +278,7 @@ class="text_area" readonly="false" disabled="false" - required="false" + required="true" filter="STRING" message="COM_COMPONENTBUILDER_FIELDTYPE_NAME_MESSAGE" hint="COM_COMPONENTBUILDER_FIELDTYPE_NAME_HINT" @@ -296,7 +296,6 @@ class="text_area span12" filter="RAW" hint="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_HINT" - required="false" /> @@ -314,7 +312,6 @@ name="mandatory" label="COM_COMPONENTBUILDER_FIELDTYPE_MANDATORY_LABEL" value="1" - required="false" description="COM_COMPONENTBUILDER_FIELDTYPE_MANDATORY_DESCRIPTION" class="inputbox" /> @@ -324,7 +321,6 @@ name="translatable" label="COM_COMPONENTBUILDER_FIELDTYPE_TRANSLATABLE_LABEL" value="1" - required="false" description="COM_COMPONENTBUILDER_FIELDTYPE_TRANSLATABLE_DESCRIPTION" class="inputbox" /> @@ -339,7 +335,6 @@ class="text_area" filter="HTML" hint="COM_COMPONENTBUILDER_FIELDTYPE_DESCRIPTION_HINT" - required="false" /> diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index 00eb01004..71a6b21b1 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -9,211 +9,99 @@ */ // Some Global Values -jform_vvvvwbxwba_required = false; -jform_vvvvwbywbb_required = false; jform_vvvvwbzwbc_required = false; jform_vvvvwcawbd_required = false; jform_vvvvwcbwbe_required = false; jform_vvvvwccwbf_required = false; +jform_vvvvwcdwbg_required = false; +jform_vvvvwcewbh_required = false; // Initial Script jQuery(document).ready(function() { - var location_vvvvwbx = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwbx(location_vvvvwbx); + var location_vvvvwbz = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvwbz(location_vvvvwbz); - var location_vvvvwby = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwby(location_vvvvwby); - - var type_vvvvwbz = jQuery("#jform_type").val(); - vvvvwbz(type_vvvvwbz); - - var type_vvvvwca = jQuery("#jform_type").val(); - vvvvwca(type_vvvvwca); + var location_vvvvwca = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvwca(location_vvvvwca); var type_vvvvwcb = jQuery("#jform_type").val(); vvvvwcb(type_vvvvwcb); - var target_vvvvwcc = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvwcc(target_vvvvwcc); + var type_vvvvwcc = jQuery("#jform_type").val(); + vvvvwcc(type_vvvvwcc); + + var type_vvvvwcd = jQuery("#jform_type").val(); + vvvvwcd(type_vvvvwcd); + + var target_vvvvwce = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvwce(target_vvvvwce); }); -// the vvvvwbx function -function vvvvwbx(location_vvvvwbx) +// the vvvvwbz function +function vvvvwbz(location_vvvvwbz) { // set the function logic - if (location_vvvvwbx == 1) + if (location_vvvvwbz == 1) { jQuery('#jform_admin_view').closest('.control-group').show(); // add required attribute to admin_view field - if (jform_vvvvwbxwba_required) + if (jform_vvvvwbzwbc_required) { updateFieldRequired('admin_view',0); jQuery('#jform_admin_view').prop('required','required'); jQuery('#jform_admin_view').attr('aria-required',true); jQuery('#jform_admin_view').addClass('required'); - jform_vvvvwbxwba_required = false; + jform_vvvvwbzwbc_required = false; } } else { jQuery('#jform_admin_view').closest('.control-group').hide(); // remove required attribute from admin_view field - if (!jform_vvvvwbxwba_required) + if (!jform_vvvvwbzwbc_required) { updateFieldRequired('admin_view',1); jQuery('#jform_admin_view').removeAttr('required'); jQuery('#jform_admin_view').removeAttr('aria-required'); jQuery('#jform_admin_view').removeClass('required'); - jform_vvvvwbxwba_required = true; + jform_vvvvwbzwbc_required = true; } } } -// the vvvvwby function -function vvvvwby(location_vvvvwby) +// the vvvvwca function +function vvvvwca(location_vvvvwca) { // set the function logic - if (location_vvvvwby == 2) + if (location_vvvvwca == 2) { jQuery('#jform_site_view').closest('.control-group').show(); // add required attribute to site_view field - if (jform_vvvvwbywbb_required) + if (jform_vvvvwcawbd_required) { updateFieldRequired('site_view',0); jQuery('#jform_site_view').prop('required','required'); jQuery('#jform_site_view').attr('aria-required',true); jQuery('#jform_site_view').addClass('required'); - jform_vvvvwbywbb_required = false; + jform_vvvvwcawbd_required = false; } } else { jQuery('#jform_site_view').closest('.control-group').hide(); // remove required attribute from site_view field - if (!jform_vvvvwbywbb_required) + if (!jform_vvvvwcawbd_required) { updateFieldRequired('site_view',1); jQuery('#jform_site_view').removeAttr('required'); jQuery('#jform_site_view').removeAttr('aria-required'); jQuery('#jform_site_view').removeClass('required'); - jform_vvvvwbywbb_required = true; - } - } -} - -// the vvvvwbz function -function vvvvwbz(type_vvvvwbz) -{ - if (isSet(type_vvvvwbz) && type_vvvvwbz.constructor !== Array) - { - var temp_vvvvwbz = type_vvvvwbz; - var type_vvvvwbz = []; - type_vvvvwbz.push(temp_vvvvwbz); - } - else if (!isSet(type_vvvvwbz)) - { - var type_vvvvwbz = []; - } - var type = type_vvvvwbz.some(type_vvvvwbz_SomeFunc); - - - // set this function logic - if (type) - { - jQuery('#jform_url').closest('.control-group').show(); - // add required attribute to url field - if (jform_vvvvwbzwbc_required) - { - updateFieldRequired('url',0); - jQuery('#jform_url').prop('required','required'); - jQuery('#jform_url').attr('aria-required',true); - jQuery('#jform_url').addClass('required'); - jform_vvvvwbzwbc_required = false; - } - } - else - { - jQuery('#jform_url').closest('.control-group').hide(); - // remove required attribute from url field - if (!jform_vvvvwbzwbc_required) - { - updateFieldRequired('url',1); - jQuery('#jform_url').removeAttr('required'); - jQuery('#jform_url').removeAttr('aria-required'); - jQuery('#jform_url').removeClass('required'); - jform_vvvvwbzwbc_required = true; - } - } -} - -// the vvvvwbz Some function -function type_vvvvwbz_SomeFunc(type_vvvvwbz) -{ - // set the function logic - if (type_vvvvwbz == 3) - { - return true; - } - return false; -} - -// the vvvvwca function -function vvvvwca(type_vvvvwca) -{ - if (isSet(type_vvvvwca) && type_vvvvwca.constructor !== Array) - { - var temp_vvvvwca = type_vvvvwca; - var type_vvvvwca = []; - type_vvvvwca.push(temp_vvvvwca); - } - else if (!isSet(type_vvvvwca)) - { - var type_vvvvwca = []; - } - var type = type_vvvvwca.some(type_vvvvwca_SomeFunc); - - - // set this function logic - if (type) - { - jQuery('#jform_article').closest('.control-group').show(); - // add required attribute to article field - if (jform_vvvvwcawbd_required) - { - updateFieldRequired('article',0); - jQuery('#jform_article').prop('required','required'); - jQuery('#jform_article').attr('aria-required',true); - jQuery('#jform_article').addClass('required'); - jform_vvvvwcawbd_required = false; - } - } - else - { - jQuery('#jform_article').closest('.control-group').hide(); - // remove required attribute from article field - if (!jform_vvvvwcawbd_required) - { - updateFieldRequired('article',1); - jQuery('#jform_article').removeAttr('required'); - jQuery('#jform_article').removeAttr('aria-required'); - jQuery('#jform_article').removeClass('required'); jform_vvvvwcawbd_required = true; } } } -// the vvvvwca Some function -function type_vvvvwca_SomeFunc(type_vvvvwca) -{ - // set the function logic - if (type_vvvvwca == 1) - { - return true; - } - return false; -} - // the vvvvwcb function function vvvvwcb(type_vvvvwcb) { @@ -233,27 +121,27 @@ function vvvvwcb(type_vvvvwcb) // set this function logic if (type) { - jQuery('#jform_content-lbl').closest('.control-group').show(); - // add required attribute to content field + jQuery('#jform_url').closest('.control-group').show(); + // add required attribute to url field if (jform_vvvvwcbwbe_required) { - updateFieldRequired('content',0); - jQuery('#jform_content').prop('required','required'); - jQuery('#jform_content').attr('aria-required',true); - jQuery('#jform_content').addClass('required'); + updateFieldRequired('url',0); + jQuery('#jform_url').prop('required','required'); + jQuery('#jform_url').attr('aria-required',true); + jQuery('#jform_url').addClass('required'); jform_vvvvwcbwbe_required = false; } } else { - jQuery('#jform_content-lbl').closest('.control-group').hide(); - // remove required attribute from content field + jQuery('#jform_url').closest('.control-group').hide(); + // remove required attribute from url field if (!jform_vvvvwcbwbe_required) { - updateFieldRequired('content',1); - jQuery('#jform_content').removeAttr('required'); - jQuery('#jform_content').removeAttr('aria-required'); - jQuery('#jform_content').removeClass('required'); + updateFieldRequired('url',1); + jQuery('#jform_url').removeAttr('required'); + jQuery('#jform_url').removeAttr('aria-required'); + jQuery('#jform_url').removeClass('required'); jform_vvvvwcbwbe_required = true; } } @@ -263,7 +151,7 @@ function vvvvwcb(type_vvvvwcb) function type_vvvvwcb_SomeFunc(type_vvvvwcb) { // set the function logic - if (type_vvvvwcb == 2) + if (type_vvvvwcb == 3) { return true; } @@ -271,33 +159,145 @@ function type_vvvvwcb_SomeFunc(type_vvvvwcb) } // the vvvvwcc function -function vvvvwcc(target_vvvvwcc) +function vvvvwcc(type_vvvvwcc) +{ + if (isSet(type_vvvvwcc) && type_vvvvwcc.constructor !== Array) + { + var temp_vvvvwcc = type_vvvvwcc; + var type_vvvvwcc = []; + type_vvvvwcc.push(temp_vvvvwcc); + } + else if (!isSet(type_vvvvwcc)) + { + var type_vvvvwcc = []; + } + var type = type_vvvvwcc.some(type_vvvvwcc_SomeFunc); + + + // set this function logic + if (type) + { + jQuery('#jform_article').closest('.control-group').show(); + // add required attribute to article field + if (jform_vvvvwccwbf_required) + { + updateFieldRequired('article',0); + jQuery('#jform_article').prop('required','required'); + jQuery('#jform_article').attr('aria-required',true); + jQuery('#jform_article').addClass('required'); + jform_vvvvwccwbf_required = false; + } + } + else + { + jQuery('#jform_article').closest('.control-group').hide(); + // remove required attribute from article field + if (!jform_vvvvwccwbf_required) + { + updateFieldRequired('article',1); + jQuery('#jform_article').removeAttr('required'); + jQuery('#jform_article').removeAttr('aria-required'); + jQuery('#jform_article').removeClass('required'); + jform_vvvvwccwbf_required = true; + } + } +} + +// the vvvvwcc Some function +function type_vvvvwcc_SomeFunc(type_vvvvwcc) { // set the function logic - if (target_vvvvwcc == 1) + if (type_vvvvwcc == 1) + { + return true; + } + return false; +} + +// the vvvvwcd function +function vvvvwcd(type_vvvvwcd) +{ + if (isSet(type_vvvvwcd) && type_vvvvwcd.constructor !== Array) + { + var temp_vvvvwcd = type_vvvvwcd; + var type_vvvvwcd = []; + type_vvvvwcd.push(temp_vvvvwcd); + } + else if (!isSet(type_vvvvwcd)) + { + var type_vvvvwcd = []; + } + var type = type_vvvvwcd.some(type_vvvvwcd_SomeFunc); + + + // set this function logic + if (type) + { + jQuery('#jform_content-lbl').closest('.control-group').show(); + // add required attribute to content field + if (jform_vvvvwcdwbg_required) + { + updateFieldRequired('content',0); + jQuery('#jform_content').prop('required','required'); + jQuery('#jform_content').attr('aria-required',true); + jQuery('#jform_content').addClass('required'); + jform_vvvvwcdwbg_required = false; + } + } + else + { + jQuery('#jform_content-lbl').closest('.control-group').hide(); + // remove required attribute from content field + if (!jform_vvvvwcdwbg_required) + { + updateFieldRequired('content',1); + jQuery('#jform_content').removeAttr('required'); + jQuery('#jform_content').removeAttr('aria-required'); + jQuery('#jform_content').removeClass('required'); + jform_vvvvwcdwbg_required = true; + } + } +} + +// the vvvvwcd Some function +function type_vvvvwcd_SomeFunc(type_vvvvwcd) +{ + // set the function logic + if (type_vvvvwcd == 2) + { + return true; + } + return false; +} + +// the vvvvwce function +function vvvvwce(target_vvvvwce) +{ + // set the function logic + if (target_vvvvwce == 1) { jQuery('#jform_groups').closest('.control-group').show(); // add required attribute to groups field - if (jform_vvvvwccwbf_required) + if (jform_vvvvwcewbh_required) { updateFieldRequired('groups',0); jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').addClass('required'); - jform_vvvvwccwbf_required = false; + jform_vvvvwcewbh_required = false; } } else { jQuery('#jform_groups').closest('.control-group').hide(); // remove required attribute from groups field - if (!jform_vvvvwccwbf_required) + if (!jform_vvvvwcewbh_required) { updateFieldRequired('groups',1); jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeClass('required'); - jform_vvvvwccwbf_required = true; + jform_vvvvwcewbh_required = true; } } } diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js index e0b813187..b8537ce62 100644 --- a/admin/models/forms/joomla_component.js +++ b/admin/models/forms/joomla_component.js @@ -1184,7 +1184,7 @@ function getEditCustomCodeButtons(){ getEditCustomCodeButtons_server(id).done(function(result) { if(isObject(result)){ jQuery.each(result, function( field, buttons ) { - jQuery('
').insertBefore(".control-wrapper-"+ field); + jQuery('
').insertBefore(".control-wrapper-"+ field); jQuery.each(buttons, function( name, button ) { jQuery(".control-customcode-buttons-"+field).append(button); }); diff --git a/admin/models/forms/joomla_component.xml b/admin/models/forms/joomla_component.xml index c9694d13e..2eeedcb3a 100644 --- a/admin/models/forms/joomla_component.xml +++ b/admin/models/forms/joomla_component.xml @@ -1204,7 +1204,7 @@ class="text_area" readonly="false" disabled="false" - required="false" + required="true" filter="STRING" message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_MESSAGE" hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_HINT" @@ -1220,7 +1220,7 @@ class="text_area" readonly="false" disabled="false" - required="false" + required="true" filter="STRING" message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TITLE_MESSAGE" hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TITLE_HINT" @@ -1234,7 +1234,7 @@ maxlength="50" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_DESCRIPTION" class="text_area" - required="false" + required="true" filter="STRING" validate="email" message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_MESSAGE" @@ -1249,7 +1249,6 @@ maxlength="150" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_DESCRIPTION" class="text_area" - required="false" filter="url" validated="url" scheme="http,https" @@ -1264,7 +1263,6 @@ description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_DESCRIPTION" class="fieldMedium" multiple="false" - required="false" default="2">
-
diff --git a/admin/views/admin_fields/tmpl/edit.php b/admin/views/admin_fields/tmpl/edit.php index 3b67bf0c1..278221f6f 100644 --- a/admin/views/admin_fields/tmpl/edit.php +++ b/admin/views/admin_fields/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/admin_fields_conditions/tmpl/edit.php b/admin/views/admin_fields_conditions/tmpl/edit.php index bcf801c43..35293dbf6 100644 --- a/admin/views/admin_fields_conditions/tmpl/edit.php +++ b/admin/views/admin_fields_conditions/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/admin_fields_relations/tmpl/edit.php b/admin/views/admin_fields_relations/tmpl/edit.php index 8c3d119f5..732d6d559 100644 --- a/admin/views/admin_fields_relations/tmpl/edit.php +++ b/admin/views/admin_fields_relations/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php index 5fcfeeae8..16f4ebaea 100644 --- a/admin/views/admin_view/tmpl/edit.php +++ b/admin/views/admin_view/tmpl/edit.php @@ -199,7 +199,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst -
@@ -464,157 +463,153 @@ jQuery('#adminForm').on('change', '#jform_add_php_allowedit',function (e) }); -// #jform_add_php_batchcopy listeners for add_php_batchcopy_vvvvvxs function +// #jform_add_php_before_cancel listeners for add_php_before_cancel_vvvvvxs function +jQuery('#jform_add_php_before_cancel').on('keyup',function() +{ + var add_php_before_cancel_vvvvvxs = jQuery("#jform_add_php_before_cancel input[type='radio']:checked").val(); + vvvvvxs(add_php_before_cancel_vvvvvxs); + +}); +jQuery('#adminForm').on('change', '#jform_add_php_before_cancel',function (e) +{ + e.preventDefault(); + var add_php_before_cancel_vvvvvxs = jQuery("#jform_add_php_before_cancel input[type='radio']:checked").val(); + vvvvvxs(add_php_before_cancel_vvvvvxs); + +}); + +// #jform_add_php_after_cancel listeners for add_php_after_cancel_vvvvvxt function +jQuery('#jform_add_php_after_cancel').on('keyup',function() +{ + var add_php_after_cancel_vvvvvxt = jQuery("#jform_add_php_after_cancel input[type='radio']:checked").val(); + vvvvvxt(add_php_after_cancel_vvvvvxt); + +}); +jQuery('#adminForm').on('change', '#jform_add_php_after_cancel',function (e) +{ + e.preventDefault(); + var add_php_after_cancel_vvvvvxt = jQuery("#jform_add_php_after_cancel input[type='radio']:checked").val(); + vvvvvxt(add_php_after_cancel_vvvvvxt); + +}); + +// #jform_add_php_batchcopy listeners for add_php_batchcopy_vvvvvxu function jQuery('#jform_add_php_batchcopy').on('keyup',function() { - var add_php_batchcopy_vvvvvxs = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); - vvvvvxs(add_php_batchcopy_vvvvvxs); + var add_php_batchcopy_vvvvvxu = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); + vvvvvxu(add_php_batchcopy_vvvvvxu); }); jQuery('#adminForm').on('change', '#jform_add_php_batchcopy',function (e) { e.preventDefault(); - var add_php_batchcopy_vvvvvxs = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); - vvvvvxs(add_php_batchcopy_vvvvvxs); + var add_php_batchcopy_vvvvvxu = jQuery("#jform_add_php_batchcopy input[type='radio']:checked").val(); + vvvvvxu(add_php_batchcopy_vvvvvxu); }); -// #jform_add_php_batchmove listeners for add_php_batchmove_vvvvvxt function +// #jform_add_php_batchmove listeners for add_php_batchmove_vvvvvxv function jQuery('#jform_add_php_batchmove').on('keyup',function() { - var add_php_batchmove_vvvvvxt = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); - vvvvvxt(add_php_batchmove_vvvvvxt); + var add_php_batchmove_vvvvvxv = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); + vvvvvxv(add_php_batchmove_vvvvvxv); }); jQuery('#adminForm').on('change', '#jform_add_php_batchmove',function (e) { e.preventDefault(); - var add_php_batchmove_vvvvvxt = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); - vvvvvxt(add_php_batchmove_vvvvvxt); + var add_php_batchmove_vvvvvxv = jQuery("#jform_add_php_batchmove input[type='radio']:checked").val(); + vvvvvxv(add_php_batchmove_vvvvvxv); }); -// #jform_add_php_before_publish listeners for add_php_before_publish_vvvvvxu function +// #jform_add_php_before_publish listeners for add_php_before_publish_vvvvvxw function jQuery('#jform_add_php_before_publish').on('keyup',function() { - var add_php_before_publish_vvvvvxu = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); - vvvvvxu(add_php_before_publish_vvvvvxu); + var add_php_before_publish_vvvvvxw = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); + vvvvvxw(add_php_before_publish_vvvvvxw); }); jQuery('#adminForm').on('change', '#jform_add_php_before_publish',function (e) { e.preventDefault(); - var add_php_before_publish_vvvvvxu = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); - vvvvvxu(add_php_before_publish_vvvvvxu); + var add_php_before_publish_vvvvvxw = jQuery("#jform_add_php_before_publish input[type='radio']:checked").val(); + vvvvvxw(add_php_before_publish_vvvvvxw); }); -// #jform_add_php_after_publish listeners for add_php_after_publish_vvvvvxv function +// #jform_add_php_after_publish listeners for add_php_after_publish_vvvvvxx function jQuery('#jform_add_php_after_publish').on('keyup',function() { - var add_php_after_publish_vvvvvxv = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); - vvvvvxv(add_php_after_publish_vvvvvxv); + var add_php_after_publish_vvvvvxx = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); + vvvvvxx(add_php_after_publish_vvvvvxx); }); jQuery('#adminForm').on('change', '#jform_add_php_after_publish',function (e) { e.preventDefault(); - var add_php_after_publish_vvvvvxv = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); - vvvvvxv(add_php_after_publish_vvvvvxv); + var add_php_after_publish_vvvvvxx = jQuery("#jform_add_php_after_publish input[type='radio']:checked").val(); + vvvvvxx(add_php_after_publish_vvvvvxx); }); -// #jform_add_php_before_delete listeners for add_php_before_delete_vvvvvxw function +// #jform_add_php_before_delete listeners for add_php_before_delete_vvvvvxy function jQuery('#jform_add_php_before_delete').on('keyup',function() { - var add_php_before_delete_vvvvvxw = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); - vvvvvxw(add_php_before_delete_vvvvvxw); + var add_php_before_delete_vvvvvxy = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); + vvvvvxy(add_php_before_delete_vvvvvxy); }); jQuery('#adminForm').on('change', '#jform_add_php_before_delete',function (e) { e.preventDefault(); - var add_php_before_delete_vvvvvxw = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); - vvvvvxw(add_php_before_delete_vvvvvxw); + var add_php_before_delete_vvvvvxy = jQuery("#jform_add_php_before_delete input[type='radio']:checked").val(); + vvvvvxy(add_php_before_delete_vvvvvxy); }); -// #jform_add_php_after_delete listeners for add_php_after_delete_vvvvvxx function +// #jform_add_php_after_delete listeners for add_php_after_delete_vvvvvxz function jQuery('#jform_add_php_after_delete').on('keyup',function() { - var add_php_after_delete_vvvvvxx = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); - vvvvvxx(add_php_after_delete_vvvvvxx); + var add_php_after_delete_vvvvvxz = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); + vvvvvxz(add_php_after_delete_vvvvvxz); }); jQuery('#adminForm').on('change', '#jform_add_php_after_delete',function (e) { e.preventDefault(); - var add_php_after_delete_vvvvvxx = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); - vvvvvxx(add_php_after_delete_vvvvvxx); + var add_php_after_delete_vvvvvxz = jQuery("#jform_add_php_after_delete input[type='radio']:checked").val(); + vvvvvxz(add_php_after_delete_vvvvvxz); }); -// #jform_add_php_document listeners for add_php_document_vvvvvxy function +// #jform_add_php_document listeners for add_php_document_vvvvvya function jQuery('#jform_add_php_document').on('keyup',function() { - var add_php_document_vvvvvxy = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvxy(add_php_document_vvvvvxy); + var add_php_document_vvvvvya = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvya(add_php_document_vvvvvya); }); jQuery('#adminForm').on('change', '#jform_add_php_document',function (e) { e.preventDefault(); - var add_php_document_vvvvvxy = jQuery("#jform_add_php_document input[type='radio']:checked").val(); - vvvvvxy(add_php_document_vvvvvxy); + var add_php_document_vvvvvya = jQuery("#jform_add_php_document input[type='radio']:checked").val(); + vvvvvya(add_php_document_vvvvvya); }); -// #jform_add_sql listeners for add_sql_vvvvvxz function +// #jform_add_sql listeners for add_sql_vvvvvyb function jQuery('#jform_add_sql').on('keyup',function() { - var add_sql_vvvvvxz = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvxz(add_sql_vvvvvxz); + var add_sql_vvvvvyb = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvyb(add_sql_vvvvvyb); }); jQuery('#adminForm').on('change', '#jform_add_sql',function (e) { e.preventDefault(); - var add_sql_vvvvvxz = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvxz(add_sql_vvvvvxz); - -}); - -// #jform_source listeners for source_vvvvvya function -jQuery('#jform_source').on('keyup',function() -{ - var source_vvvvvya = jQuery("#jform_source input[type='radio']:checked").val(); - var add_sql_vvvvvya = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvya(source_vvvvvya,add_sql_vvvvvya); - -}); -jQuery('#adminForm').on('change', '#jform_source',function (e) -{ - e.preventDefault(); - var source_vvvvvya = jQuery("#jform_source input[type='radio']:checked").val(); - var add_sql_vvvvvya = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvya(source_vvvvvya,add_sql_vvvvvya); - -}); - -// #jform_add_sql listeners for add_sql_vvvvvya function -jQuery('#jform_add_sql').on('keyup',function() -{ - var source_vvvvvya = jQuery("#jform_source input[type='radio']:checked").val(); - var add_sql_vvvvvya = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvya(source_vvvvvya,add_sql_vvvvvya); - -}); -jQuery('#adminForm').on('change', '#jform_add_sql',function (e) -{ - e.preventDefault(); - var source_vvvvvya = jQuery("#jform_source input[type='radio']:checked").val(); - var add_sql_vvvvvya = jQuery("#jform_add_sql input[type='radio']:checked").val(); - vvvvvya(source_vvvvvya,add_sql_vvvvvya); + var add_sql_vvvvvyb = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvyb(add_sql_vvvvvyb); }); @@ -652,48 +647,82 @@ jQuery('#adminForm').on('change', '#jform_add_sql',function (e) }); -// #jform_add_custom_import listeners for add_custom_import_vvvvvye function +// #jform_source listeners for source_vvvvvye function +jQuery('#jform_source').on('keyup',function() +{ + var source_vvvvvye = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvye = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvye(source_vvvvvye,add_sql_vvvvvye); + +}); +jQuery('#adminForm').on('change', '#jform_source',function (e) +{ + e.preventDefault(); + var source_vvvvvye = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvye = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvye(source_vvvvvye,add_sql_vvvvvye); + +}); + +// #jform_add_sql listeners for add_sql_vvvvvye function +jQuery('#jform_add_sql').on('keyup',function() +{ + var source_vvvvvye = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvye = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvye(source_vvvvvye,add_sql_vvvvvye); + +}); +jQuery('#adminForm').on('change', '#jform_add_sql',function (e) +{ + e.preventDefault(); + var source_vvvvvye = jQuery("#jform_source input[type='radio']:checked").val(); + var add_sql_vvvvvye = jQuery("#jform_add_sql input[type='radio']:checked").val(); + vvvvvye(source_vvvvvye,add_sql_vvvvvye); + +}); + +// #jform_add_custom_import listeners for add_custom_import_vvvvvyg function jQuery('#jform_add_custom_import').on('keyup',function() { - var add_custom_import_vvvvvye = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); - vvvvvye(add_custom_import_vvvvvye); + var add_custom_import_vvvvvyg = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); + vvvvvyg(add_custom_import_vvvvvyg); }); jQuery('#adminForm').on('change', '#jform_add_custom_import',function (e) { e.preventDefault(); - var add_custom_import_vvvvvye = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); - vvvvvye(add_custom_import_vvvvvye); + var add_custom_import_vvvvvyg = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); + vvvvvyg(add_custom_import_vvvvvyg); }); -// #jform_add_custom_import listeners for add_custom_import_vvvvvyf function +// #jform_add_custom_import listeners for add_custom_import_vvvvvyh function jQuery('#jform_add_custom_import').on('keyup',function() { - var add_custom_import_vvvvvyf = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); - vvvvvyf(add_custom_import_vvvvvyf); + var add_custom_import_vvvvvyh = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); + vvvvvyh(add_custom_import_vvvvvyh); }); jQuery('#adminForm').on('change', '#jform_add_custom_import',function (e) { e.preventDefault(); - var add_custom_import_vvvvvyf = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); - vvvvvyf(add_custom_import_vvvvvyf); + var add_custom_import_vvvvvyh = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); + vvvvvyh(add_custom_import_vvvvvyh); }); -// #jform_add_custom_button listeners for add_custom_button_vvvvvyg function +// #jform_add_custom_button listeners for add_custom_button_vvvvvyi function jQuery('#jform_add_custom_button').on('keyup',function() { - var add_custom_button_vvvvvyg = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvyg(add_custom_button_vvvvvyg); + var add_custom_button_vvvvvyi = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvyi(add_custom_button_vvvvvyi); }); jQuery('#adminForm').on('change', '#jform_add_custom_button',function (e) { e.preventDefault(); - var add_custom_button_vvvvvyg = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); - vvvvvyg(add_custom_button_vvvvvyg); + var add_custom_button_vvvvvyi = jQuery("#jform_add_custom_button input[type='radio']:checked").val(); + vvvvvyi(add_custom_button_vvvvvyi); }); diff --git a/admin/views/admin_views/view.html.php b/admin/views/admin_views/view.html.php index fa4c172f9..9305b34f5 100644 --- a/admin/views/admin_views/view.html.php +++ b/admin/views/admin_views/view.html.php @@ -193,7 +193,15 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy // Set Add Fadein Selection $this->add_fadeinOptions = $this->getTheAdd_fadeinSelections(); - if ($this->add_fadeinOptions) + // We do some sanitation for Add Fadein filter + if (ComponentbuilderHelper::checkArray($this->add_fadeinOptions) && + isset($this->add_fadeinOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->add_fadeinOptions[0]->value)) + { + unset($this->add_fadeinOptions[0]); + } + // Only load Add Fadein filter if it has values + if (ComponentbuilderHelper::checkArray($this->add_fadeinOptions)) { // Add Fadein Filter JHtmlSidebar::addFilter( @@ -213,31 +221,17 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy } } - // Set Type Selection - $this->typeOptions = $this->getTheTypeSelections(); - if ($this->typeOptions) - { - // Type Filter - JHtmlSidebar::addFilter( - '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL').' -', - 'filter_type', - JHtml::_('select.options', $this->typeOptions, 'value', 'text', $this->state->get('filter.type')) - ); - - if ($this->canBatch && $this->canCreate && $this->canEdit) - { - // Type Batch Selection - JHtmlBatch_::addListSelection( - '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL').' -', - 'batch[type]', - JHtml::_('select.options', $this->typeOptions, 'value', 'text') - ); - } - } - // Set Add Custom Import Selection $this->add_custom_importOptions = $this->getTheAdd_custom_importSelections(); - if ($this->add_custom_importOptions) + // We do some sanitation for Add Custom Import filter + if (ComponentbuilderHelper::checkArray($this->add_custom_importOptions) && + isset($this->add_custom_importOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->add_custom_importOptions[0]->value)) + { + unset($this->add_custom_importOptions[0]); + } + // Only load Add Custom Import filter if it has values + if (ComponentbuilderHelper::checkArray($this->add_custom_importOptions)) { // Add Custom Import Filter JHtmlSidebar::addFilter( @@ -257,9 +251,47 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy } } + // Set Type Selection + $this->typeOptions = $this->getTheTypeSelections(); + // We do some sanitation for Type filter + if (ComponentbuilderHelper::checkArray($this->typeOptions) && + isset($this->typeOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->typeOptions[0]->value)) + { + unset($this->typeOptions[0]); + } + // Only load Type filter if it has values + if (ComponentbuilderHelper::checkArray($this->typeOptions)) + { + // Type Filter + JHtmlSidebar::addFilter( + '- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL').' -', + 'filter_type', + JHtml::_('select.options', $this->typeOptions, 'value', 'text', $this->state->get('filter.type')) + ); + + if ($this->canBatch && $this->canCreate && $this->canEdit) + { + // Type Batch Selection + JHtmlBatch_::addListSelection( + '- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL').' -', + 'batch[type]', + JHtml::_('select.options', $this->typeOptions, 'value', 'text') + ); + } + } + // Set Add Custom Button Selection $this->add_custom_buttonOptions = $this->getTheAdd_custom_buttonSelections(); - if ($this->add_custom_buttonOptions) + // We do some sanitation for Add Custom Button filter + if (ComponentbuilderHelper::checkArray($this->add_custom_buttonOptions) && + isset($this->add_custom_buttonOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->add_custom_buttonOptions[0]->value)) + { + unset($this->add_custom_buttonOptions[0]); + } + // Only load Add Custom Button filter if it has values + if (ComponentbuilderHelper::checkArray($this->add_custom_buttonOptions)) { // Add Custom Button Filter JHtmlSidebar::addFilter( @@ -281,7 +313,15 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy // Set Add Php Ajax Selection $this->add_php_ajaxOptions = $this->getTheAdd_php_ajaxSelections(); - if ($this->add_php_ajaxOptions) + // We do some sanitation for Add Php Ajax filter + if (ComponentbuilderHelper::checkArray($this->add_php_ajaxOptions) && + isset($this->add_php_ajaxOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->add_php_ajaxOptions[0]->value)) + { + unset($this->add_php_ajaxOptions[0]); + } + // Only load Add Php Ajax filter if it has values + if (ComponentbuilderHelper::checkArray($this->add_php_ajaxOptions)) { // Add Php Ajax Filter JHtmlSidebar::addFilter( @@ -388,42 +428,6 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy return false; } - protected function getTheTypeSelections() - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Select the text. - $query->select($db->quoteName('type')); - $query->from($db->quoteName('#__componentbuilder_admin_view')); - $query->order($db->quoteName('type') . ' ASC'); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - - $results = $db->loadColumn(); - - if ($results) - { - // get model - $model = $this->getModel(); - $results = array_unique($results); - $_filter = array(); - foreach ($results as $type) - { - // Translate the type selection - $text = $model->selectionTranslation($type,'type'); - // Now add the type and its text to the options array - $_filter[] = JHtml::_('select.option', $type, JText::_($text)); - } - return $_filter; - } - return false; - } - protected function getTheAdd_custom_importSelections() { // Get a db connection. @@ -460,6 +464,42 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy return false; } + protected function getTheTypeSelections() + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Select the text. + $query->select($db->quoteName('type')); + $query->from($db->quoteName('#__componentbuilder_admin_view')); + $query->order($db->quoteName('type') . ' ASC'); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + + $results = $db->loadColumn(); + + if ($results) + { + // get model + $model = $this->getModel(); + $results = array_unique($results); + $_filter = array(); + foreach ($results as $type) + { + // Translate the type selection + $text = $model->selectionTranslation($type,'type'); + // Now add the type and its text to the options array + $_filter[] = JHtml::_('select.option', $type, JText::_($text)); + } + return $_filter; + } + return false; + } + protected function getTheAdd_custom_buttonSelections() { // Get a db connection. diff --git a/admin/views/component_admin_views/tmpl/edit.php b/admin/views/component_admin_views/tmpl/edit.php index 2d2638c9b..6cd2c6d48 100644 --- a/admin/views/component_admin_views/tmpl/edit.php +++ b/admin/views/component_admin_views/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_config/tmpl/edit.php b/admin/views/component_config/tmpl/edit.php index 146a68db6..656539340 100644 --- a/admin/views/component_config/tmpl/edit.php +++ b/admin/views/component_config/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_custom_admin_menus/tmpl/edit.php b/admin/views/component_custom_admin_menus/tmpl/edit.php index 94a52643e..a6c005b35 100644 --- a/admin/views/component_custom_admin_menus/tmpl/edit.php +++ b/admin/views/component_custom_admin_menus/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_custom_admin_views/tmpl/edit.php b/admin/views/component_custom_admin_views/tmpl/edit.php index d07f1067a..b62b5dcee 100644 --- a/admin/views/component_custom_admin_views/tmpl/edit.php +++ b/admin/views/component_custom_admin_views/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_dashboard/tmpl/edit.php b/admin/views/component_dashboard/tmpl/edit.php index fc324dda5..6fbb3b9eb 100644 --- a/admin/views/component_dashboard/tmpl/edit.php +++ b/admin/views/component_dashboard/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_files_folders/tmpl/edit.php b/admin/views/component_files_folders/tmpl/edit.php index 6a9c79eb6..1879c399a 100644 --- a/admin/views/component_files_folders/tmpl/edit.php +++ b/admin/views/component_files_folders/tmpl/edit.php @@ -111,7 +111,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_mysql_tweaks/tmpl/edit.php b/admin/views/component_mysql_tweaks/tmpl/edit.php index 67ac00d4b..9970e017b 100644 --- a/admin/views/component_mysql_tweaks/tmpl/edit.php +++ b/admin/views/component_mysql_tweaks/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_placeholders/tmpl/edit.php b/admin/views/component_placeholders/tmpl/edit.php index 0e7bcb08f..351192dcf 100644 --- a/admin/views/component_placeholders/tmpl/edit.php +++ b/admin/views/component_placeholders/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_site_views/tmpl/edit.php b/admin/views/component_site_views/tmpl/edit.php index b1027db93..536689b42 100644 --- a/admin/views/component_site_views/tmpl/edit.php +++ b/admin/views/component_site_views/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/component_updates/tmpl/edit.php b/admin/views/component_updates/tmpl/edit.php index e839286b4..4e44499ba 100644 --- a/admin/views/component_updates/tmpl/edit.php +++ b/admin/views/component_updates/tmpl/edit.php @@ -101,7 +101,6 @@ $componentParams = $this->params; // will be removed just use $this->params inst - diff --git a/admin/views/custom_admin_view/tmpl/edit.php b/admin/views/custom_admin_view/tmpl/edit.php index 6eda4b010..bfb648fda 100644 --- a/admin/views/custom_admin_view/tmpl/edit.php +++ b/admin/views/custom_admin_view/tmpl/edit.php @@ -163,153 +163,153 @@ $componentParams = $this->params; // will be removed just use $this->params inst diff --git a/admin/views/server/view.html.php b/admin/views/server/view.html.php index 1eb8d8b06..0f720c642 100644 --- a/admin/views/server/view.html.php +++ b/admin/views/server/view.html.php @@ -57,7 +57,7 @@ class ComponentbuilderViewServer extends JViewLegacy } // Get Linked view data - $this->wazlinked_components = $this->get('Wazlinked_components'); + $this->wbblinked_components = $this->get('Wbblinked_components'); // Set the toolbar $this->addToolBar(); diff --git a/admin/views/servers/view.html.php b/admin/views/servers/view.html.php index 809c5ec7b..3f9b21d42 100644 --- a/admin/views/servers/view.html.php +++ b/admin/views/servers/view.html.php @@ -188,7 +188,15 @@ class ComponentbuilderViewServers extends JViewLegacy // Set Name Selection $this->nameOptions = $this->getTheNameSelections(); - if ($this->nameOptions) + // We do some sanitation for Name filter + if (ComponentbuilderHelper::checkArray($this->nameOptions) && + isset($this->nameOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->nameOptions[0]->value)) + { + unset($this->nameOptions[0]); + } + // Only load Name filter if it has values + if (ComponentbuilderHelper::checkArray($this->nameOptions)) { // Name Filter JHtmlSidebar::addFilter( @@ -210,7 +218,15 @@ class ComponentbuilderViewServers extends JViewLegacy // Set Protocol Selection $this->protocolOptions = $this->getTheProtocolSelections(); - if ($this->protocolOptions) + // We do some sanitation for Protocol filter + if (ComponentbuilderHelper::checkArray($this->protocolOptions) && + isset($this->protocolOptions[0]->value) && + !ComponentbuilderHelper::checkString($this->protocolOptions[0]->value)) + { + unset($this->protocolOptions[0]); + } + // Only load Protocol filter if it has values + if (ComponentbuilderHelper::checkArray($this->protocolOptions)) { // Protocol Filter JHtmlSidebar::addFilter( diff --git a/admin/views/site_view/tmpl/edit.php b/admin/views/site_view/tmpl/edit.php index 578119966..87242ca70 100644 --- a/admin/views/site_view/tmpl/edit.php +++ b/admin/views/site_view/tmpl/edit.php @@ -166,168 +166,168 @@ $componentParams = $this->params; // will be removed just use $this->params inst