From dda33d66cb8a1a6911a0afa36301b5024b9f749f Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 25 May 2019 22:20:12 +0200 Subject: [PATCH] fixed the subform build, to allow required value to be set to true. --- README.md | 4 +- admin/README.txt | 4 +- admin/config.xml | 5 +- admin/helpers/compiler/c_Fields.php | 6 +- admin/models/forms/admin_custom_tabs.xml | 7 +-- admin/models/forms/admin_fields.xml | 16 +---- .../models/forms/admin_fields_conditions.xml | 12 ++-- admin/models/forms/admin_fields_relations.xml | 7 +-- admin/models/forms/admin_view.xml | 33 ++++------ admin/models/forms/component_admin_views.xml | 27 ++++----- admin/models/forms/component_config.xml | 2 +- .../forms/component_custom_admin_menus.xml | 12 ++-- .../forms/component_custom_admin_views.xml | 17 +++--- admin/models/forms/component_dashboard.xml | 6 +- .../models/forms/component_files_folders.xml | 20 +++---- admin/models/forms/component_mysql_tweaks.xml | 5 +- admin/models/forms/component_placeholders.xml | 4 +- admin/models/forms/component_site_views.xml | 12 ++-- admin/models/forms/component_updates.xml | 3 +- admin/models/forms/custom_admin_view.xml | 17 ++---- admin/models/forms/dynamic_get.xml | 60 +++++++++---------- admin/models/forms/fieldtype.xml | 7 +-- admin/models/forms/joomla_component.xml | 9 +-- admin/models/forms/language_translation.xml | 3 +- admin/models/forms/library.xml | 12 ++-- admin/models/forms/library_config.xml | 2 +- .../forms/library_files_folders_urls.xml | 24 ++++---- admin/models/forms/site_view.xml | 17 ++---- componentbuilder.xml | 2 +- 29 files changed, 148 insertions(+), 207 deletions(-) diff --git a/README.md b/README.md index 69a21f15a..ad5d4f319 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*: 20th May, 2019 ++ *Last Build*: 25th May, 2019 + *Version*: 2.9.18 + *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*: **206424** ++ *Line count*: **206365** + *Field count*: **1136** + *File count*: **1344** + *Folder count*: **209** diff --git a/admin/README.txt b/admin/README.txt index 69a21f15a..ad5d4f319 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*: 20th May, 2019 ++ *Last Build*: 25th May, 2019 + *Version*: 2.9.18 + *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*: **206424** ++ *Line count*: **206365** + *Field count*: **1136** + *File count*: **1344** + *Folder count*: **209** diff --git a/admin/config.xml b/admin/config.xml index 53a28c3b9..7ece41d41 100644 --- a/admin/config.xml +++ b/admin/config.xml @@ -711,7 +711,7 @@ class="list_class" multiple="false" default="0" - required="false" + required="true" button="false" /> @@ -720,7 +720,6 @@ name="backup" label="COM_COMPONENTBUILDER_CONFIG_BACKUP_LABEL" value="1" - required="false" description="COM_COMPONENTBUILDER_CONFIG_BACKUP_DESCRIPTION" class="inputbox" /> @@ -730,7 +729,6 @@ name="repository" label="COM_COMPONENTBUILDER_CONFIG_REPOSITORY_LABEL" value="1" - required="false" description="COM_COMPONENTBUILDER_CONFIG_REPOSITORY_DESCRIPTION" class="inputbox" /> @@ -741,7 +739,6 @@ label="COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_LABEL" value="1" default="" - required="false" description="COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_DESCRIPTION" class="inputbox" /> diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 30f8a2d5c..e2bad3de6 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -2249,14 +2249,14 @@ class Fields extends Structure } elseif ($property['name'] === 'button' && $setCustom) { - // dont load the button to repeatable + // load the button string value if found $xmlValue = (string) ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'button="', '"')); // add to custom values $fieldAttributes['custom']['add_button'] = (ComponentbuilderHelper::checkString($xmlValue) || 1 == $xmlValue) ? $xmlValue : 'false'; } - elseif ($property['name'] === 'required' && $repeatable) + elseif ($property['name'] === 'required' && 'repeatable' === $typeName) { - // dont load the required to repeatable + // dont load the required to repeatable field type $xmlValue = 'false'; } elseif ($viewType == 2 && ($property['name'] === 'readonly' || $property['name'] === 'disabled')) diff --git a/admin/models/forms/admin_custom_tabs.xml b/admin/models/forms/admin_custom_tabs.xml index 02991f1d7..786c03827 100644 --- a/admin/models/forms/admin_custom_tabs.xml +++ b/admin/models/forms/admin_custom_tabs.xml @@ -119,7 +119,6 @@ class="fieldMedium" multiple="false" default="1" - required="false" button="false" /> @@ -130,7 +129,6 @@ description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_POSITION_DESCRIPTION" class="list_class" multiple="false" - required="false" default="1"> diff --git a/admin/models/forms/admin_fields_conditions.xml b/admin/models/forms/admin_fields_conditions.xml index e86813520..44257b742 100644 --- a/admin/models/forms/admin_fields_conditions.xml +++ b/admin/models/forms/admin_fields_conditions.xml @@ -118,7 +118,7 @@ class="fieldMedium" multiple="true" default="" - required="false" + required="true" button="false" /> @@ -130,7 +130,7 @@ class="list_class" multiple="false" filter="INT" - required="false" + required="true" default="1"> @@ -689,7 +687,6 @@ default="0" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ORDER_DESCRIPTION" class="fieldSmall" - required="false" first="0" last="400" step="1" diff --git a/admin/models/forms/component_config.xml b/admin/models/forms/component_config.xml index 99fbfcfe6..a3e64055b 100644 --- a/admin/models/forms/component_config.xml +++ b/admin/models/forms/component_config.xml @@ -118,7 +118,7 @@ class="list_class fieldFull" multiple="false" default="" - required="false" + required="true" button="false" /> diff --git a/admin/models/forms/component_custom_admin_menus.xml b/admin/models/forms/component_custom_admin_menus.xml index d49df75da..fe82909b8 100644 --- a/admin/models/forms/component_custom_admin_menus.xml +++ b/admin/models/forms/component_custom_admin_menus.xml @@ -119,7 +119,7 @@ class="text_area" readonly="false" disabled="false" - required="false" + required="true" filter="STRING" message="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_MESSAGE" hint="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_HINT" @@ -134,7 +134,7 @@ default="" description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_CODE_DESCRIPTION" class="text_area" - required="false" + required="true" filter="CMD" message="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_CODE_MESSAGE" hint="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_CODE_HINT" @@ -172,7 +172,7 @@ label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_MAINMENU_LABEL" value="1" default="1" - required="false" + required="true" description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_MAINMENU_DESCRIPTION" class="inputbox" /> @@ -183,7 +183,7 @@ label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_DASHBOARD_LIST_LABEL" value="1" default="1" - required="false" + required="true" description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_DASHBOARD_LIST_DESCRIPTION" class="inputbox" /> @@ -194,7 +194,7 @@ label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_SUBMENU_LABEL" value="1" default="1" - required="false" + required="true" description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_SUBMENU_DESCRIPTION" class="inputbox" /> @@ -207,7 +207,7 @@ class="list_class fieldMedium" multiple="false" default="" - required="false" + required="true" button="false" /> diff --git a/admin/models/forms/component_custom_admin_views.xml b/admin/models/forms/component_custom_admin_views.xml index d0408d864..adbade988 100644 --- a/admin/models/forms/component_custom_admin_views.xml +++ b/admin/models/forms/component_custom_admin_views.xml @@ -117,7 +117,7 @@ class="fieldMedium" multiple="false" default="" - required="false" + required="true" button="false" /> @@ -128,7 +128,6 @@ description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ICOMOON_DESCRIPTION" class="list_class fieldMedium icomoon342" multiple="false" - required="false" onchange="getIconImage(this);"> diff --git a/admin/models/forms/fieldtype.xml b/admin/models/forms/fieldtype.xml index 4dfdde50e..d29eef73b 100644 --- a/admin/models/forms/fieldtype.xml +++ b/admin/models/forms/fieldtype.xml @@ -278,7 +278,7 @@ class="text_area" readonly="false" disabled="false" - required="false" + required="true" filter="STRING" message="COM_COMPONENTBUILDER_FIELDTYPE_NAME_MESSAGE" hint="COM_COMPONENTBUILDER_FIELDTYPE_NAME_HINT" @@ -296,7 +296,6 @@ class="text_area span12" filter="RAW" hint="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_HINT" - required="false" /> @@ -314,7 +312,6 @@ name="mandatory" label="COM_COMPONENTBUILDER_FIELDTYPE_MANDATORY_LABEL" value="1" - required="false" description="COM_COMPONENTBUILDER_FIELDTYPE_MANDATORY_DESCRIPTION" class="inputbox" /> @@ -324,7 +321,6 @@ name="translatable" label="COM_COMPONENTBUILDER_FIELDTYPE_TRANSLATABLE_LABEL" value="1" - required="false" description="COM_COMPONENTBUILDER_FIELDTYPE_TRANSLATABLE_DESCRIPTION" class="inputbox" /> @@ -339,7 +335,6 @@ class="text_area" filter="HTML" hint="COM_COMPONENTBUILDER_FIELDTYPE_DESCRIPTION_HINT" - required="false" /> diff --git a/admin/models/forms/joomla_component.xml b/admin/models/forms/joomla_component.xml index c9694d13e..2eeedcb3a 100644 --- a/admin/models/forms/joomla_component.xml +++ b/admin/models/forms/joomla_component.xml @@ -1204,7 +1204,7 @@ class="text_area" readonly="false" disabled="false" - required="false" + required="true" filter="STRING" message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_MESSAGE" hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_HINT" @@ -1220,7 +1220,7 @@ class="text_area" readonly="false" disabled="false" - required="false" + required="true" filter="STRING" message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TITLE_MESSAGE" hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TITLE_HINT" @@ -1234,7 +1234,7 @@ maxlength="50" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_DESCRIPTION" class="text_area" - required="false" + required="true" filter="STRING" validate="email" message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_MESSAGE" @@ -1249,7 +1249,6 @@ maxlength="150" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_DESCRIPTION" class="text_area" - required="false" filter="url" validated="url" scheme="http,https" @@ -1264,7 +1263,6 @@ description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_DESCRIPTION" class="fieldMedium" multiple="false" - required="false" default="2">