+
+
+
canDo->get('field.access')) : ?>
diff --git a/admin/views/fieldtype/view.html.php b/admin/views/fieldtype/view.html.php
index a6c25c3a5..dbcce86bf 100644
--- a/admin/views/fieldtype/view.html.php
+++ b/admin/views/fieldtype/view.html.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 13 of this MVC
- @build 13th June, 2017
+ @version @update number 15 of this MVC
+ @build 17th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage view.html.php
diff --git a/admin/views/fieldtypes/tmpl/default.php b/admin/views/fieldtypes/tmpl/default.php
index 979059203..5eb5553ab 100644
--- a/admin/views/fieldtypes/tmpl/default.php
+++ b/admin/views/fieldtypes/tmpl/default.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 13 of this MVC
- @build 13th June, 2017
+ @version @update number 15 of this MVC
+ @build 17th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default.php
diff --git a/admin/views/fieldtypes/tmpl/default_batch_body.php b/admin/views/fieldtypes/tmpl/default_batch_body.php
index 1fe0b3895..d71b78962 100644
--- a/admin/views/fieldtypes/tmpl/default_batch_body.php
+++ b/admin/views/fieldtypes/tmpl/default_batch_body.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 13 of this MVC
- @build 13th June, 2017
+ @version @update number 15 of this MVC
+ @build 17th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_batch_body.php
diff --git a/admin/views/fieldtypes/tmpl/default_batch_footer.php b/admin/views/fieldtypes/tmpl/default_batch_footer.php
index ee8613297..6fc4bce06 100644
--- a/admin/views/fieldtypes/tmpl/default_batch_footer.php
+++ b/admin/views/fieldtypes/tmpl/default_batch_footer.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 13 of this MVC
- @build 13th June, 2017
+ @version @update number 15 of this MVC
+ @build 17th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_batch_footer.php
diff --git a/admin/views/fieldtypes/tmpl/default_body.php b/admin/views/fieldtypes/tmpl/default_body.php
index 47a56ebe5..454da88c0 100644
--- a/admin/views/fieldtypes/tmpl/default_body.php
+++ b/admin/views/fieldtypes/tmpl/default_body.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 13 of this MVC
- @build 13th June, 2017
+ @version @update number 15 of this MVC
+ @build 17th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_body.php
diff --git a/admin/views/fieldtypes/tmpl/default_foot.php b/admin/views/fieldtypes/tmpl/default_foot.php
index 71a1b5e6c..f171fda29 100644
--- a/admin/views/fieldtypes/tmpl/default_foot.php
+++ b/admin/views/fieldtypes/tmpl/default_foot.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 13 of this MVC
- @build 13th June, 2017
+ @version @update number 15 of this MVC
+ @build 17th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_foot.php
diff --git a/admin/views/fieldtypes/tmpl/default_head.php b/admin/views/fieldtypes/tmpl/default_head.php
index 48332c2b2..3b6288d3b 100644
--- a/admin/views/fieldtypes/tmpl/default_head.php
+++ b/admin/views/fieldtypes/tmpl/default_head.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 13 of this MVC
- @build 13th June, 2017
+ @version @update number 15 of this MVC
+ @build 17th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_head.php
diff --git a/admin/views/fieldtypes/tmpl/default_toolbar.php b/admin/views/fieldtypes/tmpl/default_toolbar.php
index 2ef0ca0a9..ca66be9a6 100644
--- a/admin/views/fieldtypes/tmpl/default_toolbar.php
+++ b/admin/views/fieldtypes/tmpl/default_toolbar.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 13 of this MVC
- @build 13th June, 2017
+ @version @update number 15 of this MVC
+ @build 17th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_toolbar.php
diff --git a/admin/views/fieldtypes/view.html.php b/admin/views/fieldtypes/view.html.php
index ff2476e89..3eecfab69 100644
--- a/admin/views/fieldtypes/view.html.php
+++ b/admin/views/fieldtypes/view.html.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 13 of this MVC
- @build 13th June, 2017
+ @version @update number 15 of this MVC
+ @build 17th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage view.html.php
diff --git a/admin/views/import/tmpl/default.php b/admin/views/import/tmpl/default.php
index abccdd2d5..e68d99fb4 100644
--- a/admin/views/import/tmpl/default.php
+++ b/admin/views/import/tmpl/default.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default.php
diff --git a/admin/views/import/view.html.php b/admin/views/import/view.html.php
index b98b21e41..b56d42ea3 100644
--- a/admin/views/import/view.html.php
+++ b/admin/views/import/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage view.html.php
diff --git a/admin/views/import_joomla_components/tmpl/default.php b/admin/views/import_joomla_components/tmpl/default.php
index e04e3cfa4..e1cf4771b 100644
--- a/admin/views/import_joomla_components/tmpl/default.php
+++ b/admin/views/import_joomla_components/tmpl/default.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default.php
diff --git a/admin/views/import_joomla_components/view.html.php b/admin/views/import_joomla_components/view.html.php
index 1f1af76be..676119cd4 100644
--- a/admin/views/import_joomla_components/view.html.php
+++ b/admin/views/import_joomla_components/view.html.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage view.html.php
diff --git a/admin/views/joomla_component/submitbutton.js b/admin/views/joomla_component/submitbutton.js
index 6d8a08e3d..36db25e21 100644
--- a/admin/views/joomla_component/submitbutton.js
+++ b/admin/views/joomla_component/submitbutton.js
@@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 375 of this MVC
- @build 17th September, 2017
+ @version @update number 378 of this MVC
+ @build 18th September, 2017
@created 6th May, 2015
@package Component Builder
@subpackage submitbutton.js
diff --git a/admin/views/joomla_component/tmpl/edit.php b/admin/views/joomla_component/tmpl/edit.php
index 2492d702d..35a68e088 100644
--- a/admin/views/joomla_component/tmpl/edit.php
+++ b/admin/views/joomla_component/tmpl/edit.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 375 of this MVC
- @build 17th September, 2017
+ @version @update number 378 of this MVC
+ @build 18th September, 2017
@created 6th May, 2015
@package Component Builder
@subpackage edit.php
diff --git a/admin/views/joomla_component/view.html.php b/admin/views/joomla_component/view.html.php
index 193e6496d..4210678c7 100644
--- a/admin/views/joomla_component/view.html.php
+++ b/admin/views/joomla_component/view.html.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 375 of this MVC
- @build 17th September, 2017
+ @version @update number 378 of this MVC
+ @build 18th September, 2017
@created 6th May, 2015
@package Component Builder
@subpackage view.html.php
diff --git a/admin/views/joomla_components/tmpl/default.php b/admin/views/joomla_components/tmpl/default.php
index c8d821ecf..44760946e 100644
--- a/admin/views/joomla_components/tmpl/default.php
+++ b/admin/views/joomla_components/tmpl/default.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 375 of this MVC
- @build 17th September, 2017
+ @version @update number 378 of this MVC
+ @build 18th September, 2017
@created 6th May, 2015
@package Component Builder
@subpackage default.php
diff --git a/admin/views/joomla_components/tmpl/default_batch_body.php b/admin/views/joomla_components/tmpl/default_batch_body.php
index c0abc1404..aaf3cbe31 100644
--- a/admin/views/joomla_components/tmpl/default_batch_body.php
+++ b/admin/views/joomla_components/tmpl/default_batch_body.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 375 of this MVC
- @build 17th September, 2017
+ @version @update number 378 of this MVC
+ @build 18th September, 2017
@created 6th May, 2015
@package Component Builder
@subpackage default_batch_body.php
diff --git a/admin/views/joomla_components/tmpl/default_batch_footer.php b/admin/views/joomla_components/tmpl/default_batch_footer.php
index 1388800a9..38eebe875 100644
--- a/admin/views/joomla_components/tmpl/default_batch_footer.php
+++ b/admin/views/joomla_components/tmpl/default_batch_footer.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 375 of this MVC
- @build 17th September, 2017
+ @version @update number 378 of this MVC
+ @build 18th September, 2017
@created 6th May, 2015
@package Component Builder
@subpackage default_batch_footer.php
diff --git a/admin/views/joomla_components/tmpl/default_body.php b/admin/views/joomla_components/tmpl/default_body.php
index c77983d38..581ff9b52 100644
--- a/admin/views/joomla_components/tmpl/default_body.php
+++ b/admin/views/joomla_components/tmpl/default_body.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 375 of this MVC
- @build 17th September, 2017
+ @version @update number 378 of this MVC
+ @build 18th September, 2017
@created 6th May, 2015
@package Component Builder
@subpackage default_body.php
diff --git a/admin/views/joomla_components/tmpl/default_foot.php b/admin/views/joomla_components/tmpl/default_foot.php
index 972701c66..8a109c146 100644
--- a/admin/views/joomla_components/tmpl/default_foot.php
+++ b/admin/views/joomla_components/tmpl/default_foot.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 375 of this MVC
- @build 17th September, 2017
+ @version @update number 378 of this MVC
+ @build 18th September, 2017
@created 6th May, 2015
@package Component Builder
@subpackage default_foot.php
diff --git a/admin/views/joomla_components/tmpl/default_head.php b/admin/views/joomla_components/tmpl/default_head.php
index 7b5c58b2e..ac5010133 100644
--- a/admin/views/joomla_components/tmpl/default_head.php
+++ b/admin/views/joomla_components/tmpl/default_head.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 375 of this MVC
- @build 17th September, 2017
+ @version @update number 378 of this MVC
+ @build 18th September, 2017
@created 6th May, 2015
@package Component Builder
@subpackage default_head.php
diff --git a/admin/views/joomla_components/tmpl/default_toolbar.php b/admin/views/joomla_components/tmpl/default_toolbar.php
index 738676eb7..970f815ee 100644
--- a/admin/views/joomla_components/tmpl/default_toolbar.php
+++ b/admin/views/joomla_components/tmpl/default_toolbar.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 375 of this MVC
- @build 17th September, 2017
+ @version @update number 378 of this MVC
+ @build 18th September, 2017
@created 6th May, 2015
@package Component Builder
@subpackage default_toolbar.php
diff --git a/admin/views/joomla_components/view.html.php b/admin/views/joomla_components/view.html.php
index ceaa8cac1..1e6e8abff 100644
--- a/admin/views/joomla_components/view.html.php
+++ b/admin/views/joomla_components/view.html.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 375 of this MVC
- @build 17th September, 2017
+ @version @update number 378 of this MVC
+ @build 18th September, 2017
@created 6th May, 2015
@package Component Builder
@subpackage view.html.php
diff --git a/componentbuilder.xml b/componentbuilder.xml
index c04ae43a1..6b3fdeeba 100644
--- a/componentbuilder.xml
+++ b/componentbuilder.xml
@@ -1,7 +1,7 @@
COM_COMPONENTBUILDER
- 17th September, 2017
+ 18th September, 2017
Llewellyn van der Merwe
joomla@vdm.io
http://vdm.bz/component-builder
diff --git a/script.php b/script.php
index 6a169e47e..d04515ac9 100644
--- a/script.php
+++ b/script.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage script.php
@@ -1708,6 +1708,52 @@ class com_componentbuilderInstallerScript
}
}
}
+ // update the properties in the field types
+ $query = $db->getQuery(true);
+ // update all JCB lang translations
+ $query->select($db->quoteName(array('id', 'properties')));
+ $query->from($db->quoteName('#__componentbuilder_fieldtype'));
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+ $db->execute();
+ if ($db->getNumRows())
+ {
+ $rows = $db->loadObjectList();
+ foreach ($rows as $row)
+ {
+ // check if it has translations
+ if (ComponentbuilderHelper::checkJson($row->properties))
+ {
+ // open the properties and convert
+ $properties = json_decode($row->properties, true);
+ if (ComponentbuilderHelper::checkArray($properties)
+ && isset($properties['name']) && ComponentbuilderHelper::checkArray($properties['name'])
+ && isset($properties['mandatory']) && ComponentbuilderHelper::checkArray($properties['mandatory']))
+ {
+ $bucket = array();
+ foreach ($properties as $key => $values)
+ {
+ foreach ($values as $nr => $value)
+ {
+ if (!isset($bucket['properties' . $nr]) || !ComponentbuilderHelper::checkArray($bucket['properties' . $nr]))
+ {
+ $bucket['properties' . $nr] = array();
+ }
+ $bucket['properties' . $nr][$key] = $value;
+ }
+ }
+ // set the bucket back to translation
+ $row->properties = json_encode($bucket);
+ $db->updateObject('#__componentbuilder_fieldtype', $row, 'id');
+ }
+ elseif (!ComponentbuilderHelper::checkArray($properties))
+ {
+ $row->properties = '';
+ $db->updateObject('#__componentbuilder_fieldtype', $row, 'id');
+ }
+ }
+ }
+ }
}
}
}
diff --git a/site/assets/css/site.css b/site/assets/css/site.css
index 11e8c632e..44efd14e9 100644
--- a/site/assets/css/site.css
+++ b/site/assets/css/site.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage site.css
diff --git a/site/componentbuilder.php b/site/componentbuilder.php
index 834e15a26..f37c2d88b 100644
--- a/site/componentbuilder.php
+++ b/site/componentbuilder.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php
diff --git a/site/controller.php b/site/controller.php
index 88f460fb1..30c2af709 100644
--- a/site/controller.php
+++ b/site/controller.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage controller.php
diff --git a/site/controllers/api.php b/site/controllers/api.php
index 8f065a6fc..570f28391 100644
--- a/site/controllers/api.php
+++ b/site/controllers/api.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage api.php
diff --git a/site/controllers/help.php b/site/controllers/help.php
index f4abfd708..539ca3f7f 100644
--- a/site/controllers/help.php
+++ b/site/controllers/help.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage help.php
diff --git a/site/helpers/category.php b/site/helpers/category.php
index 058dc7496..484e817ca 100644
--- a/site/helpers/category.php
+++ b/site/helpers/category.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage category.php
diff --git a/site/helpers/categoryfields.php b/site/helpers/categoryfields.php
index 155a69f7c..b471b51cb 100644
--- a/site/helpers/categoryfields.php
+++ b/site/helpers/categoryfields.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage categoryfields.php
diff --git a/site/helpers/categoryfieldtypes.php b/site/helpers/categoryfieldtypes.php
index f2689f8fe..08d1256ed 100644
--- a/site/helpers/categoryfieldtypes.php
+++ b/site/helpers/categoryfieldtypes.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage categoryfieldtypes.php
diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php
index 14bace4f6..60e91ff78 100644
--- a/site/helpers/componentbuilder.php
+++ b/site/helpers/componentbuilder.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php
@@ -256,20 +256,18 @@ abstract class ComponentbuilderHelper
{
$result = $db->loadObject();
$properties = json_decode($result->properties,true);
- $pointer = 0;
$field = array('values' => " '', 'short_description' => $result->short_description, 'description' => $result->description);
- foreach ($properties['name'] as $line)
+ foreach ($properties as $property)
{
- $field['values_description'] .= '- '.$properties['name'][$pointer].' '.$properties['description'][$pointer].'
';
- if(isset($settings[$properties['name'][$pointer]]))
+ $field['values_description'] .= '- '.$property['name'].' '.$property['description'].'
';
+ if(isset($settings[$property['name']]))
{
- $field['values'] .= "\n\t".$properties['name'][$pointer].'="'.$settings[$properties['name'][$pointer]].'" ';
+ $field['values'] .= "\n\t".$property['name'].'="'.$settings[$property['name']].'" ';
}
else
{
- $field['values'] .= "\n\t".$properties['name'][$pointer].'="'.$properties['example'][$pointer].'" ';
+ $field['values'] .= "\n\t".$property['name'].'="'.$property['example'].'" ';
}
- $pointer++;
}
$field['values'] .= "\n/>";
$field['values_description'] .= '
';
diff --git a/site/helpers/headercheck.php b/site/helpers/headercheck.php
index 2619ac8dc..771fb1705 100644
--- a/site/helpers/headercheck.php
+++ b/site/helpers/headercheck.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage headercheck.php
diff --git a/site/helpers/route.php b/site/helpers/route.php
index 2eb8550c8..cc8d16a35 100644
--- a/site/helpers/route.php
+++ b/site/helpers/route.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage route.php
diff --git a/site/router.php b/site/router.php
index 8fe8d6436..0051a44e7 100644
--- a/site/router.php
+++ b/site/router.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage router.php
diff --git a/site/views/api/submitbutton.js b/site/views/api/submitbutton.js
index 1fd592aa4..3ece518de 100644
--- a/site/views/api/submitbutton.js
+++ b/site/views/api/submitbutton.js
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.5.5
- @build 17th September, 2017
+ @build 18th September, 2017
@created 30th April, 2015
@package Component Builder
@subpackage submitbutton.js