This commit is contained in:
Oh
2024-08-20 14:25:24 +02:00
parent 2024bef575
commit 96cb33e792
93 changed files with 859 additions and 299 deletions

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CountriesController.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CountryController.php
@@ -338,7 +338,7 @@ class CountryController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CurrenciesController.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CurrencyController.php
@@ -338,7 +338,7 @@ class CurrencyController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage DisplayController.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage ImportController.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage SubformpowerController.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage SubformpowerComponent.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CountriesField.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CountriesfilterisoField.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CountriesfilterisothreeField.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CountriesfilternumcodeField.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CountriesfilterphonecodeField.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CurrenciesfiltersymbolField.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage HeaderCheck.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage PowerloaderHelper.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage SubformpowerHelper.php
@@ -31,7 +31,7 @@ use Joomla\CMS\Language\Text;
use Joomla\CMS\Access\Access;
use Joomla\CMS\Access\Rules as AccessRules;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Filesystem\File;
use Joomla\Filesystem\File;
use Joomla\CMS\Language\Language;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Object\CMSObject;
@@ -43,9 +43,6 @@ use Joomla\Database\DatabaseInterface;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use JCB\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use JCB\Joomla\Utilities\ObjectHelper;
use JCB\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CountriesModel.php
@@ -421,6 +421,8 @@ class CountriesModel extends ListModel
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Get global switch to activate text only export
$export_text_only = ComponentHelper::getParams('com_subformpower')->get('export_text_only', 0);
// Implement View Level Access
if (!$user->authorise('core.options', 'com_subformpower'))
{

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CountryModel.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CurrenciesModel.php
@@ -350,6 +350,16 @@ class CurrenciesModel extends ListModel
{
$query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Get global switch to activate text only export
$export_text_only = ComponentHelper::getParams('com_subformpower')->get('export_text_only', 0);
// Add these queries only if text only is required
if ($export_text_only)
{
// From the subformpower_country table.
$query->select($db->quoteName(['g.name','g.id'],['country','country_id']));
$query->join('LEFT', $db->quoteName('#__subformpower_country', 'g') . ' ON (' . $db->quoteName('a.country') . ' = ' . $db->quoteName('g.guid') . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_subformpower'))
{

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CurrencyModel.php
@@ -70,7 +70,7 @@ class CurrencyModel extends AdminModel
'country'
),
'above' => array(
'name'
'ext_number'
)
)
);
@@ -697,9 +697,9 @@ class CurrencyModel extends AdminModel
}
// Only for strings
if (UtilitiesStringHelper::check($this->table->name) && !is_numeric($this->table->name))
if (UtilitiesStringHelper::check($this->table->ext_number) && !is_numeric($this->table->ext_number))
{
$this->table->name = $this->generateUnique('name',$this->table->name);
$this->table->ext_number = $this->generateUnique('ext_number',$this->table->ext_number);
}
// insert all set values

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage ImportModel.php
@@ -21,8 +21,8 @@ namespace JCB\Component\Subformpower\Administrator\Model;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Folder;
use Joomla\CMS\Filesystem\Path;
use Joomla\CMS\Filter\OutputFilter;
use Joomla\CMS\Installer\InstallerHelper;

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage SubformpowerModel.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage GuidRule.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CountryTable.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage CurrencyTable.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage HtmlView.php
@@ -25,6 +25,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@@ -46,6 +47,62 @@ use JCB\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Countries view display method
*
@@ -62,7 +119,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= $this->getCurrentUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage HtmlView.php
@@ -25,6 +25,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@@ -45,6 +46,86 @@ use JCB\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/**
* Country view display method
*
@@ -59,7 +140,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_subformpower');
$this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->form ??= $this->get('Form');
$this->item = $this->get('Item');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage HtmlView.php
@@ -25,6 +25,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@@ -46,6 +47,62 @@ use JCB\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Currencies view display method
*
@@ -62,7 +119,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= $this->getCurrentUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage HtmlView.php
@@ -25,6 +25,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@@ -45,6 +46,86 @@ use JCB\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/**
* Currency view display method
*
@@ -59,7 +140,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_subformpower');
$this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->form ??= $this->get('Form');
$this->item = $this->get('Item');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage HtmlView.php

View File

@@ -3,8 +3,8 @@
Nampharm
/-------------------------------------------------------------------------------------------------------/
@version 1.0.0
@build 28th June, 2024
@version 1.0.1
@build 20th August, 2024
@created 24th May, 2024
@package Subform Power
@subpackage HtmlView.php