diff --git a/README.md b/README.md index 4fad8b2..78bf249 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Demonstration of subform super power + *Author*: [Oh Martin](mailto:oh@nampharm.com.na) + *Name*: [Subform Power](https://nampharm.com.na) + *First Build*: 24th May, 2024 -+ *Last Build*: 4th February, 2025 ++ *Last Build*: 5th February, 2025 + *Version*: 1.0.1 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -21,7 +21,7 @@ due to [Automated Component Builder](https://www.joomlacomponentbuilder.com)) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > never making one mistake or taking any coffee break.) -+ *Line count*: **25865** ++ *Line count*: **25909** + *File count*: **246** + *Folder count*: **85** diff --git a/SubformpowerInstallerPowerloader.php b/SubformpowerInstallerPowerloader.php index b958771..bd09e18 100644 --- a/SubformpowerInstallerPowerloader.php +++ b/SubformpowerInstallerPowerloader.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage SubformpowerInstallerPowerloader.php diff --git a/SubformpowerInstallerScript.php b/SubformpowerInstallerScript.php index 3524321..db52da3 100644 --- a/SubformpowerInstallerScript.php +++ b/SubformpowerInstallerScript.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage SubformpowerInstallerScript.php diff --git a/admin/README.txt b/admin/README.txt index 4fad8b2..78bf249 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -8,7 +8,7 @@ Demonstration of subform super power + *Author*: [Oh Martin](mailto:oh@nampharm.com.na) + *Name*: [Subform Power](https://nampharm.com.na) + *First Build*: 24th May, 2024 -+ *Last Build*: 4th February, 2025 ++ *Last Build*: 5th February, 2025 + *Version*: 1.0.1 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -21,7 +21,7 @@ due to [Automated Component Builder](https://www.joomlacomponentbuilder.com)) > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > never making one mistake or taking any coffee break.) -+ *Line count*: **25865** ++ *Line count*: **25909** + *File count*: **246** + *Folder count*: **85** diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index dfa224d..c71621c 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -3,7 +3,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage admin.css diff --git a/admin/assets/css/countries.css b/admin/assets/css/countries.css index a87cd41..83c3a18 100644 --- a/admin/assets/css/countries.css +++ b/admin/assets/css/countries.css @@ -3,7 +3,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage countries.css diff --git a/admin/assets/css/country.css b/admin/assets/css/country.css index 41cbd37..1925055 100644 --- a/admin/assets/css/country.css +++ b/admin/assets/css/country.css @@ -3,7 +3,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage country.css diff --git a/admin/assets/css/currencies.css b/admin/assets/css/currencies.css index 2e126af..3e5865f 100644 --- a/admin/assets/css/currencies.css +++ b/admin/assets/css/currencies.css @@ -3,7 +3,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage currencies.css diff --git a/admin/assets/css/currency.css b/admin/assets/css/currency.css index 9a80816..3c62866 100644 --- a/admin/assets/css/currency.css +++ b/admin/assets/css/currency.css @@ -3,7 +3,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage currency.css diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index cbfd240..da3a820 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/dashboard.css @@ -3,7 +3,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage dashboard.css diff --git a/admin/assets/js/admin.js b/admin/assets/js/admin.js index 17d65ef..bb92445 100644 --- a/admin/assets/js/admin.js +++ b/admin/assets/js/admin.js @@ -3,7 +3,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage admin.js diff --git a/admin/layouts/country/currencies_fullwidth.php b/admin/layouts/country/currencies_fullwidth.php index 6dc5de7..5048322 100644 --- a/admin/layouts/country/currencies_fullwidth.php +++ b/admin/layouts/country/currencies_fullwidth.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage currencies_fullwidth.php diff --git a/admin/layouts/country/details_above.php b/admin/layouts/country/details_above.php index ae95e52..a0f518e 100644 --- a/admin/layouts/country/details_above.php +++ b/admin/layouts/country/details_above.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage details_above.php diff --git a/admin/layouts/country/details_left.php b/admin/layouts/country/details_left.php index 2713918..422ae73 100644 --- a/admin/layouts/country/details_left.php +++ b/admin/layouts/country/details_left.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage details_left.php diff --git a/admin/layouts/country/details_right.php b/admin/layouts/country/details_right.php index 35b25aa..bc49e0b 100644 --- a/admin/layouts/country/details_right.php +++ b/admin/layouts/country/details_right.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage details_right.php diff --git a/admin/layouts/country/more_stuff_fullwidth.php b/admin/layouts/country/more_stuff_fullwidth.php index 60540c2..4573616 100644 --- a/admin/layouts/country/more_stuff_fullwidth.php +++ b/admin/layouts/country/more_stuff_fullwidth.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage more_stuff_fullwidth.php diff --git a/admin/layouts/country/publishing.php b/admin/layouts/country/publishing.php index 32a64ca..c4c25fe 100644 --- a/admin/layouts/country/publishing.php +++ b/admin/layouts/country/publishing.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage publishing.php diff --git a/admin/layouts/country/publlshing.php b/admin/layouts/country/publlshing.php index bf11005..14410e0 100644 --- a/admin/layouts/country/publlshing.php +++ b/admin/layouts/country/publlshing.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage publlshing.php diff --git a/admin/layouts/currency/details_above.php b/admin/layouts/currency/details_above.php index 3b1c0aa..c77b8f9 100644 --- a/admin/layouts/currency/details_above.php +++ b/admin/layouts/currency/details_above.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage details_above.php diff --git a/admin/layouts/currency/details_left.php b/admin/layouts/currency/details_left.php index 90271d0..4835053 100644 --- a/admin/layouts/currency/details_left.php +++ b/admin/layouts/currency/details_left.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage details_left.php diff --git a/admin/layouts/currency/details_right.php b/admin/layouts/currency/details_right.php index 63c70d9..16fed4e 100644 --- a/admin/layouts/currency/details_right.php +++ b/admin/layouts/currency/details_right.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage details_right.php diff --git a/admin/layouts/currency/publishing.php b/admin/layouts/currency/publishing.php index 32a64ca..c4c25fe 100644 --- a/admin/layouts/currency/publishing.php +++ b/admin/layouts/currency/publishing.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage publishing.php diff --git a/admin/layouts/currency/publlshing.php b/admin/layouts/currency/publlshing.php index bf11005..14410e0 100644 --- a/admin/layouts/currency/publlshing.php +++ b/admin/layouts/currency/publlshing.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage publlshing.php diff --git a/admin/services/provider.php b/admin/services/provider.php index bd2be5f..35d9463 100644 --- a/admin/services/provider.php +++ b/admin/services/provider.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage provider.php diff --git a/admin/src/Controller/CountriesController.php b/admin/src/Controller/CountriesController.php index 48e6a74..16d0f86 100644 --- a/admin/src/Controller/CountriesController.php +++ b/admin/src/Controller/CountriesController.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CountriesController.php diff --git a/admin/src/Controller/CountryController.php b/admin/src/Controller/CountryController.php index 9f85d36..c8275a8 100644 --- a/admin/src/Controller/CountryController.php +++ b/admin/src/Controller/CountryController.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CountryController.php @@ -186,13 +186,22 @@ class CountryController extends FormController */ protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') { - // get the referral options (old method use return instead see parent) + // get int-defaults (to int new items with default values dynamically) + $init_defaults = $this->input->get('init_defaults', null, 'STRING'); + + // get the referral options (old method use init_defaults or return instead see parent) $ref = $this->input->get('ref', 0, 'string'); $refid = $this->input->get('refid', 0, 'int'); // get redirect info. $append = parent::getRedirectToItemAppend($recordId, $urlVar); + // set int-defaults + if (!empty($init_defaults)) + { + $append = '&init_defaults='. (string) $init_defaults . $append; + } + // set the referral options if ($refid && $ref) { diff --git a/admin/src/Controller/CurrenciesController.php b/admin/src/Controller/CurrenciesController.php index e525bcd..1912544 100644 --- a/admin/src/Controller/CurrenciesController.php +++ b/admin/src/Controller/CurrenciesController.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CurrenciesController.php diff --git a/admin/src/Controller/CurrencyController.php b/admin/src/Controller/CurrencyController.php index 6e2897e..ff0df65 100644 --- a/admin/src/Controller/CurrencyController.php +++ b/admin/src/Controller/CurrencyController.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CurrencyController.php @@ -186,13 +186,22 @@ class CurrencyController extends FormController */ protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') { - // get the referral options (old method use return instead see parent) + // get int-defaults (to int new items with default values dynamically) + $init_defaults = $this->input->get('init_defaults', null, 'STRING'); + + // get the referral options (old method use init_defaults or return instead see parent) $ref = $this->input->get('ref', 0, 'string'); $refid = $this->input->get('refid', 0, 'int'); // get redirect info. $append = parent::getRedirectToItemAppend($recordId, $urlVar); + // set int-defaults + if (!empty($init_defaults)) + { + $append = '&init_defaults='. (string) $init_defaults . $append; + } + // set the referral options if ($refid && $ref) { diff --git a/admin/src/Controller/DisplayController.php b/admin/src/Controller/DisplayController.php index bdaadd6..6d5ac8b 100644 --- a/admin/src/Controller/DisplayController.php +++ b/admin/src/Controller/DisplayController.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage DisplayController.php diff --git a/admin/src/Controller/ImportController.php b/admin/src/Controller/ImportController.php index 3afd256..e943776 100644 --- a/admin/src/Controller/ImportController.php +++ b/admin/src/Controller/ImportController.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage ImportController.php diff --git a/admin/src/Controller/SubformpowerController.php b/admin/src/Controller/SubformpowerController.php index dd56bea..9ada905 100644 --- a/admin/src/Controller/SubformpowerController.php +++ b/admin/src/Controller/SubformpowerController.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage SubformpowerController.php diff --git a/admin/src/Extension/SubformpowerComponent.php b/admin/src/Extension/SubformpowerComponent.php index 464006e..aa910f9 100644 --- a/admin/src/Extension/SubformpowerComponent.php +++ b/admin/src/Extension/SubformpowerComponent.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage SubformpowerComponent.php diff --git a/admin/src/Field/CountriesField.php b/admin/src/Field/CountriesField.php index 0f39e6d..ac7eefc 100644 --- a/admin/src/Field/CountriesField.php +++ b/admin/src/Field/CountriesField.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CountriesField.php diff --git a/admin/src/Field/CountriesfilterisoField.php b/admin/src/Field/CountriesfilterisoField.php index 0c6da81..c1c805c 100644 --- a/admin/src/Field/CountriesfilterisoField.php +++ b/admin/src/Field/CountriesfilterisoField.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CountriesfilterisoField.php diff --git a/admin/src/Field/CountriesfilterisothreeField.php b/admin/src/Field/CountriesfilterisothreeField.php index fa7b572..0b8acb4 100644 --- a/admin/src/Field/CountriesfilterisothreeField.php +++ b/admin/src/Field/CountriesfilterisothreeField.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CountriesfilterisothreeField.php diff --git a/admin/src/Field/CountriesfilternumcodeField.php b/admin/src/Field/CountriesfilternumcodeField.php index edbe9e0..29e7e0a 100644 --- a/admin/src/Field/CountriesfilternumcodeField.php +++ b/admin/src/Field/CountriesfilternumcodeField.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CountriesfilternumcodeField.php diff --git a/admin/src/Field/CountriesfilterphonecodeField.php b/admin/src/Field/CountriesfilterphonecodeField.php index 1df4eb0..d295724 100644 --- a/admin/src/Field/CountriesfilterphonecodeField.php +++ b/admin/src/Field/CountriesfilterphonecodeField.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CountriesfilterphonecodeField.php diff --git a/admin/src/Field/CurrenciesfiltersymbolField.php b/admin/src/Field/CurrenciesfiltersymbolField.php index 6a9e3fd..39cbe5a 100644 --- a/admin/src/Field/CurrenciesfiltersymbolField.php +++ b/admin/src/Field/CurrenciesfiltersymbolField.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CurrenciesfiltersymbolField.php diff --git a/admin/src/Helper/HeaderCheck.php b/admin/src/Helper/HeaderCheck.php index 4544f71..9a87b19 100644 --- a/admin/src/Helper/HeaderCheck.php +++ b/admin/src/Helper/HeaderCheck.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage HeaderCheck.php diff --git a/admin/src/Helper/PowerloaderHelper.php b/admin/src/Helper/PowerloaderHelper.php index e3ce705..eb59753 100644 --- a/admin/src/Helper/PowerloaderHelper.php +++ b/admin/src/Helper/PowerloaderHelper.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage PowerloaderHelper.php diff --git a/admin/src/Helper/SubformpowerHelper.php b/admin/src/Helper/SubformpowerHelper.php index f48637e..ce9776e 100644 --- a/admin/src/Helper/SubformpowerHelper.php +++ b/admin/src/Helper/SubformpowerHelper.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage SubformpowerHelper.php diff --git a/admin/src/Model/CountriesModel.php b/admin/src/Model/CountriesModel.php index 52b021b..743a47a 100644 --- a/admin/src/Model/CountriesModel.php +++ b/admin/src/Model/CountriesModel.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CountriesModel.php diff --git a/admin/src/Model/CountryModel.php b/admin/src/Model/CountryModel.php index a4100c5..a0e34e0 100644 --- a/admin/src/Model/CountryModel.php +++ b/admin/src/Model/CountryModel.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CountryModel.php @@ -391,6 +391,19 @@ class CountryModel extends AdminModel // Now set the local-redirected field default value $form->setValue($redirectedField, null, $redirectedValue); } + $initDefaults = $jinput->get('init_defaults', null, 'STRING'); + if (!empty($initDefaults)) + { + // Now check if this json values are valid + $initDefaults = json_decode(urldecode($initDefaults), true); + if (is_array($initDefaults)) + { + foreach ($initDefaults as $field => $value) + { + $form->setValue($field, null, $value); + } + } + } } // Only load the GUID if new item (or empty) diff --git a/admin/src/Model/CurrenciesModel.php b/admin/src/Model/CurrenciesModel.php index d149794..1991208 100644 --- a/admin/src/Model/CurrenciesModel.php +++ b/admin/src/Model/CurrenciesModel.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CurrenciesModel.php diff --git a/admin/src/Model/CurrencyModel.php b/admin/src/Model/CurrencyModel.php index e1bd9fe..06cdb1e 100644 --- a/admin/src/Model/CurrencyModel.php +++ b/admin/src/Model/CurrencyModel.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CurrencyModel.php @@ -281,6 +281,19 @@ class CurrencyModel extends AdminModel // Now set the local-redirected field default value $form->setValue($redirectedField, null, $redirectedValue); } + $initDefaults = $jinput->get('init_defaults', null, 'STRING'); + if (!empty($initDefaults)) + { + // Now check if this json values are valid + $initDefaults = json_decode(urldecode($initDefaults), true); + if (is_array($initDefaults)) + { + foreach ($initDefaults as $field => $value) + { + $form->setValue($field, null, $value); + } + } + } } // Only load the GUID if new item (or empty) diff --git a/admin/src/Model/ImportModel.php b/admin/src/Model/ImportModel.php index 0b3d0c9..2a93ef8 100644 --- a/admin/src/Model/ImportModel.php +++ b/admin/src/Model/ImportModel.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage ImportModel.php diff --git a/admin/src/Model/SubformpowerModel.php b/admin/src/Model/SubformpowerModel.php index 4650757..1c6b965 100644 --- a/admin/src/Model/SubformpowerModel.php +++ b/admin/src/Model/SubformpowerModel.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage SubformpowerModel.php diff --git a/admin/src/Rule/GuidRule.php b/admin/src/Rule/GuidRule.php index 4803c16..32511bc 100644 --- a/admin/src/Rule/GuidRule.php +++ b/admin/src/Rule/GuidRule.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage GuidRule.php diff --git a/admin/src/Table/CountryTable.php b/admin/src/Table/CountryTable.php index e844b18..1ee53de 100644 --- a/admin/src/Table/CountryTable.php +++ b/admin/src/Table/CountryTable.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CountryTable.php diff --git a/admin/src/Table/CurrencyTable.php b/admin/src/Table/CurrencyTable.php index 50ee666..90f4168 100644 --- a/admin/src/Table/CurrencyTable.php +++ b/admin/src/Table/CurrencyTable.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CurrencyTable.php diff --git a/admin/src/View/Countries/HtmlView.php b/admin/src/View/Countries/HtmlView.php index f78947d..856b0fa 100644 --- a/admin/src/View/Countries/HtmlView.php +++ b/admin/src/View/Countries/HtmlView.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage HtmlView.php diff --git a/admin/src/View/Country/HtmlView.php b/admin/src/View/Country/HtmlView.php index 3066f5c..b683ebf 100644 --- a/admin/src/View/Country/HtmlView.php +++ b/admin/src/View/Country/HtmlView.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage HtmlView.php diff --git a/admin/src/View/Currencies/HtmlView.php b/admin/src/View/Currencies/HtmlView.php index 1201cdc..79d6a0a 100644 --- a/admin/src/View/Currencies/HtmlView.php +++ b/admin/src/View/Currencies/HtmlView.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage HtmlView.php diff --git a/admin/src/View/Currency/HtmlView.php b/admin/src/View/Currency/HtmlView.php index ccdaf74..7f7f7f1 100644 --- a/admin/src/View/Currency/HtmlView.php +++ b/admin/src/View/Currency/HtmlView.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage HtmlView.php diff --git a/admin/src/View/Import/HtmlView.php b/admin/src/View/Import/HtmlView.php index 313230c..73de9c0 100644 --- a/admin/src/View/Import/HtmlView.php +++ b/admin/src/View/Import/HtmlView.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage HtmlView.php diff --git a/admin/src/View/Subformpower/HtmlView.php b/admin/src/View/Subformpower/HtmlView.php index ea8cff0..97c89a8 100644 --- a/admin/src/View/Subformpower/HtmlView.php +++ b/admin/src/View/Subformpower/HtmlView.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage HtmlView.php diff --git a/admin/tmpl/countries/default.php b/admin/tmpl/countries/default.php index 3e2a29f..d1fbc25 100644 --- a/admin/tmpl/countries/default.php +++ b/admin/tmpl/countries/default.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default.php diff --git a/admin/tmpl/countries/default_body.php b/admin/tmpl/countries/default_body.php index 89e6151..a55d51c 100644 --- a/admin/tmpl/countries/default_body.php +++ b/admin/tmpl/countries/default_body.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default_body.php diff --git a/admin/tmpl/countries/default_foot.php b/admin/tmpl/countries/default_foot.php index 30e67a2..2736265 100644 --- a/admin/tmpl/countries/default_foot.php +++ b/admin/tmpl/countries/default_foot.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default_foot.php diff --git a/admin/tmpl/countries/default_head.php b/admin/tmpl/countries/default_head.php index 425809e..60d3a03 100644 --- a/admin/tmpl/countries/default_head.php +++ b/admin/tmpl/countries/default_head.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default_head.php diff --git a/admin/tmpl/countries/default_toolbar.php b/admin/tmpl/countries/default_toolbar.php index a379d20..f4000c0 100644 --- a/admin/tmpl/countries/default_toolbar.php +++ b/admin/tmpl/countries/default_toolbar.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default_toolbar.php diff --git a/admin/tmpl/countries/emptystate.php b/admin/tmpl/countries/emptystate.php index e6937f7..236cd1b 100644 --- a/admin/tmpl/countries/emptystate.php +++ b/admin/tmpl/countries/emptystate.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage emptystate.php diff --git a/admin/tmpl/country/default.php b/admin/tmpl/country/default.php index 08e3e38..4748fe1 100644 --- a/admin/tmpl/country/default.php +++ b/admin/tmpl/country/default.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default.php diff --git a/admin/tmpl/currencies/default.php b/admin/tmpl/currencies/default.php index a515276..cea4e15 100644 --- a/admin/tmpl/currencies/default.php +++ b/admin/tmpl/currencies/default.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default.php diff --git a/admin/tmpl/currencies/default_body.php b/admin/tmpl/currencies/default_body.php index 301304c..fdaf756 100644 --- a/admin/tmpl/currencies/default_body.php +++ b/admin/tmpl/currencies/default_body.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default_body.php diff --git a/admin/tmpl/currencies/default_foot.php b/admin/tmpl/currencies/default_foot.php index d032eca..b7daedc 100644 --- a/admin/tmpl/currencies/default_foot.php +++ b/admin/tmpl/currencies/default_foot.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default_foot.php diff --git a/admin/tmpl/currencies/default_head.php b/admin/tmpl/currencies/default_head.php index 59ed987..2103316 100644 --- a/admin/tmpl/currencies/default_head.php +++ b/admin/tmpl/currencies/default_head.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default_head.php diff --git a/admin/tmpl/currencies/default_toolbar.php b/admin/tmpl/currencies/default_toolbar.php index 559b685..8aa89d8 100644 --- a/admin/tmpl/currencies/default_toolbar.php +++ b/admin/tmpl/currencies/default_toolbar.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default_toolbar.php diff --git a/admin/tmpl/currencies/emptystate.php b/admin/tmpl/currencies/emptystate.php index 86ea640..e4ab176 100644 --- a/admin/tmpl/currencies/emptystate.php +++ b/admin/tmpl/currencies/emptystate.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage emptystate.php diff --git a/admin/tmpl/currency/default.php b/admin/tmpl/currency/default.php index 7af3b63..c4836b6 100644 --- a/admin/tmpl/currency/default.php +++ b/admin/tmpl/currency/default.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default.php diff --git a/admin/tmpl/import/default.php b/admin/tmpl/import/default.php index 72e18bb..bb39496 100644 --- a/admin/tmpl/import/default.php +++ b/admin/tmpl/import/default.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default.php diff --git a/admin/tmpl/subformpower/default.php b/admin/tmpl/subformpower/default.php index 8bb33a1..5d3485e 100644 --- a/admin/tmpl/subformpower/default.php +++ b/admin/tmpl/subformpower/default.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default.php diff --git a/admin/tmpl/subformpower/default_main.php b/admin/tmpl/subformpower/default_main.php index 063eaca..91571c9 100644 --- a/admin/tmpl/subformpower/default_main.php +++ b/admin/tmpl/subformpower/default_main.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default_main.php diff --git a/admin/tmpl/subformpower/default_vdm.php b/admin/tmpl/subformpower/default_vdm.php index 5491fb1..3f2b730 100644 --- a/admin/tmpl/subformpower/default_vdm.php +++ b/admin/tmpl/subformpower/default_vdm.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage default_vdm.php diff --git a/api/src/Controller/CountriesController.php b/api/src/Controller/CountriesController.php index a1e5be1..063354c 100644 --- a/api/src/Controller/CountriesController.php +++ b/api/src/Controller/CountriesController.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CountriesController.php diff --git a/api/src/Controller/CountryController.php b/api/src/Controller/CountryController.php index d397430..e566d76 100644 --- a/api/src/Controller/CountryController.php +++ b/api/src/Controller/CountryController.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CountryController.php diff --git a/api/src/Controller/CurrenciesController.php b/api/src/Controller/CurrenciesController.php index 1544d64..e7427b4 100644 --- a/api/src/Controller/CurrenciesController.php +++ b/api/src/Controller/CurrenciesController.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CurrenciesController.php diff --git a/api/src/Controller/CurrencyController.php b/api/src/Controller/CurrencyController.php index 013d743..d37e9f2 100644 --- a/api/src/Controller/CurrencyController.php +++ b/api/src/Controller/CurrencyController.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage CurrencyController.php diff --git a/api/src/View/Countries/JsonapiView.php b/api/src/View/Countries/JsonapiView.php index 0a2fa42..82993b8 100644 --- a/api/src/View/Countries/JsonapiView.php +++ b/api/src/View/Countries/JsonapiView.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage JsonapiView.php diff --git a/api/src/View/Country/JsonapiView.php b/api/src/View/Country/JsonapiView.php index 320e20d..a85e99b 100644 --- a/api/src/View/Country/JsonapiView.php +++ b/api/src/View/Country/JsonapiView.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage JsonapiView.php diff --git a/api/src/View/Currencies/JsonapiView.php b/api/src/View/Currencies/JsonapiView.php index 569d019..7d26dee 100644 --- a/api/src/View/Currencies/JsonapiView.php +++ b/api/src/View/Currencies/JsonapiView.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage JsonapiView.php diff --git a/api/src/View/Currency/JsonapiView.php b/api/src/View/Currency/JsonapiView.php index 46e9446..abda596 100644 --- a/api/src/View/Currency/JsonapiView.php +++ b/api/src/View/Currency/JsonapiView.php @@ -4,7 +4,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage JsonapiView.php diff --git a/media/js/country.js b/media/js/country.js index 09e6808..d623823 100644 --- a/media/js/country.js +++ b/media/js/country.js @@ -3,7 +3,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage country.js diff --git a/media/js/currency.js b/media/js/currency.js index ad2793d..479e7ad 100644 --- a/media/js/currency.js +++ b/media/js/currency.js @@ -3,7 +3,7 @@ /-------------------------------------------------------------------------------------------------------/ @version 1.0.1 - @build 4th February, 2025 + @build 5th February, 2025 @created 24th May, 2024 @package Subform Power @subpackage currency.js diff --git a/subformpower.xml b/subformpower.xml index dabce5a..e671d4e 100644 --- a/subformpower.xml +++ b/subformpower.xml @@ -1,7 +1,7 @@ COM_SUBFORMPOWER - 4th February, 2025 + 5th February, 2025 Oh Martin oh@nampharm.com.na https://nampharm.com.na