From b9c758b800a6731c0438743108ab861a04112cf1 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Mon, 1 Jul 2019 18:10:28 +0200 Subject: [PATCH] Added context to all compiler events. Added layout fields override options for dynamic field generation. --- README.md | 4 +- admin/README.txt | 4 +- admin/compiler/joomla_3/JModelAdmin.php | 11 +- admin/compiler/joomla_3/JModelAdmin_site.php | 11 +- admin/compiler/joomla_3/layout.php | 15 +- admin/compiler/joomla_3/layoutfull.php | 15 +- admin/compiler/joomla_3/layoutitems.php | 15 +- admin/compiler/joomla_3/layoutpublished.php | 15 +- admin/compiler/joomla_3/layouttitle.php | 15 +- admin/helpers/compiler.php | 6 +- admin/helpers/compiler/a_Get.php | 26 +-- admin/helpers/compiler/b_Structure.php | 4 +- admin/helpers/compiler/c_Fields.php | 12 +- admin/helpers/compiler/e_Interpretation.php | 62 +++++- admin/helpers/compiler/f_Infusion.php | 27 +-- .../layouts/admin_custom_tabs/publishing.php | 15 +- .../layouts/admin_custom_tabs/publlshing.php | 15 +- .../layouts/admin_custom_tabs/tabs_above.php | 15 +- .../admin_custom_tabs/tabs_fullwidth.php | 15 +- admin/layouts/admin_fields/fields_above.php | 15 +- .../layouts/admin_fields/fields_fullwidth.php | 15 +- admin/layouts/admin_fields/publishing.php | 15 +- admin/layouts/admin_fields/publlshing.php | 15 +- .../conditions_above.php | 15 +- .../conditions_fullwidth.php | 15 +- .../admin_fields_conditions/publishing.php | 15 +- .../admin_fields_conditions/publlshing.php | 15 +- .../admin_fields_relations/publishing.php | 15 +- .../admin_fields_relations/publlshing.php | 15 +- .../relations_above.php | 15 +- .../relations_fullwidth.php | 15 +- admin/layouts/admin_view/css_fullwidth.php | 15 +- .../admin_view/custom_buttons_fullwidth.php | 15 +- .../admin_view/custom_buttons_left.php | 15 +- .../admin_view/custom_import_fullwidth.php | 15 +- admin/layouts/admin_view/details_above.php | 15 +- .../layouts/admin_view/details_fullwidth.php | 15 +- admin/layouts/admin_view/details_left.php | 15 +- admin/layouts/admin_view/details_right.php | 15 +- admin/layouts/admin_view/details_under.php | 15 +- admin/layouts/admin_view/fields_fullwidth.php | 15 +- admin/layouts/admin_view/fields_left.php | 15 +- admin/layouts/admin_view/fields_right.php | 15 +- .../admin_view/javascript_fullwidth.php | 15 +- admin/layouts/admin_view/mysql_fullwidth.php | 15 +- admin/layouts/admin_view/mysql_left.php | 15 +- admin/layouts/admin_view/php_fullwidth.php | 15 +- admin/layouts/admin_view/publishing.php | 15 +- admin/layouts/admin_view/publlshing.php | 15 +- .../layouts/admin_view/settings_fullwidth.php | 15 +- .../component_admin_views/publishing.php | 15 +- .../component_admin_views/publlshing.php | 15 +- .../component_admin_views/views_above.php | 15 +- .../component_admin_views/views_fullwidth.php | 15 +- admin/layouts/component_config/publishing.php | 15 +- admin/layouts/component_config/publlshing.php | 15 +- .../layouts/component_config/tweaks_above.php | 15 +- .../component_config/tweaks_fullwidth.php | 15 +- .../publishing.php | 15 +- .../publlshing.php | 15 +- .../tweaks_above.php | 15 +- .../tweaks_fullwidth.php | 15 +- .../publishing.php | 15 +- .../publlshing.php | 15 +- .../views_above.php | 15 +- .../views_fullwidth.php | 15 +- .../component_dashboard/dashboard_above.php | 15 +- .../dashboard_fullwidth.php | 15 +- .../component_dashboard/publishing.php | 15 +- .../component_dashboard/publlshing.php | 15 +- .../advance_fullwidth.php | 15 +- .../component_files_folders/basic_above.php | 15 +- .../basic_fullwidth.php | 15 +- .../component_files_folders/publishing.php | 15 +- .../component_files_folders/publlshing.php | 15 +- .../component_mysql_tweaks/publishing.php | 15 +- .../component_mysql_tweaks/publlshing.php | 15 +- .../component_mysql_tweaks/tweaks_above.php | 15 +- .../tweaks_fullwidth.php | 15 +- .../component_placeholders/details_above.php | 15 +- .../details_fullwidth.php | 15 +- .../component_placeholders/publishing.php | 15 +- .../component_placeholders/publlshing.php | 15 +- .../component_site_views/publishing.php | 15 +- .../component_site_views/publlshing.php | 15 +- .../component_site_views/views_above.php | 15 +- .../component_site_views/views_fullwidth.php | 15 +- .../layouts/component_updates/publishing.php | 15 +- .../layouts/component_updates/publlshing.php | 15 +- .../component_updates/updates_above.php | 15 +- .../component_updates/updates_fullwidth.php | 15 +- .../custom_buttons_fullwidth.php | 15 +- .../custom_admin_view/custom_buttons_left.php | 15 +- .../custom_admin_view/details_above.php | 15 +- .../custom_admin_view/details_fullwidth.php | 15 +- .../custom_admin_view/details_left.php | 15 +- .../custom_admin_view/details_right.php | 15 +- .../custom_admin_view/details_rightside.php | 15 +- .../custom_admin_view/details_under.php | 15 +- .../javascript_css_fullwidth.php | 15 +- .../linked_components_fullwidth.php | 15 +- .../custom_admin_view/php_fullwidth.php | 15 +- .../layouts/custom_admin_view/publishing.php | 15 +- .../layouts/custom_admin_view/publlshing.php | 15 +- admin/layouts/custom_code/details_above.php | 15 +- .../layouts/custom_code/details_fullwidth.php | 15 +- admin/layouts/custom_code/details_left.php | 15 +- admin/layouts/custom_code/details_right.php | 15 +- admin/layouts/custom_code/details_under.php | 15 +- admin/layouts/custom_code/publishing.php | 15 +- admin/layouts/custom_code/publlshing.php | 15 +- .../layouts/dynamic_get/abacus_fullwidth.php | 15 +- admin/layouts/dynamic_get/abacus_left.php | 15 +- .../dynamic_get/custom_script_fullwidth.php | 15 +- admin/layouts/dynamic_get/joint_fullwidth.php | 15 +- admin/layouts/dynamic_get/main_above.php | 15 +- admin/layouts/dynamic_get/main_fullwidth.php | 15 +- admin/layouts/dynamic_get/main_left.php | 15 +- admin/layouts/dynamic_get/main_right.php | 15 +- admin/layouts/dynamic_get/main_under.php | 15 +- admin/layouts/dynamic_get/publishing.php | 15 +- admin/layouts/dynamic_get/publlshing.php | 15 +- admin/layouts/dynamic_get/tweak_fullwidth.php | 15 +- admin/layouts/field/database_fullwidth.php | 15 +- admin/layouts/field/database_left.php | 15 +- admin/layouts/field/database_right.php | 15 +- admin/layouts/field/publishing.php | 15 +- admin/layouts/field/publlshing.php | 15 +- admin/layouts/field/scripts_left.php | 15 +- admin/layouts/field/scripts_right.php | 15 +- admin/layouts/field/set_properties_above.php | 15 +- .../field/set_properties_fullwidth.php | 15 +- admin/layouts/field/set_properties_under.php | 15 +- admin/layouts/field/type_info_fullwidth.php | 15 +- .../fieldtype/database_defaults_left.php | 15 +- .../fieldtype/database_defaults_right.php | 15 +- admin/layouts/fieldtype/details_above.php | 15 +- admin/layouts/fieldtype/details_fullwidth.php | 15 +- admin/layouts/fieldtype/details_left.php | 15 +- admin/layouts/fieldtype/details_right.php | 15 +- admin/layouts/fieldtype/publishing.php | 15 +- admin/layouts/fieldtype/publlshing.php | 15 +- admin/layouts/help_document/details_above.php | 15 +- .../help_document/details_fullwidth.php | 15 +- admin/layouts/help_document/details_left.php | 15 +- admin/layouts/help_document/details_right.php | 15 +- admin/layouts/help_document/details_under.php | 15 +- admin/layouts/help_document/publishing.php | 15 +- admin/layouts/help_document/publlshing.php | 15 +- .../admin_views_fullwidth.php | 15 +- .../custom_admin_views_fullwidth.php | 15 +- .../dash_install_fullwidth.php | 15 +- .../joomla_component/dash_install_left.php | 15 +- .../joomla_component/dash_install_right.php | 15 +- .../joomla_component/details_above.php | 15 +- .../layouts/joomla_component/details_left.php | 15 +- .../joomla_component/details_right.php | 15 +- .../joomla_component/details_under.php | 15 +- .../dynamic_build_beta_fullwidth.php | 15 +- .../dynamic_integration_left.php | 15 +- .../dynamic_integration_right.php | 15 +- .../libs_helpers_fullwidth.php | 15 +- .../joomla_component/mysql_fullwidth.php | 15 +- admin/layouts/joomla_component/publishing.php | 15 +- .../layouts/joomla_component/readme_left.php | 15 +- .../layouts/joomla_component/readme_right.php | 15 +- .../joomla_component/settings_fullwidth.php | 15 +- .../joomla_component/settings_left.php | 15 +- .../joomla_component/settings_right.php | 15 +- .../joomla_component/site_views_fullwidth.php | 15 +- admin/layouts/language/details_left.php | 15 +- admin/layouts/language/details_right.php | 15 +- admin/layouts/language/publishing.php | 15 +- admin/layouts/language/publlshing.php | 15 +- .../details_fullwidth.php | 15 +- .../language_translation/publishing.php | 15 +- .../language_translation/publlshing.php | 15 +- .../layout/custom_script_fullwidth.php | 15 +- admin/layouts/layout/details_fullwidth.php | 15 +- admin/layouts/layout/details_left.php | 15 +- admin/layouts/layout/details_right.php | 15 +- admin/layouts/layout/details_rightside.php | 15 +- admin/layouts/layout/details_under.php | 15 +- admin/layouts/layout/publishing.php | 15 +- admin/layouts/layout/publlshing.php | 15 +- admin/layouts/library/behaviour_above.php | 15 +- admin/layouts/library/behaviour_fullwidth.php | 15 +- admin/layouts/library/behaviour_left.php | 15 +- admin/layouts/library/behaviour_right.php | 15 +- admin/layouts/library/behaviour_under.php | 15 +- admin/layouts/library/config_fullwidth.php | 15 +- .../library/files_folders_urls_fullwidth.php | 15 +- admin/layouts/library/linked_fullwidth.php | 15 +- admin/layouts/library/publishing.php | 15 +- admin/layouts/library/publlshing.php | 15 +- admin/layouts/library_config/publishing.php | 15 +- admin/layouts/library_config/publlshing.php | 15 +- admin/layouts/library_config/tweaks_above.php | 15 +- .../library_config/tweaks_fullwidth.php | 15 +- .../advance_fullwidth.php | 15 +- .../basic_above.php | 15 +- .../basic_fullwidth.php | 15 +- .../library_files_folders_urls/publishing.php | 15 +- .../library_files_folders_urls/publlshing.php | 15 +- .../layouts/placeholder/details_fullwidth.php | 15 +- admin/layouts/placeholder/details_left.php | 15 +- admin/layouts/placeholder/details_right.php | 15 +- admin/layouts/placeholder/publishing.php | 15 +- admin/layouts/placeholder/publlshing.php | 15 +- admin/layouts/server/details_above.php | 15 +- admin/layouts/server/details_fullwidth.php | 15 +- admin/layouts/server/details_left.php | 15 +- admin/layouts/server/details_right.php | 15 +- admin/layouts/server/publishing.php | 15 +- admin/layouts/server/publlshing.php | 15 +- .../site_view/custom_buttons_fullwidth.php | 15 +- .../layouts/site_view/custom_buttons_left.php | 15 +- .../site_view/custom_buttons_right.php | 15 +- admin/layouts/site_view/details_above.php | 15 +- admin/layouts/site_view/details_fullwidth.php | 15 +- admin/layouts/site_view/details_left.php | 15 +- admin/layouts/site_view/details_right.php | 15 +- admin/layouts/site_view/details_rightside.php | 15 +- admin/layouts/site_view/details_under.php | 15 +- .../site_view/javascript_css_fullwidth.php | 15 +- .../site_view/linked_components_fullwidth.php | 15 +- admin/layouts/site_view/php_fullwidth.php | 15 +- admin/layouts/site_view/publishing.php | 15 +- admin/layouts/site_view/publlshing.php | 15 +- .../layouts/snippet/contributor_fullwidth.php | 15 +- admin/layouts/snippet/contributor_left.php | 15 +- admin/layouts/snippet/contributor_right.php | 15 +- admin/layouts/snippet/details_above.php | 15 +- admin/layouts/snippet/details_left.php | 15 +- admin/layouts/snippet/details_right.php | 15 +- admin/layouts/snippet/publishing.php | 15 +- admin/layouts/snippet/publlshing.php | 15 +- admin/layouts/snippet_type/details_left.php | 15 +- admin/layouts/snippet_type/details_right.php | 15 +- admin/layouts/snippet_type/publishing.php | 15 +- admin/layouts/snippet_type/publlshing.php | 15 +- .../template/custom_script_fullwidth.php | 15 +- admin/layouts/template/details_fullwidth.php | 15 +- admin/layouts/template/details_left.php | 15 +- admin/layouts/template/details_right.php | 15 +- admin/layouts/template/details_rightside.php | 15 +- admin/layouts/template/details_under.php | 15 +- admin/layouts/template/publishing.php | 15 +- admin/layouts/template/publlshing.php | 15 +- .../extends_formrule_above.php | 15 +- .../extends_formrule_fullwidth.php | 15 +- .../validation_rule/extends_formrule_left.php | 15 +- .../extends_formrule_right.php | 15 +- admin/layouts/validation_rule/publishing.php | 15 +- admin/layouts/validation_rule/publlshing.php | 15 +- admin/models/admin_custom_tabs.php | 20 +- admin/models/admin_fields.php | 21 +- admin/models/admin_fields_conditions.php | 21 +- admin/models/admin_fields_relations.php | 21 +- admin/models/admin_view.php | 167 ++++++++++++++- admin/models/component_admin_views.php | 21 +- admin/models/component_config.php | 20 +- admin/models/component_custom_admin_menus.php | 20 +- admin/models/component_custom_admin_views.php | 21 +- admin/models/component_dashboard.php | 21 +- admin/models/component_files_folders.php | 32 ++- admin/models/component_mysql_tweaks.php | 20 +- admin/models/component_placeholders.php | 20 +- admin/models/component_site_views.php | 21 +- admin/models/component_updates.php | 20 +- admin/models/custom_admin_view.php | 86 +++++++- admin/models/custom_code.php | 39 +++- admin/models/dynamic_get.php | 79 +++++++- admin/models/field.php | 65 +++++- admin/models/fieldtype.php | 45 ++++- admin/models/help_document.php | 36 +++- admin/models/joomla_component.php | 190 +++++++++++++++++- admin/models/language.php | 20 +- admin/models/language_translation.php | 19 +- admin/models/layout.php | 43 +++- admin/models/library.php | 56 +++++- admin/models/library_config.php | 20 +- admin/models/library_files_folders_urls.php | 34 +++- admin/models/placeholder.php | 23 ++- admin/models/server.php | 37 +++- admin/models/site_view.php | 89 +++++++- admin/models/snippet.php | 41 +++- admin/models/snippet_type.php | 20 +- admin/models/template.php | 43 +++- admin/models/validation_rule.php | 26 ++- componentbuilder.xml | 2 +- 291 files changed, 4951 insertions(+), 370 deletions(-) diff --git a/README.md b/README.md index 3623fb829..19b30191e 100644 --- a/README.md +++ b/README.md @@ -146,11 +146,11 @@ 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*: 29th June, 2019 ++ *Last Build*: 1st July, 2019 + *Version*: 2.9.20 + *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*: **206973** ++ *Line count*: **211430** + *Field count*: **1142** + *File count*: **1346** + *Folder count*: **209** diff --git a/admin/README.txt b/admin/README.txt index 3623fb829..19b30191e 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -146,11 +146,11 @@ 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*: 29th June, 2019 ++ *Last Build*: 1st July, 2019 + *Version*: 2.9.20 + *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*: **206973** ++ *Line count*: **211430** + *Field count*: **1142** + *File count*: **1346** + *Folder count*: **209** 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/helpers/compiler.php b/admin/helpers/compiler.php index 96a740dd2..94a26fdbb 100644 --- a/admin/helpers/compiler.php +++ b/admin/helpers/compiler.php @@ -254,7 +254,7 @@ class Compiler extends Infusion protected function setFileContent(&$name, &$path, &$bom, $view = null) { // Trigger Event: jcb_ce_onBeforeSetFileContent - $this->triggerEvent('jcb_ce_onBeforeSetFileContent', array(&$name, &$path, &$bom, &$view)); + $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 @@ -266,7 +266,7 @@ class Compiler extends Infusion // get content of the file $string = ComponentbuilderHelper::getFileContents($path); // Trigger Event: jcb_ce_onGetFileContents - $this->triggerEvent('jcb_ce_onGetFileContents', array(&$string, &$name, &$path, &$bom, &$view)); + $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) { @@ -286,7 +286,7 @@ class Compiler extends Infusion $answer = $this->setDynamicValues($answer); } // Trigger Event: jcb_ce_onBeforeSetFileContent - $this->triggerEvent('jcb_ce_onBeforeWriteFileContent', array(&$answer, &$name, &$path, &$bom, &$view)); + $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 diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 0ee7b871d..61c84de40 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -800,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); @@ -1020,7 +1022,7 @@ class Get $query->where($this->db->quoteName('a.id') . ' = ' . (int) $this->componentID); // Trigger Event: jcb_ce_onBeforeQueryComponentData - $this->triggerEvent('jcb_ce_onBeforeQueryComponentData', array(&$this->componentID, &$query, &$this->db)); + $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); @@ -1029,7 +1031,7 @@ class Get $component = $this->db->loadObject(); // Trigger Event: jcb_ce_onBeforeModelComponentData - $this->triggerEvent('jcb_ce_onBeforeModelComponentData', array(&$component)); + $this->triggerEvent('jcb_ce_onBeforeModelComponentData', array(&$this->componentContext, &$component)); // set upater $updater = array( @@ -1573,7 +1575,7 @@ class Get } // Trigger Event: jcb_ce_onAfterModelComponentData - $this->triggerEvent('jcb_ce_onAfterModelComponentData', array(&$component)); + $this->triggerEvent('jcb_ce_onAfterModelComponentData', array(&$this->componentContext, &$component)); // return the found component data return $component; @@ -1622,7 +1624,7 @@ class Get $query->where($this->db->quoteName('a.id') . ' = ' . (int) $id); // Trigger Event: jcb_ce_onBeforeQueryViewData - $this->triggerEvent('jcb_ce_onBeforeQueryViewData', array(&$id, &$query, &$this->db)); + $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); @@ -1681,7 +1683,7 @@ class Get $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(&$view, &$this->placeholders)); + $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; @@ -2279,7 +2281,7 @@ class Get } // Trigger Event: jcb_ce_onAfterModelViewData - $this->triggerEvent('jcb_ce_onAfterModelViewData', array(&$view, &$this->placeholders)); + $this->triggerEvent('jcb_ce_onAfterModelViewData', array(&$this->componentContext, &$view, &$this->placeholders)); // clear placeholders unset($this->placeholders[$this->hhh . 'view' . $this->hhh]); @@ -2321,7 +2323,7 @@ class Get $query->where($this->db->quoteName('a.id') . ' = ' . (int) $id); // Trigger Event: jcb_ce_onBeforeQueryCustomViewData - $this->triggerEvent('jcb_ce_onBeforeQueryCustomViewData', array(&$id, &$table, &$query, &$this->db)); + $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); @@ -2330,7 +2332,7 @@ class Get $view = $this->db->loadObject(); // Trigger Event: jcb_ce_onBeforeModelCustomViewData - $this->triggerEvent('jcb_ce_onBeforeModelCustomViewData', array(&$view, &$id, &$table)); + $this->triggerEvent('jcb_ce_onBeforeModelCustomViewData', array(&$this->componentContext, &$view, &$id, &$table)); if ($table === 'site_view') { @@ -2570,7 +2572,7 @@ class Get } // Trigger Event: jcb_ce_onAfterModelCustomViewData - $this->triggerEvent('jcb_ce_onAfterModelCustomViewData', array(&$view)); + $this->triggerEvent('jcb_ce_onAfterModelCustomViewData', array(&$this->componentContext, &$view)); // return the found view data return $view; @@ -2601,7 +2603,7 @@ class Get $query->where($this->db->quoteName('a.id') . ' = ' . $this->db->quote($id)); // Trigger Event: jcb_ce_onBeforeQueryFieldData - $this->triggerEvent('jcb_ce_onBeforeQueryFieldData', array(&$id, &$query, &$this->db)); + $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); @@ -2612,7 +2614,7 @@ class Get $field = $this->db->loadObject(); // Trigger Event: jcb_ce_onBeforeModelFieldData - $this->triggerEvent('jcb_ce_onBeforeModelFieldData', array(&$field)); + $this->triggerEvent('jcb_ce_onBeforeModelFieldData', array(&$this->componentContext, &$field)); // adding a fix for the changed name of type to fieldtype $field->type = $field->fieldtype; @@ -2690,7 +2692,7 @@ class Get $field->history = $this->getHistoryWatch('field', $id); // Trigger Event: jcb_ce_onAfterModelFieldData - $this->triggerEvent('jcb_ce_onAfterModelFieldData', array(&$field)); + $this->triggerEvent('jcb_ce_onAfterModelFieldData', array(&$this->componentContext, &$field)); $this->_fieldData[$id] = $field; } diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index aeceafb9a..d8ef5e2ef 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -368,7 +368,7 @@ class Structure extends Get // set the Joomla Version Data $this->joomlaVersionData = $this->setJoomlaVersionData(); // Trigger Event: jcb_ce_onAfterSetJoomlaVersionData - $this->triggerEvent('jcb_ce_onAfterSetJoomlaVersionData', array(&$this->joomlaVersionData)); + $this->triggerEvent('jcb_ce_onAfterSetJoomlaVersionData', array(&$this->componentContext, &$this->joomlaVersionData)); // set the dashboard $this->setDynamicDashboard(); // set the new folders @@ -419,7 +419,7 @@ class Structure extends Get if (ComponentbuilderHelper::checkArray($this->libraries)) { // Trigger Event: jcb_ce_onBeforeSetLibaries - $this->triggerEvent('jcb_ce_onBeforeSetLibaries', array(&$this->libraries)); + $this->triggerEvent('jcb_ce_onBeforeSetLibaries', array(&$this->componentContext, &$this->libraries)); // creat the main component folder if (!JFolder::exists($this->componentPath)) { diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index ae9178e61..c3a411af7 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -457,14 +457,14 @@ class Fields extends Structure // set the custom table key $dbkey = 'g'; // Trigger Event: jcb_ce_onBeforeBuildFields - $this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews)); + $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(&$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews)); + $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[] = '
'; @@ -729,14 +729,14 @@ class Fields extends Structure // set the custom table key $dbkey = 'g'; // Trigger Event: jcb_ce_onBeforeBuildFields - $this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews)); + $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(&$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews)); + $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'); @@ -2013,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 @@ -2055,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 diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 33ebf3baf..0dcdffe72 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -6539,7 +6539,7 @@ class Interpretation extends Fields // add final list of needed lang strings $componentName = JFilterOutput::cleanText($this->componentData->name); // Trigger Event: jcb_ce_onBeforeBuildAdminLang - $this->triggerEvent('jcb_ce_onBeforeBuildAdminLang', array(&$this->langContent['admin'], &$this->langPrefix, &$componentName)); + $this->triggerEvent('jcb_ce_onBeforeBuildAdminLang', array(&$this->componentContext, &$this->langContent['admin'], &$this->langPrefix, &$componentName)); // start loding the defaults $this->langContent['adminsys'][$this->langPrefix] = $componentName; $this->langContent['adminsys'][$this->langPrefix . '_CONFIGURATION'] = $componentName . ' Configuration'; @@ -6631,7 +6631,7 @@ class Interpretation extends Fields if (isset($this->langContent['admin']) && ComponentbuilderHelper::checkArray($this->langContent['admin'])) { // Trigger Event: jcb_ce_onAfterBuildAdminLang - $this->triggerEvent('jcb_ce_onAfterBuildAdminLang', array(&$this->langContent['admin'], &$this->langPrefix, &$componentName)); + $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 @@ -6649,7 +6649,7 @@ class Interpretation extends Fields // add final list of needed lang strings $componentName = JFilterOutput::cleanText($this->componentData->name); // Trigger Event: jcb_ce_onBeforeBuildSiteLang - $this->triggerEvent('jcb_ce_onBeforeBuildSiteLang', array(&$this->langContent['site'], &$this->langPrefix, &$componentName)); + $this->triggerEvent('jcb_ce_onBeforeBuildSiteLang', array(&$this->componentContext, &$this->langContent['site'], &$this->langPrefix, &$componentName)); // add final list of needed lang strings $this->langContent['site'][$this->langPrefix] = $componentName; // some more defaults @@ -6691,7 +6691,7 @@ class Interpretation extends Fields if (isset($this->langContent['site']) && ComponentbuilderHelper::checkArray($this->langContent['site'])) { // Trigger Event: jcb_ce_onAfterBuildSiteLang - $this->triggerEvent('jcb_ce_onAfterBuildSiteLang', array(&$this->langContent['site'], &$this->langPrefix, &$componentName)); + $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 @@ -6709,7 +6709,7 @@ class Interpretation extends Fields // add final list of needed lang strings $componentName = JFilterOutput::cleanText($this->componentData->name); // Trigger Event: jcb_ce_onBeforeBuildSiteSysLang - $this->triggerEvent('jcb_ce_onBeforeBuildSiteSysLang', array(&$this->langContent['sitesys'], &$this->langPrefix, &$componentName)); + $this->triggerEvent('jcb_ce_onBeforeBuildSiteSysLang', array(&$this->componentContext, &$this->langContent['sitesys'], &$this->langPrefix, &$componentName)); // add final list of needed lang strings $this->langContent['sitesys'][$this->langPrefix] = $componentName; $this->langContent['sitesys'][$this->langPrefix . '_NO_ACCESS_GRANTED'] = "No Access Granted!"; @@ -6726,7 +6726,7 @@ class Interpretation extends Fields if (isset($this->langContent['sitesys']) && ComponentbuilderHelper::checkArray($this->langContent['sitesys'])) { // Trigger Event: jcb_ce_onAfterBuildSiteSysLang - $this->triggerEvent('jcb_ce_onAfterBuildSiteSysLang', array(&$this->langContent['sitesys'], &$this->langPrefix, &$componentName)); + $this->triggerEvent('jcb_ce_onAfterBuildSiteSysLang', array(&$this->componentContext, &$this->langContent['sitesys'], &$this->langPrefix, &$componentName)); // sort strings ksort($this->langContent['sitesys']); // load to global languages @@ -6744,7 +6744,7 @@ class Interpretation extends Fields // 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->langContent['adminsys'], &$this->langPrefix, &$componentName)); + $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'])) { @@ -6756,7 +6756,7 @@ class Interpretation extends Fields if (isset($this->langContent['adminsys']) && ComponentbuilderHelper::checkArray($this->langContent['adminsys'])) { // Trigger Event: jcb_ce_onAfterBuildAdminSysLang - $this->triggerEvent('jcb_ce_onAfterBuildAdminSysLang', array(&$this->langContent['adminsys'], &$this->langPrefix, &$componentName)); + $this->triggerEvent('jcb_ce_onAfterBuildAdminSysLang', array(&$this->componentContext, &$this->langContent['adminsys'], &$this->langPrefix, &$componentName)); // sort strings ksort($this->langContent['adminsys']); // load to global languages @@ -7482,6 +7482,46 @@ 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 * @@ -14022,7 +14062,7 @@ class Interpretation extends Fields // set the custom table key $dbkey = 'g'; // Trigger Event: jcb_ce_onBeforeSetConfigFieldsets - $this->triggerEvent('jcb_ce_onBeforeSetConfigFieldsets', array(&$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->componentData->config, &$this->extensionsParams, &$placeholders)); + $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) { @@ -14078,7 +14118,7 @@ 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(&$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->componentData->config, &$this->extensionsParams, &$this->placeholders)); + $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 @@ -14090,7 +14130,7 @@ class Interpretation extends Fields $this->setCustomControlConfigFieldsets($lang); } // Trigger Event: jcb_ce_onAfterSetConfigFieldsets - $this->triggerEvent('jcb_ce_onAfterSetConfigFieldsets', array(&$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->extensionsParams, &$this->frontEndParams, &$this->placeholders)); + $this->triggerEvent('jcb_ce_onAfterSetConfigFieldsets', array(&$this->componentContext, &$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->extensionsParams, &$this->frontEndParams, &$this->placeholders)); } public function setSiteControlConfigFieldsets($lang) diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 5457043a5..d26981031 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -69,7 +69,7 @@ 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->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh)); + $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]; @@ -276,7 +276,7 @@ class Infusion extends Interpretation $this->setLockLicensePer($viewName_list, $this->target); // Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent - $this->triggerEvent('jcb_ce_onBeforeBuildAdminEditViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh)); + $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->componentCodeName, $viewName_single, $viewName_list); @@ -377,8 +377,11 @@ class Infusion extends Interpretation } } + // 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(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh)); + $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') @@ -389,7 +392,7 @@ class Infusion extends Interpretation $this->fileContentDynamic[$viewName_list][$this->hhh . 'ICOMOON' . $this->hhh] = $view['icomoon']; // Trigger Event: jcb_ce_onBeforeBuildAdminListViewContent - $this->triggerEvent('jcb_ce_onBeforeBuildAdminListViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh)); + $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) @@ -522,7 +525,7 @@ class Infusion extends Interpretation } // Trigger Event: jcb_ce_onAfterBuildAdminListViewContent - $this->triggerEvent('jcb_ce_onAfterBuildAdminListViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh)); + $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 @@ -605,7 +608,7 @@ class Infusion extends Interpretation $this->fileContentStatic[$this->hhh . 'HELPER_EXEL' . $this->hhh] = $this->setExelHelperMethods(); // Trigger Event: jcb_ce_onAfterBuildAdminViewContent - $this->triggerEvent('jcb_ce_onAfterBuildAdminViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh)); + $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 @@ -651,7 +654,7 @@ class Infusion extends Interpretation $this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd] = $view['settings']->CODE; // Trigger Event: jcb_ce_onBeforeBuildCustomAdminViewContent - $this->triggerEvent('jcb_ce_onBeforeBuildCustomAdminViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh)); + $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); @@ -705,7 +708,7 @@ class Infusion extends Interpretation $this->setCustomViewTemplateBody($view); // Trigger Event: jcb_ce_onAfterBuildCustomAdminViewContent - $this->triggerEvent('jcb_ce_onAfterBuildCustomAdminViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh)); + $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 @@ -872,7 +875,7 @@ class Infusion extends Interpretation $this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd] = $view['settings']->CODE; // Trigger Event: jcb_ce_onBeforeBuildSiteViewContent - $this->triggerEvent('jcb_ce_onBeforeBuildSiteViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh)); + $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); @@ -956,7 +959,7 @@ class Infusion extends Interpretation $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(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh)); + $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(); @@ -1042,7 +1045,7 @@ class Infusion extends Interpretation } // Trigger Event: jcb_ce_onAfterBuildFilesContent - $this->triggerEvent('jcb_ce_onAfterBuildFilesContent', array(&$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh)); + $this->triggerEvent('jcb_ce_onAfterBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh)); return true; } @@ -1172,7 +1175,7 @@ class Infusion extends Interpretation if (ComponentbuilderHelper::checkArray($this->languages)) { // Trigger Event: jcb_ce_onBeforeBuildAllLangFiles - $this->triggerEvent('jcb_ce_onBeforeBuildAllLangFiles', array(&$this->languages, &$this->langTag)); + $this->triggerEvent('jcb_ce_onBeforeBuildAllLangFiles', array(&$this->componentContext, &$this->languages, &$this->langTag)); // rest xml array $langXML = array(); foreach ($this->languages as $tag => $areas) 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 9d4ee2be4..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', @@ -61,6 +72,7 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); ?> +
@@ -69,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/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/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 c9eee9307..f1060e295 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. * 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..3715f696e 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. * diff --git a/admin/models/custom_code.php b/admin/models/custom_code.php index 7417e9b5a..ba4bf3597 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. * diff --git a/admin/models/dynamic_get.php b/admin/models/dynamic_get.php index aa7936163..34de750b9 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. * diff --git a/admin/models/field.php b/admin/models/field.php index b467b9b67..5299679ee 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. * diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 563b5181f..034c109d5 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. * diff --git a/admin/models/help_document.php b/admin/models/help_document.php index c5b7003fc..76de5c965 100644 --- a/admin/models/help_document.php +++ b/admin/models/help_document.php @@ -18,13 +18,45 @@ use Joomla\Registry\Registry; * Componentbuilder Help_document Model */ class ComponentbuilderModelHelp_document extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'target', + 'groups', + 'location', + 'admin_view', + 'site_view' + ), + 'right' => array( + 'type', + 'url', + 'article' + ), + 'fullwidth' => array( + 'content' + ), + 'above' => array( + 'title', + 'alias' + ), + '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. * diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index f03b74ec4..aba4c89d1 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -18,13 +18,199 @@ use Joomla\Registry\Registry; * Componentbuilder Joomla_component Model */ class ComponentbuilderModelJoomla_component extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'name', + 'name_code', + 'component_version', + 'debug_linenr', + 'add_placeholders', + 'mvc_versiondate', + 'note_version_options_one', + 'note_version_options_two', + 'note_version_options_three', + 'short_description', + 'description', + 'copyright' + ), + 'right' => array( + 'companyname', + 'author', + 'email', + 'website', + 'add_license', + 'license_type', + 'note_whmcs_lisencing_note', + 'whmcs_key', + 'whmcs_url', + 'whmcs_buy_link', + 'license', + 'bom', + 'image' + ), + 'above' => array( + 'system_name' + ), + 'under' => array( + 'not_required' + ) + ), + 'libs_helpers' => array( + 'fullwidth' => array( + 'creatuserhelper', + 'adduikit', + 'addfootable', + 'add_email_helper', + 'add_php_helper_both', + 'php_helper_both', + 'add_php_helper_admin', + 'php_helper_admin', + 'add_admin_event', + 'php_admin_event', + 'add_php_helper_site', + 'php_helper_site', + 'add_site_event', + 'php_site_event', + 'add_javascript', + 'javascript', + 'add_css_admin', + 'css_admin', + 'add_css_site', + 'css_site' + ) + ), + 'dynamic_integration' => array( + 'left' => array( + 'add_update_server', + 'update_server_url', + 'update_server_target', + 'note_update_server_note_ftp', + 'note_update_server_note_zip', + 'note_update_server_note_other', + 'update_server', + 'add_sales_server', + 'sales_server' + ), + 'right' => array( + 'translation_tool', + 'note_crowdin', + 'crowdin_project_identifier', + 'crowdin_project_api_key', + 'crowdin_username', + 'crowdin_account_api_key' + ) + ), + 'readme' => array( + 'left' => array( + 'addreadme', + 'readme' + ), + 'right' => array( + 'note_readme' + ) + ), + 'dash_install' => array( + 'left' => array( + 'dashboard_type' + ), + 'right' => array( + 'note_dynamic_dashboard', + 'dashboard', + 'note_botton_component_dashboard' + ), + 'fullwidth' => array( + 'add_php_preflight_install', + 'php_preflight_install', + 'add_php_preflight_update', + 'php_preflight_update', + 'add_php_postflight_install', + 'php_postflight_install', + 'add_php_postflight_update', + 'php_postflight_update', + 'add_php_method_uninstall', + 'php_method_uninstall' + ) + ), + 'mysql' => array( + 'fullwidth' => array( + 'add_sql', + 'sql', + 'add_sql_uninstall', + 'sql_uninstall' + ) + ), + 'settings' => array( + 'left' => array( + 'note_moved_views', + 'spacer_hr_one', + 'note_mysql_tweak_options', + 'spacer_hr_two', + 'note_add_custom_menus', + 'spacer_hr_three', + 'note_add_config' + ), + 'right' => array( + 'note_component_files_folders', + 'spacer_hr_four', + 'add_menu_prefix', + 'menu_prefix', + 'spacer_hr_five', + 'to_ignore_note', + 'toignore', + 'spacer_hr_six', + 'jcb_export_package_note', + 'export_key', + 'joomla_source_link', + 'export_buy_link' + ), + 'fullwidth' => array( + 'spacer_hr_seven', + 'note_on_contributors', + 'addcontributors', + 'emptycontributors', + 'number' + ) + ), + 'dynamic_build_beta' => array( + 'fullwidth' => array( + 'note_buildcomp_dynamic_mysql', + 'buildcomp', + 'buildcompsql' + ) + ), + 'admin_views' => array( + 'fullwidth' => array( + 'note_on_admin_views', + 'note_display_component_admin_views' + ) + ), + 'site_views' => array( + 'fullwidth' => array( + 'note_on_site_views', + 'note_display_component_site_views' + ) + ), + 'custom_admin_views' => array( + 'fullwidth' => array( + 'note_on_custom_admin_views', + 'note_display_component_custom_admin_views' + ) + ) + ); + /** * @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/language.php b/admin/models/language.php index 962f68a39..afc984dfe 100644 --- a/admin/models/language.php +++ b/admin/models/language.php @@ -18,13 +18,29 @@ use Joomla\Registry\Registry; * Componentbuilder Language Model */ class ComponentbuilderModelLanguage extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'name' + ), + 'right' => array( + 'langtag' + ) + ) + ); + /** * @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/language_translation.php b/admin/models/language_translation.php index c5758ca07..5d042d195 100644 --- a/admin/models/language_translation.php +++ b/admin/models/language_translation.php @@ -18,13 +18,28 @@ use Joomla\Registry\Registry; * Componentbuilder Language_translation Model */ class ComponentbuilderModelLanguage_translation extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'fullwidth' => array( + 'source', + 'translation', + 'components' + ) + ) + ); + /** * @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/layout.php b/admin/models/layout.php index d6a4cd8f6..5b0f5c243 100644 --- a/admin/models/layout.php +++ b/admin/models/layout.php @@ -18,13 +18,52 @@ use Joomla\Registry\Registry; * Componentbuilder Layout Model */ class ComponentbuilderModelLayout extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'name', + 'alias', + 'description', + 'note_libraries_selection', + 'libraries', + 'note_add_language_string' + ), + 'right' => array( + 'snippet', + 'note_uikit_snippet', + 'note_snippet_usage' + ), + 'fullwidth' => array( + 'layout' + ), + 'under' => array( + 'not_required' + ), + 'rightside' => array( + 'dynamic_get', + 'dynamic_values' + ) + ), + 'custom_script' => array( + 'fullwidth' => array( + 'add_php_view', + 'php_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/library.php b/admin/models/library.php index cc26b5365..b31ee1b58 100644 --- a/admin/models/library.php +++ b/admin/models/library.php @@ -18,13 +18,65 @@ use Joomla\Registry\Registry; * Componentbuilder Library Model */ class ComponentbuilderModelLibrary extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'behaviour' => array( + 'left' => array( + 'note_library_instruction', + 'libraries' + ), + 'right' => array( + 'description' + ), + 'fullwidth' => array( + 'note_no_behaviour_one', + 'note_yes_behaviour_one', + 'note_build_in_behaviour_one', + 'addconditions', + 'php_setdocument' + ), + 'above' => array( + 'name', + 'how', + 'type' + ), + 'under' => array( + 'not_required' + ) + ), + 'config' => array( + 'fullwidth' => array( + 'note_no_behaviour_two', + 'note_yes_behaviour_two', + 'note_build_in_behaviour_two', + 'note_display_library_config' + ) + ), + 'files_folders_urls' => array( + 'fullwidth' => array( + 'note_no_behaviour_three', + 'note_build_in_behaviour_three', + 'note_display_library_files_folders_urls' + ) + ), + 'linked' => 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. * diff --git a/admin/models/library_config.php b/admin/models/library_config.php index 8c78ade47..928f52550 100644 --- a/admin/models/library_config.php +++ b/admin/models/library_config.php @@ -18,13 +18,29 @@ use Joomla\Registry\Registry; * Componentbuilder Library_config Model */ class ComponentbuilderModelLibrary_config extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'tweaks' => array( + 'fullwidth' => array( + 'addconfig' + ), + 'above' => array( + 'library' + ) + ) + ); + /** * @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/library_files_folders_urls.php b/admin/models/library_files_folders_urls.php index 103945f17..4ea18f984 100644 --- a/admin/models/library_files_folders_urls.php +++ b/admin/models/library_files_folders_urls.php @@ -18,13 +18,43 @@ use Joomla\Registry\Registry; * Componentbuilder Library_files_folders_urls Model */ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'basic' => array( + 'fullwidth' => array( + 'note_add_urls', + 'addurls', + 'note_add_files', + 'addfiles', + 'note_add_folders', + 'addfolders' + ), + 'above' => array( + 'library' + ) + ), + '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/placeholder.php b/admin/models/placeholder.php index e11f07c94..085e4e3e2 100644 --- a/admin/models/placeholder.php +++ b/admin/models/placeholder.php @@ -18,13 +18,32 @@ use Joomla\Registry\Registry; * Componentbuilder Placeholder Model */ class ComponentbuilderModelPlaceholder extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'target' + ), + 'right' => array( + 'value' + ), + 'fullwidth' => array( + 'note_placeholders_placedin' + ) + ) + ); + /** * @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/server.php b/admin/models/server.php index 1bc18a6e9..ce83d23e8 100644 --- a/admin/models/server.php +++ b/admin/models/server.php @@ -18,13 +18,46 @@ use Joomla\Registry\Registry; * Componentbuilder Server Model */ class ComponentbuilderModelServer extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'username', + 'host', + 'port', + 'path' + ), + 'right' => array( + 'authentication', + 'password', + 'private', + 'private_key', + 'secret' + ), + 'fullwidth' => array( + 'note_ftp_signature', + 'signature', + 'note_ssh_security', + 'not_required' + ), + 'above' => array( + 'name', + 'protocol' + ) + ) + ); + /** * @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/site_view.php b/admin/models/site_view.php index e9656b354..c834dc5b0 100644 --- a/admin/models/site_view.php +++ b/admin/models/site_view.php @@ -18,13 +18,98 @@ use Joomla\Registry\Registry; * Componentbuilder Site_view Model */ class ComponentbuilderModelSite_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( + '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_javascript_file', + 'javascript_file', + 'add_js_document', + 'js_document', + 'add_css_document', + 'css_document', + 'add_css', + 'css' + ) + ), + 'custom_buttons' => array( + 'left' => array( + 'add_custom_button' + ), + 'right' => array( + 'button_position' + ), + 'fullwidth' => array( + 'note_custom_toolbar_placeholder', + 'custom_button', + '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. * diff --git a/admin/models/snippet.php b/admin/models/snippet.php index b5b657a0d..1eaeb22ee 100644 --- a/admin/models/snippet.php +++ b/admin/models/snippet.php @@ -18,13 +18,50 @@ use Joomla\Registry\Registry; * Componentbuilder Snippet Model */ class ComponentbuilderModelSnippet extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'type', + 'heading', + 'description', + 'usage' + ), + 'right' => array( + 'snippet' + ), + 'above' => array( + 'name', + 'url', + 'library' + ) + ), + 'contributor' => array( + 'left' => array( + 'contributor_company', + 'contributor_website' + ), + 'right' => array( + 'contributor_name', + 'contributor_email' + ), + 'fullwidth' => array( + 'note_contributor_details' + ) + ) + ); + /** * @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/snippet_type.php b/admin/models/snippet_type.php index b918872e8..0fd4d5192 100644 --- a/admin/models/snippet_type.php +++ b/admin/models/snippet_type.php @@ -18,13 +18,29 @@ use Joomla\Registry\Registry; * Componentbuilder Snippet_type Model */ class ComponentbuilderModelSnippet_type extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'name' + ), + 'right' => array( + 'description' + ) + ) + ); + /** * @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/template.php b/admin/models/template.php index be901b9f1..90b76ef76 100644 --- a/admin/models/template.php +++ b/admin/models/template.php @@ -18,13 +18,52 @@ use Joomla\Registry\Registry; * Componentbuilder Template Model */ class ComponentbuilderModelTemplate extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'details' => array( + 'left' => array( + 'name', + 'alias', + 'description', + 'note_libraries_selection', + 'libraries', + 'note_add_language_string' + ), + 'right' => array( + 'snippet', + 'note_snippet_usage', + 'note_uikit_snippet' + ), + 'fullwidth' => array( + 'template' + ), + 'under' => array( + 'not_required' + ), + 'rightside' => array( + 'dynamic_get', + 'dynamic_values' + ) + ), + 'custom_script' => array( + 'fullwidth' => array( + 'add_php_view', + 'php_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/validation_rule.php b/admin/models/validation_rule.php index 678ad8f12..5ac0ca8b3 100644 --- a/admin/models/validation_rule.php +++ b/admin/models/validation_rule.php @@ -18,13 +18,35 @@ use Joomla\Registry\Registry; * Componentbuilder Validation_rule Model */ class ComponentbuilderModelValidation_rule extends JModelAdmin -{ +{ + /** + * The tab layout fields array. + * + * @var array + */ + protected $tabLayoutFields = array( + 'extends_formrule' => array( + 'left' => array( + 'name' + ), + 'right' => array( + 'short_description' + ), + 'fullwidth' => array( + 'php' + ), + 'above' => array( + 'inherit' + ) + ) + ); + /** * @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/componentbuilder.xml b/componentbuilder.xml index 0bb88511e..4bef149a0 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 29th June, 2019 + 1st July, 2019 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com