From 773a75332359aa63be86fda0495850ecc9e834e8 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Thu, 12 Sep 2019 22:06:52 +0200 Subject: [PATCH] Resolved gh-463 to insure data types that require length is enforced by default in the GUI. --- README.md | 4 +- admin/README.txt | 4 +- admin/helpers/compiler/a_Get.php | 4 +- admin/helpers/componentbuilder.php | 7 +- .../en-GB/en-GB.com_componentbuilder.ini | 24 +- admin/layouts/fieldtype/fields_fullwidth.php | 2 +- .../server/linked_components_fullwidth.php | 2 +- admin/models/fieldtype.php | 12 +- admin/models/forms/field.js | 186 ++-- admin/models/forms/field.xml | 5 +- admin/models/forms/fieldtype.js | 802 ++++++++++-------- admin/models/forms/fieldtype.xml | 5 +- admin/models/forms/help_document.js | 162 ++-- admin/models/forms/server.js | 548 ++++++------ admin/models/joomla_component.php | 2 +- admin/models/server.php | 2 +- admin/sql/install.mysql.utf8.sql | 2 +- admin/views/field/tmpl/edit.php | 97 ++- admin/views/fieldtype/tmpl/edit.php | 448 +++++----- admin/views/fieldtype/view.html.php | 2 +- admin/views/help_document/tmpl/edit.php | 60 +- admin/views/server/tmpl/edit.php | 206 ++--- admin/views/server/view.html.php | 2 +- componentbuilder.xml | 2 +- site/helpers/componentbuilder.php | 7 +- 25 files changed, 1392 insertions(+), 1205 deletions(-) diff --git a/README.md b/README.md index 3a5feb7ed..b2184864b 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*: 10th September, 2019 ++ *Last Build*: 12th September, 2019 + *Version*: 2.10.1 + *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*: **251895** ++ *Line count*: **252364** + *Field count*: **1345** + *File count*: **1608** + *Folder count*: **253** diff --git a/admin/README.txt b/admin/README.txt index 3a5feb7ed..b2184864b 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*: 10th September, 2019 ++ *Last Build*: 12th September, 2019 + *Version*: 2.10.1 + *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*: **251895** ++ *Line count*: **252364** + *Field count*: **1345** + *File count*: **1608** + *Folder count*: **253** diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 4522eaebb..063e97683 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -7317,8 +7317,8 @@ class Get $code = $this->reversePlaceholders($code, $placeholders, $target, $query[2], $query[1], $query[0]); // update the GUI/Tables/Database $object = new stdClass(); - $object->id = (int) $target[2]; - $object->{$target[1]} = base64_encode($code); // (TODO) this may not always work... + $object->id = (int) $query[2]; + $object->{$query[1]} = base64_encode($code); // (TODO) this may not always work... // update the value in GUI $this->db->updateObject('#__componentbuilder_' . (string) $query[0], $object, 'id'); } diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index ae37c1e1f..9c616de36 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -2459,8 +2459,9 @@ abstract class ComponentbuilderHelper if (($repoData = self::getFileContents($_url)) !== false && self::checkJson($repoData)) { $github_returned = json_decode($repoData); - if (self::checkString($target) && self::checkObject($github_returned) && - isset($github_returned->{$target}) && self::checkArray($github_returned->{$target}) ) + if (self::checkString($target) && + ( (self::checkObject($github_returned) && isset($github_returned->{$target}) && self::checkArray($github_returned->{$target})) || + (self::checkArray($github_returned) && isset($github_returned[$target]) && self::checkArray($github_returned[$target])) )) { if ('nomemory' !== $type) { @@ -2468,7 +2469,7 @@ abstract class ComponentbuilderHelper self::set($type, $repoData); } } - elseif (!self::checkString($target) && self::checkObject($github_returned) && !isset($github_returned->message)) + elseif (!self::checkString($target) && (self::checkArray($github_returned) || (self::checkObject($github_returned) && !isset($github_returned->message)))) { if ('nomemory' !== $type) { diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 24bfe568d..f346c157b 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -4772,18 +4772,18 @@ COM_COMPONENTBUILDER_FIELDTYPE_DATADEFAULT="Datadefault" COM_COMPONENTBUILDER_FIELDTYPE_DATADEFAULT_DESCRIPTION="The data default value for mysql" COM_COMPONENTBUILDER_FIELDTYPE_DATADEFAULT_LABEL="Data Default" COM_COMPONENTBUILDER_FIELDTYPE_DATADEFAULT_OTHER="Datadefault Other" -COM_COMPONENTBUILDER_FIELDTYPE_DATADEFAULT_OTHER_DESCRIPTION="The other default data for mysql" +COM_COMPONENTBUILDER_FIELDTYPE_DATADEFAULT_OTHER_DESCRIPTION="The other default data for selected data type" COM_COMPONENTBUILDER_FIELDTYPE_DATADEFAULT_OTHER_HINT="Other Default Here" COM_COMPONENTBUILDER_FIELDTYPE_DATADEFAULT_OTHER_LABEL="Other Default" COM_COMPONENTBUILDER_FIELDTYPE_DATADEFAULT_OTHER_MESSAGE="Error! Please add other default here." COM_COMPONENTBUILDER_FIELDTYPE_DATALENGHT="Datalenght" -COM_COMPONENTBUILDER_FIELDTYPE_DATALENGHT_DESCRIPTION="The data length or value for mysql (size)" -COM_COMPONENTBUILDER_FIELDTYPE_DATALENGHT_LABEL="Data Length/Values" +COM_COMPONENTBUILDER_FIELDTYPE_DATALENGHT_DESCRIPTION="The data length for selected data type (size)" +COM_COMPONENTBUILDER_FIELDTYPE_DATALENGHT_LABEL="Data Length" COM_COMPONENTBUILDER_FIELDTYPE_DATALENGHT_OTHER="Datalenght Other" -COM_COMPONENTBUILDER_FIELDTYPE_DATALENGHT_OTHER_DESCRIPTION="The other data length/values for mysql" +COM_COMPONENTBUILDER_FIELDTYPE_DATALENGHT_OTHER_DESCRIPTION="The other data length for selected data type" COM_COMPONENTBUILDER_FIELDTYPE_DATALENGHT_OTHER_HINT="Other Here" -COM_COMPONENTBUILDER_FIELDTYPE_DATALENGHT_OTHER_LABEL="Other" -COM_COMPONENTBUILDER_FIELDTYPE_DATALENGHT_OTHER_MESSAGE="Error! Please add other data length/values here." +COM_COMPONENTBUILDER_FIELDTYPE_DATALENGHT_OTHER_LABEL="Other Length" +COM_COMPONENTBUILDER_FIELDTYPE_DATALENGHT_OTHER_MESSAGE="Error! Please add other data length here." COM_COMPONENTBUILDER_FIELDTYPE_DATATYPE="Datatype" COM_COMPONENTBUILDER_FIELDTYPE_DATATYPE_DESCRIPTION="The data type for mysql" COM_COMPONENTBUILDER_FIELDTYPE_DATATYPE_LABEL="Data Type" @@ -4919,18 +4919,18 @@ COM_COMPONENTBUILDER_FIELD_DATADEFAULT="Datadefault" COM_COMPONENTBUILDER_FIELD_DATADEFAULT_DESCRIPTION="The data default value for mysql" COM_COMPONENTBUILDER_FIELD_DATADEFAULT_LABEL="Data Default" COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER="Datadefault Other" -COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_DESCRIPTION="The other default data for mysql" +COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_DESCRIPTION="The other default data for selected data type" COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_HINT="Other Default Here" COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_LABEL="Other Default" COM_COMPONENTBUILDER_FIELD_DATADEFAULT_OTHER_MESSAGE="Error! Please add other default here." COM_COMPONENTBUILDER_FIELD_DATALENGHT="Datalenght" -COM_COMPONENTBUILDER_FIELD_DATALENGHT_DESCRIPTION="The data length or value for mysql (size)" -COM_COMPONENTBUILDER_FIELD_DATALENGHT_LABEL="Data Length/Values" +COM_COMPONENTBUILDER_FIELD_DATALENGHT_DESCRIPTION="The data length for selected data type (size)" +COM_COMPONENTBUILDER_FIELD_DATALENGHT_LABEL="Data Length" COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER="Datalenght Other" -COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_DESCRIPTION="The other data length/values for mysql" +COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_DESCRIPTION="The other data length for selected data type" COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_HINT="Other Here" -COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_LABEL="Other" -COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_MESSAGE="Error! Please add other data length/values here." +COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_LABEL="Other Length" +COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_MESSAGE="Error! Please add other data length here." COM_COMPONENTBUILDER_FIELD_DATATYPE="Datatype" COM_COMPONENTBUILDER_FIELD_DATATYPE_DESCRIPTION="The data type for mysql" COM_COMPONENTBUILDER_FIELD_DATATYPE_LABEL="Data Type" diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index 32758b02f..6c42cd144 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vxwfields; +$items = $displayData->vxyfields; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/layouts/server/linked_components_fullwidth.php b/admin/layouts/server/linked_components_fullwidth.php index 03920a738..007dc427b 100644 --- a/admin/layouts/server/linked_components_fullwidth.php +++ b/admin/layouts/server/linked_components_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vyglinked_components; +$items = $displayData->vyilinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 463e17cdb..d3d3d639c 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -203,7 +203,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVxwfields() + public function getVxyfields() { // Get the user object. $user = JFactory::getUser(); @@ -291,13 +291,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationVxwfields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationVxyfields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationVxwfields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationVxyfields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationVxwfields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationVxyfields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationVxwfields($item->store, 'store'); + $item->store = $this->selectionTranslationVxyfields($item->store, 'store'); } } @@ -311,7 +311,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return translatable string */ - public function selectionTranslationVxwfields($value,$name) + public function selectionTranslationVxyfields($value,$name) { // Array of datatype language strings if ($name === 'datatype') diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js index 2da271b04..d644d56da 100644 --- a/admin/models/forms/field.js +++ b/admin/models/forms/field.js @@ -13,6 +13,7 @@ jform_vvvvwbtvxl_required = false; jform_vvvvwbuvxm_required = false; jform_vvvvwbvvxn_required = false; jform_vvvvwbwvxo_required = false; +jform_vvvvwbxvxp_required = false; // Initial Script jQuery(document).ready(function() @@ -29,21 +30,24 @@ jQuery(document).ready(function() var datatype_vvvvwbw = jQuery("#jform_datatype").val(); vvvvwbw(datatype_vvvvwbw); - var store_vvvvwbx = jQuery("#jform_store").val(); var datatype_vvvvwbx = jQuery("#jform_datatype").val(); - vvvvwbx(store_vvvvwbx,datatype_vvvvwbx); + vvvvwbx(datatype_vvvvwbx); - var add_css_view_vvvvwbz = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvwbz(add_css_view_vvvvwbz); + var store_vvvvwby = jQuery("#jform_store").val(); + var datatype_vvvvwby = jQuery("#jform_datatype").val(); + vvvvwby(store_vvvvwby,datatype_vvvvwby); - var add_css_views_vvvvwca = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvwca(add_css_views_vvvvwca); + var add_css_view_vvvvwca = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvwca(add_css_view_vvvvwca); - var add_javascript_view_footer_vvvvwcb = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvwcb(add_javascript_view_footer_vvvvwcb); + var add_css_views_vvvvwcb = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvwcb(add_css_views_vvvvwcb); - var add_javascript_views_footer_vvvvwcc = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvwcc(add_javascript_views_footer_vvvvwcc); + var add_javascript_view_footer_vvvvwcc = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvwcc(add_javascript_view_footer_vvvvwcc); + + var add_javascript_views_footer_vvvvwcd = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvwcd(add_javascript_views_footer_vvvvwcd); }); // the vvvvwbt function @@ -178,7 +182,6 @@ function vvvvwbv(datatype_vvvvwbv) if (datatype) { jQuery('#jform_datadefault').closest('.control-group').show(); - jQuery('#jform_datalenght').closest('.control-group').show(); jQuery('#jform_indexes').closest('.control-group').show(); // add required attribute to indexes field if (jform_vvvvwbvvxn_required) @@ -193,7 +196,6 @@ function vvvvwbv(datatype_vvvvwbv) else { jQuery('#jform_datadefault').closest('.control-group').hide(); - jQuery('#jform_datalenght').closest('.control-group').hide(); jQuery('#jform_indexes').closest('.control-group').hide(); // remove required attribute from indexes field if (!jform_vvvvwbvvxn_required) @@ -237,27 +239,27 @@ function vvvvwbw(datatype_vvvvwbw) // set this function logic if (datatype) { - jQuery('#jform_store').closest('.control-group').show(); - // add required attribute to store field + jQuery('#jform_datalenght').closest('.control-group').show(); + // add required attribute to datalenght field if (jform_vvvvwbwvxo_required) { - updateFieldRequired('store',0); - jQuery('#jform_store').prop('required','required'); - jQuery('#jform_store').attr('aria-required',true); - jQuery('#jform_store').addClass('required'); + updateFieldRequired('datalenght',0); + jQuery('#jform_datalenght').prop('required','required'); + jQuery('#jform_datalenght').attr('aria-required',true); + jQuery('#jform_datalenght').addClass('required'); jform_vvvvwbwvxo_required = false; } } else { - jQuery('#jform_store').closest('.control-group').hide(); - // remove required attribute from store field + jQuery('#jform_datalenght').closest('.control-group').hide(); + // remove required attribute from datalenght field if (!jform_vvvvwbwvxo_required) { - updateFieldRequired('store',1); - jQuery('#jform_store').removeAttr('required'); - jQuery('#jform_store').removeAttr('aria-required'); - jQuery('#jform_store').removeClass('required'); + updateFieldRequired('datalenght',1); + jQuery('#jform_datalenght').removeAttr('required'); + jQuery('#jform_datalenght').removeAttr('aria-required'); + jQuery('#jform_datalenght').removeClass('required'); jform_vvvvwbwvxo_required = true; } } @@ -267,7 +269,7 @@ function vvvvwbw(datatype_vvvvwbw) function datatype_vvvvwbw_SomeFunc(datatype_vvvvwbw) { // set the function logic - if (datatype_vvvvwbw == 'CHAR' || datatype_vvvvwbw == 'VARCHAR' || datatype_vvvvwbw == 'TEXT' || datatype_vvvvwbw == 'MEDIUMTEXT' || datatype_vvvvwbw == 'LONGTEXT' || datatype_vvvvwbw == 'BLOB' || datatype_vvvvwbw == 'TINYBLOB' || datatype_vvvvwbw == 'MEDIUMBLOB' || datatype_vvvvwbw == 'LONGBLOB') + if (datatype_vvvvwbw == 'CHAR' || datatype_vvvvwbw == 'VARCHAR' || datatype_vvvvwbw == 'INT' || datatype_vvvvwbw == 'TINYINT' || datatype_vvvvwbw == 'BIGINT' || datatype_vvvvwbw == 'FLOAT' || datatype_vvvvwbw == 'DECIMAL' || datatype_vvvvwbw == 'DOUBLE') { return true; } @@ -275,20 +277,8 @@ function datatype_vvvvwbw_SomeFunc(datatype_vvvvwbw) } // the vvvvwbx function -function vvvvwbx(store_vvvvwbx,datatype_vvvvwbx) +function vvvvwbx(datatype_vvvvwbx) { - if (isSet(store_vvvvwbx) && store_vvvvwbx.constructor !== Array) - { - var temp_vvvvwbx = store_vvvvwbx; - var store_vvvvwbx = []; - store_vvvvwbx.push(temp_vvvvwbx); - } - else if (!isSet(store_vvvvwbx)) - { - var store_vvvvwbx = []; - } - var store = store_vvvvwbx.some(store_vvvvwbx_SomeFunc); - if (isSet(datatype_vvvvwbx) && datatype_vvvvwbx.constructor !== Array) { var temp_vvvvwbx = datatype_vvvvwbx; @@ -303,27 +293,34 @@ function vvvvwbx(store_vvvvwbx,datatype_vvvvwbx) // set this function logic - if (store && datatype) + if (datatype) { - jQuery('.note_whmcs_encryption').closest('.control-group').show(); + jQuery('#jform_store').closest('.control-group').show(); + // add required attribute to store field + if (jform_vvvvwbxvxp_required) + { + updateFieldRequired('store',0); + jQuery('#jform_store').prop('required','required'); + jQuery('#jform_store').attr('aria-required',true); + jQuery('#jform_store').addClass('required'); + jform_vvvvwbxvxp_required = false; + } } else { - jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + jQuery('#jform_store').closest('.control-group').hide(); + // remove required attribute from store field + if (!jform_vvvvwbxvxp_required) + { + updateFieldRequired('store',1); + jQuery('#jform_store').removeAttr('required'); + jQuery('#jform_store').removeAttr('aria-required'); + jQuery('#jform_store').removeClass('required'); + jform_vvvvwbxvxp_required = true; + } } } -// the vvvvwbx Some function -function store_vvvvwbx_SomeFunc(store_vvvvwbx) -{ - // set the function logic - if (store_vvvvwbx == 4) - { - return true; - } - return false; -} - // the vvvvwbx Some function function datatype_vvvvwbx_SomeFunc(datatype_vvvvwbx) { @@ -335,11 +332,72 @@ function datatype_vvvvwbx_SomeFunc(datatype_vvvvwbx) return false; } -// the vvvvwbz function -function vvvvwbz(add_css_view_vvvvwbz) +// the vvvvwby function +function vvvvwby(store_vvvvwby,datatype_vvvvwby) +{ + if (isSet(store_vvvvwby) && store_vvvvwby.constructor !== Array) + { + var temp_vvvvwby = store_vvvvwby; + var store_vvvvwby = []; + store_vvvvwby.push(temp_vvvvwby); + } + else if (!isSet(store_vvvvwby)) + { + var store_vvvvwby = []; + } + var store = store_vvvvwby.some(store_vvvvwby_SomeFunc); + + if (isSet(datatype_vvvvwby) && datatype_vvvvwby.constructor !== Array) + { + var temp_vvvvwby = datatype_vvvvwby; + var datatype_vvvvwby = []; + datatype_vvvvwby.push(temp_vvvvwby); + } + else if (!isSet(datatype_vvvvwby)) + { + var datatype_vvvvwby = []; + } + var datatype = datatype_vvvvwby.some(datatype_vvvvwby_SomeFunc); + + + // set this function logic + if (store && datatype) + { + jQuery('.note_whmcs_encryption').closest('.control-group').show(); + } + else + { + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + } +} + +// the vvvvwby Some function +function store_vvvvwby_SomeFunc(store_vvvvwby) { // set the function logic - if (add_css_view_vvvvwbz == 1) + if (store_vvvvwby == 4) + { + return true; + } + return false; +} + +// the vvvvwby Some function +function datatype_vvvvwby_SomeFunc(datatype_vvvvwby) +{ + // set the function logic + if (datatype_vvvvwby == 'CHAR' || datatype_vvvvwby == 'VARCHAR' || datatype_vvvvwby == 'TEXT' || datatype_vvvvwby == 'MEDIUMTEXT' || datatype_vvvvwby == 'LONGTEXT' || datatype_vvvvwby == 'BLOB' || datatype_vvvvwby == 'TINYBLOB' || datatype_vvvvwby == 'MEDIUMBLOB' || datatype_vvvvwby == 'LONGBLOB') + { + return true; + } + return false; +} + +// the vvvvwca function +function vvvvwca(add_css_view_vvvvwca) +{ + // set the function logic + if (add_css_view_vvvvwca == 1) { jQuery('#jform_css_view-lbl').closest('.control-group').show(); } @@ -349,11 +407,11 @@ function vvvvwbz(add_css_view_vvvvwbz) } } -// the vvvvwca function -function vvvvwca(add_css_views_vvvvwca) +// the vvvvwcb function +function vvvvwcb(add_css_views_vvvvwcb) { // set the function logic - if (add_css_views_vvvvwca == 1) + if (add_css_views_vvvvwcb == 1) { jQuery('#jform_css_views-lbl').closest('.control-group').show(); } @@ -363,11 +421,11 @@ function vvvvwca(add_css_views_vvvvwca) } } -// the vvvvwcb function -function vvvvwcb(add_javascript_view_footer_vvvvwcb) +// the vvvvwcc function +function vvvvwcc(add_javascript_view_footer_vvvvwcc) { // set the function logic - if (add_javascript_view_footer_vvvvwcb == 1) + if (add_javascript_view_footer_vvvvwcc == 1) { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); } @@ -377,11 +435,11 @@ function vvvvwcb(add_javascript_view_footer_vvvvwcb) } } -// the vvvvwcc function -function vvvvwcc(add_javascript_views_footer_vvvvwcc) +// the vvvvwcd function +function vvvvwcd(add_javascript_views_footer_vvvvwcd) { // set the function logic - if (add_javascript_views_footer_vvvvwcc == 1) + if (add_javascript_views_footer_vvvvwcd == 1) { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show(); } diff --git a/admin/models/forms/field.xml b/admin/models/forms/field.xml index 05f4c885c..bdd33a2e7 100644 --- a/admin/models/forms/field.xml +++ b/admin/models/forms/field.xml @@ -300,6 +300,7 @@ description="COM_COMPONENTBUILDER_FIELD_DATALENGHT_DESCRIPTION" class="btn-group" multiple="false" + required="true" default="">