diff --git a/README.md b/README.md
index 08c4ad035..e2ae9f2cf 100644
--- a/README.md
+++ b/README.md
@@ -104,11 +104,11 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](http://vdm.bz/component-builder)
+ *First Build*: 30th April, 2015
-+ *Last Build*: 28th March, 2017
++ *Last Build*: 30th March, 2017
+ *Version*: 2.3.9
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
-+ *Line count*: **96161**
++ *Line count*: **96694**
+ *File count*: **610**
+ *Folder count*: **107**
diff --git a/admin/README.txt b/admin/README.txt
index 08c4ad035..e2ae9f2cf 100644
--- a/admin/README.txt
+++ b/admin/README.txt
@@ -104,11 +104,11 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](http://vdm.bz/component-builder)
+ *First Build*: 30th April, 2015
-+ *Last Build*: 28th March, 2017
++ *Last Build*: 30th March, 2017
+ *Version*: 2.3.9
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
-+ *Line count*: **96161**
++ *Line count*: **96694**
+ *File count*: **610**
+ *Folder count*: **107**
diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css
index e5301629a..36a360bed 100644
--- a/admin/assets/css/admin.css
+++ b/admin/assets/css/admin.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.9
- @build 28th March, 2017
+ @build 30th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin.css
diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css
index 78005da4c..e9cbc70df 100644
--- a/admin/assets/css/dashboard.css
+++ b/admin/assets/css/dashboard.css
@@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.9
- @build 28th March, 2017
+ @build 30th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage dashboard.css
diff --git a/admin/assets/css/joomla_component.css b/admin/assets/css/joomla_component.css
index b4e80aa98..867379060 100644
--- a/admin/assets/css/joomla_component.css
+++ b/admin/assets/css/joomla_component.css
@@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 214 of this MVC
- @build 28th March, 2017
+ @version @update number 266 of this MVC
+ @build 30th March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_component.css
diff --git a/admin/assets/css/joomla_components.css b/admin/assets/css/joomla_components.css
index 0894fe81c..3b099679c 100644
--- a/admin/assets/css/joomla_components.css
+++ b/admin/assets/css/joomla_components.css
@@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 214 of this MVC
- @build 28th March, 2017
+ @version @update number 266 of this MVC
+ @build 30th March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_components.css
diff --git a/admin/componentbuilder.php b/admin/componentbuilder.php
index 9f048222c..8412a34c9 100644
--- a/admin/componentbuilder.php
+++ b/admin/componentbuilder.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.9
- @build 28th March, 2017
+ @build 30th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php
diff --git a/admin/config.xml b/admin/config.xml
index ec5230542..2d9335ac8 100644
--- a/admin/config.xml
+++ b/admin/config.xml
@@ -222,6 +222,157 @@
message="Error! Please add folder path here."
hint="COM_COMPONENTBUILDER_CONFIG_GIT_FOLDER_PATH_HINT"
/>
+
+
-
@@ -256,7 +361,7 @@ jQuery(document).ready(function($) {
- ()
+ ()
diff --git a/admin/views/import_joomla_components/view.html.php b/admin/views/import_joomla_components/view.html.php
index ee292ebfa..2bb3c4555 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.3.9
- @build 28th March, 2017
+ @build 30th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage view.html.php
@@ -39,8 +39,8 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
protected $headers;
protected $hasHeader = 0;
protected $dataType;
-
- public $formPackage;
+ protected $packageInfo;
+ protected $formPackage;
public function display($tpl = null)
{
@@ -92,6 +92,7 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
// set form only if smart package
if ($this->dataType === 'smart_package')
{
+ $this->packageInfo = json_decode($session->get('smart_package_info', false), true);
$this->formPackage = $this->getForm();
}
// Display the template
@@ -101,7 +102,7 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
public function getForm()
{
jimport('joomla.form.form');
-
+ $form = array();
$radio1 = JFormHelper::loadFieldType('radio',true);
// Switch to force local update
$xml = '';
@@ -111,26 +112,41 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
$force = new SimpleXMLElement($xml);
// set components to form
$radio1->setup($force,0);
+ // add to form
+ $form[] = $radio1;
- $radio2 = JFormHelper::loadFieldType('radio',true);
- // has key
- $xml = '';
- $xml .= ' ';
- $xml .= "";
- // prepare the xml
- $license = new SimpleXMLElement($xml);
- // set components to form
- $radio2->setup($license,1);
-
- $text1 = JFormHelper::loadFieldType('text',true);
- // add the key
- $xml = '';
- // prepare the xml
- $sleutle = new SimpleXMLElement($xml);
- // set components to form
- $text1->setup($sleutle,'');
+ if (!$this->packageInfo || (isset($this->packageInfo['getKeyFrom']) && ComponentbuilderHelper::checkArray($this->packageInfo['getKeyFrom'])))
+ {
+ // set required field
+ $required = 'required="true"';
+ if (!$this->packageInfo)
+ {
+ $radio2 = JFormHelper::loadFieldType('radio',true);
+ // has key
+ $xml = '';
+ $xml .= ' ';
+ $xml .= "";
+ // prepare the xml
+ $license = new SimpleXMLElement($xml);
+ // set components to form
+ $radio2->setup($license,1);
+ $required = ''; // change required field
+ // add to form
+ $form[] = $radio2;
+ }
+
+ $text1 = JFormHelper::loadFieldType('text',true);
+ // add the key
+ $xml = '';
+ // prepare the xml
+ $sleutle = new SimpleXMLElement($xml);
+ // set components to form
+ $text1->setup($sleutle,'');
+ // add to form
+ $form[] = $text1;
+ }
- return array($radio1,$radio2,$text1);
+ return $form;
}
/**
diff --git a/admin/views/joomla_component/submitbutton.js b/admin/views/joomla_component/submitbutton.js
index 59dda36db..fabad5844 100644
--- a/admin/views/joomla_component/submitbutton.js
+++ b/admin/views/joomla_component/submitbutton.js
@@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 214 of this MVC
- @build 28th March, 2017
+ @version @update number 266 of this MVC
+ @build 30th March, 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 22fe6c23e..9096925ce 100644
--- a/admin/views/joomla_component/tmpl/edit.php
+++ b/admin/views/joomla_component/tmpl/edit.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 214 of this MVC
- @build 28th March, 2017
+ @version @update number 266 of this MVC
+ @build 30th March, 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 b549d9bec..0b66c13a0 100644
--- a/admin/views/joomla_component/view.html.php
+++ b/admin/views/joomla_component/view.html.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 214 of this MVC
- @build 28th March, 2017
+ @version @update number 266 of this MVC
+ @build 30th March, 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 da9d64094..105802290 100644
--- a/admin/views/joomla_components/tmpl/default.php
+++ b/admin/views/joomla_components/tmpl/default.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 214 of this MVC
- @build 28th March, 2017
+ @version @update number 266 of this MVC
+ @build 30th March, 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 6f1fd52e1..5f10312a3 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 214 of this MVC
- @build 28th March, 2017
+ @version @update number 266 of this MVC
+ @build 30th March, 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 248e5d890..a9001b2ff 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 214 of this MVC
- @build 28th March, 2017
+ @version @update number 266 of this MVC
+ @build 30th March, 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 13a469be5..d06508bb5 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 214 of this MVC
- @build 28th March, 2017
+ @version @update number 266 of this MVC
+ @build 30th March, 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 0eb27f788..468b96b9f 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 214 of this MVC
- @build 28th March, 2017
+ @version @update number 266 of this MVC
+ @build 30th March, 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 60c24f1d1..0996be333 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 214 of this MVC
- @build 28th March, 2017
+ @version @update number 266 of this MVC
+ @build 30th March, 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 d727eba9a..8a6b5fe2e 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 214 of this MVC
- @build 28th March, 2017
+ @version @update number 266 of this MVC
+ @build 30th March, 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 18dad7243..6b76f0e20 100644
--- a/admin/views/joomla_components/view.html.php
+++ b/admin/views/joomla_components/view.html.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 214 of this MVC
- @build 28th March, 2017
+ @version @update number 266 of this MVC
+ @build 30th March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage view.html.php
diff --git a/componentbuilder.xml b/componentbuilder.xml
index 4636962e9..344c6134b 100644
--- a/componentbuilder.xml
+++ b/componentbuilder.xml
@@ -1,7 +1,7 @@
COM_COMPONENTBUILDER
- 28th March, 2017
+ 30th March, 2017
Llewellyn van der Merwe
joomla@vdm.io
http://vdm.bz/component-builder
diff --git a/script.php b/script.php
index c991d0f2c..3012ba5b6 100644
--- a/script.php
+++ b/script.php
@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.9
- @build 28th March, 2017
+ @build 30th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage script.php
@@ -1518,7 +1518,7 @@ class com_componentbuilderInstallerScript
// Field to update.
$fields = array(
- $db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"joomla@vdm.io","minify":"0","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'),
+ $db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"joomla@vdm.io","minify":"0","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'),
);
// Condition.