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

@@ -1,4 +1,4 @@
# Subform Power (1.0.0)
# Subform Power (1.0.1)
Demonstration of subform super power
@@ -8,38 +8,38 @@ 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*: 28th June, 2024
+ *Version*: 1.0.0
+ *Last Build*: 20th August, 2024
+ *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
## Build Time
**69 Hours** or **9 Eight Hour Days** (actual time the author saved -
**71 Hours** or **9 Eight Hour Days** (actual time the author saved -
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*: **24593**
+ *File count*: **229**
+ *Folder count*: **78**
+ *Line count*: **25284**
+ *File count*: **234**
+ *Folder count*: **81**
**45 Hours** or **5 Eight Hour Days** (the actual time the author spent)
**46 Hours** or **6 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @17hours** = codingtime / 4;
> **debugging @18hours** = codingtime / 4;
> **planning @10hours** = codingtime / 7;
> **mapping @7hours** = codingtime / 10;
> **office @11hours** = codingtime / 6;)
> **office @12hours** = codingtime / 6;)
**114 Hours** or **14 Eight Hour Days**
**117 Hours** or **15 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **2.8 weeks** or **0.6 months**
Project duration: **3 weeks** or **0.6 months**
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@@ -2,8 +2,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 admin.css

View File

@@ -2,8 +2,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 countries.css

View File

@@ -2,8 +2,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 country.css

View File

@@ -2,8 +2,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 currencies.css

View File

@@ -2,8 +2,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 currency.css

View File

@@ -2,8 +2,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 dashboard.css

View File

@@ -2,8 +2,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 admin.js

View File

@@ -69,6 +69,41 @@
class="readonly"
/>
</fieldset>
<fieldset
name="export_text_only_config"
label="COM_SUBFORMPOWER_CONFIG_EXPORT_TEXT_ONLY_TAB_LABEL"
description="COM_SUBFORMPOWER_CONFIG_EXPORT_TEXT_ONLY_TAB_DESCRIPTION">
<!-- Export Text Only Field. Type: Radio. (joomla) -->
<field
type="radio"
name="export_text_only"
label="COM_SUBFORMPOWER_CONFIG_EXPORT_TEXT_ONLY_LABEL"
description="COM_SUBFORMPOWER_CONFIG_EXPORT_TEXT_ONLY_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0">
<!-- Option Set. -->
<option value="1">
COM_SUBFORMPOWER_CONFIG_ACTIVATE</option>
<option value="0">
COM_SUBFORMPOWER_CONFIG_DEACTIVATE</option>
</field>
<!-- Strict_permission_per_field Field. Type: Radio. (joomla) -->
<field
type="radio"
name="strict_permission_per_field"
label="COM_SUBFORMPOWER_CONFIG_STRICT_PERMISSION_PER_FIELD_LABEL"
description="COM_SUBFORMPOWER_CONFIG_STRICT_PERMISSION_PER_FIELD_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1">
<!-- Option Set. -->
<option value="1">
COM_SUBFORMPOWER_CONFIG_ACTIVATE</option>
<option value="0">
COM_SUBFORMPOWER_CONFIG_DEACTIVATE</option>
</field>
</fieldset>
<fieldset
name="permissions"
label="JCONFIG_PERMISSIONS_LABEL"

View File

@@ -189,15 +189,15 @@
default="0"
filter="STRING"
/>
<!-- Name Field. Type: Text. (joomla) -->
<!-- Ext_number Field. Type: Number. (joomla) -->
<field
type="text"
name="name"
label="COM_SUBFORMPOWER_COUNTRY_NAME_LABEL"
default=""
description="COM_SUBFORMPOWER_COUNTRY_NAME_DESCRIPTION"
message="COM_SUBFORMPOWER_COUNTRY_NAME_MESSAGE"
hint="COM_SUBFORMPOWER_COUNTRY_NAME_HINT"
type="number"
name="ext_number"
label="COM_SUBFORMPOWER_COUNTRY_EXT_NUMBER_LABEL"
default="9000"
min="1"
max="40"
step="5"
/>
<!-- Symbol Field. Type: Text. (joomla) -->
<field

View File

@@ -97,15 +97,15 @@
default="subformpower currency"
/>
<!-- Dynamic Fields. -->
<!-- Name Field. Type: Text. (joomla) -->
<!-- Ext_number Field. Type: Number. (joomla) -->
<field
type="text"
name="name"
label="COM_SUBFORMPOWER_CURRENCY_NAME_LABEL"
default=""
description="COM_SUBFORMPOWER_CURRENCY_NAME_DESCRIPTION"
message="COM_SUBFORMPOWER_CURRENCY_NAME_MESSAGE"
hint="COM_SUBFORMPOWER_CURRENCY_NAME_HINT"
type="number"
name="ext_number"
label="COM_SUBFORMPOWER_CURRENCY_EXT_NUMBER_LABEL"
default="9000"
min="1"
max="40"
step="5"
/>
<!-- Symbol Field. Type: Text. (joomla) -->
<field

View File

@@ -84,6 +84,7 @@ COM_SUBFORMPOWER_COUNTRY_DETAILS="Details"
COM_SUBFORMPOWER_COUNTRY_EDIT="Editing the Country"
COM_SUBFORMPOWER_COUNTRY_ERROR_UNIQUE_ALIAS="Another Country has the same alias."
COM_SUBFORMPOWER_COUNTRY_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Country has the same alias ."
COM_SUBFORMPOWER_COUNTRY_EXT_NUMBER_LABEL="Extension"
COM_SUBFORMPOWER_COUNTRY_GUID_DESCRIPTION="Globally Unique Identifier"
COM_SUBFORMPOWER_COUNTRY_GUID_HINT="Auto Generated"
COM_SUBFORMPOWER_COUNTRY_GUID_LABEL="GUID"
@@ -156,7 +157,7 @@ COM_SUBFORMPOWER_CURRENCIES_EDIT_STATE_DESC="Allows the users in this group to u
COM_SUBFORMPOWER_CURRENCIES_EDIT_VERSION="Currencies Edit Version"
COM_SUBFORMPOWER_CURRENCIES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version currencies"
COM_SUBFORMPOWER_CURRENCIES_EMPTYSTATE_BUTTON_ADD="Add your first currency"
COM_SUBFORMPOWER_CURRENCIES_EMPTYSTATE_CONTENT="currency view (dynamic build)"
COM_SUBFORMPOWER_CURRENCIES_EMPTYSTATE_CONTENT="currency view"
COM_SUBFORMPOWER_CURRENCIES_EMPTYSTATE_TITLE="No currencies have been created yet."
COM_SUBFORMPOWER_CURRENCIES_EXPORT="Currencies Export"
COM_SUBFORMPOWER_CURRENCIES_EXPORT_DESC="Allows the users in this group to export export currencies"
@@ -195,6 +196,7 @@ COM_SUBFORMPOWER_CURRENCY_DETAILS="Details"
COM_SUBFORMPOWER_CURRENCY_EDIT="Editing the Currency"
COM_SUBFORMPOWER_CURRENCY_ERROR_UNIQUE_ALIAS="Another Currency has the same alias."
COM_SUBFORMPOWER_CURRENCY_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Currency has the same alias ."
COM_SUBFORMPOWER_CURRENCY_EXT_NUMBER_LABEL="Extension"
COM_SUBFORMPOWER_CURRENCY_GUID_DESCRIPTION="Globally Unique Identifier"
COM_SUBFORMPOWER_CURRENCY_GUID_HINT="Auto Generated"
COM_SUBFORMPOWER_CURRENCY_GUID_LABEL="GUID"
@@ -203,10 +205,6 @@ COM_SUBFORMPOWER_CURRENCY_MODIFIED_BY_DESC="The last user that modified this Cur
COM_SUBFORMPOWER_CURRENCY_MODIFIED_BY_LABEL="Modified By"
COM_SUBFORMPOWER_CURRENCY_MODIFIED_DATE_DESC="The date this Currency was modified."
COM_SUBFORMPOWER_CURRENCY_MODIFIED_DATE_LABEL="Modified Date"
COM_SUBFORMPOWER_CURRENCY_NAME_DESCRIPTION="The name is set here."
COM_SUBFORMPOWER_CURRENCY_NAME_HINT="Name Here!"
COM_SUBFORMPOWER_CURRENCY_NAME_LABEL="Name"
COM_SUBFORMPOWER_CURRENCY_NAME_MESSAGE="Error! Please add some name here."
COM_SUBFORMPOWER_CURRENCY_NEW="A New Currency"
COM_SUBFORMPOWER_CURRENCY_ORDERING_LABEL="Ordering"
COM_SUBFORMPOWER_CURRENCY_PERMISSION="Permissions"

View File

@@ -1,5 +1,13 @@
COM_SUBFORMPOWER="Subform Power"
COM_SUBFORMPOWER_CONFIGURATION="Subform Power Configuration"
COM_SUBFORMPOWER_CONFIG_ACTIVATE="Activate"
COM_SUBFORMPOWER_CONFIG_DEACTIVATE="Deactivate"
COM_SUBFORMPOWER_CONFIG_EXPORT_TEXT_ONLY_DESCRIPTION="This option enables the export of string/text instead of linked IDs in all admin views that have an export option."
COM_SUBFORMPOWER_CONFIG_EXPORT_TEXT_ONLY_LABEL="Export Text Only"
COM_SUBFORMPOWER_CONFIG_EXPORT_TEXT_ONLY_TAB_DESCRIPTION="Here are some extra option to adjust the export behaviour of admin views."
COM_SUBFORMPOWER_CONFIG_EXPORT_TEXT_ONLY_TAB_LABEL="Export Options"
COM_SUBFORMPOWER_CONFIG_STRICT_PERMISSION_PER_FIELD_DESCRIPTION="Use strict permissions per/field in the export methods where there are fields permissions in a view."
COM_SUBFORMPOWER_CONFIG_STRICT_PERMISSION_PER_FIELD_LABEL="Use Strict Permission per/field"
COM_SUBFORMPOWER_COUNTRIES_ACCESS="Countries Access"
COM_SUBFORMPOWER_COUNTRIES_ACCESS_DESC="Allows the users in this group to access access countries"
COM_SUBFORMPOWER_COUNTRIES_BATCH_USE="Countries Batch Use"

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 currencies_fullwidth.php
@@ -72,7 +72,7 @@ $can = SubformpowerHelper::getActions('currency');
<thead>
<tr>
<th data-toggle="true">
<?php echo Text::_('COM_SUBFORMPOWER_CURRENCY_NAME_LABEL'); ?>
<?php echo Text::_('COM_SUBFORMPOWER_CURRENCY_EXT_NUMBER_LABEL'); ?>
</th>
<th data-hide="phone">
<?php echo Text::_('COM_SUBFORMPOWER_CURRENCY_SYMBOL_LABEL'); ?>
@@ -100,12 +100,12 @@ $can = SubformpowerHelper::getActions('currency');
<tr>
<td>
<?php if ($canDo->get('currency.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->name); ?></a>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->ext_number); ?></a>
<?php if ($item->checked_out): ?>
<?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'currencies.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<?php echo $displayData->escape($item->name); ?>
<?php echo $displayData->escape($item->ext_number); ?>
<?php endif; ?>
</td>
<td>

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 details_above.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 details_left.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 details_right.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 more_stuff_fullwidth.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 publishing.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 publlshing.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 details_above.php
@@ -35,7 +35,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: [
'name'
'ext_number'
];
// Ensure $fields is treated as an array and count its size.

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 details_left.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 details_right.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 publishing.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 publlshing.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 provider.php

View File

@@ -37,8 +37,8 @@ CREATE TABLE IF NOT EXISTS `#__subformpower_currency` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
`country` VARCHAR(36) NOT NULL DEFAULT '',
`ext_number` INT(10) NOT NULL DEFAULT 0,
`guid` VARCHAR(36) NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`symbol` VARCHAR(255) NULL DEFAULT '',
`params` TEXT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
@@ -53,7 +53,7 @@ CREATE TABLE IF NOT EXISTS `#__subformpower_currency` (
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_name` (`name`),
KEY `idx_ext_number` (`ext_number`),
KEY `idx_country` (`country`),
KEY `idx_guid` (`guid`),
KEY `idx_access` (`access`),

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

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 default.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 default_body.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 default_foot.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 default_head.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 default_toolbar.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 emptystate.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 default.php
@@ -111,14 +111,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'countryTab', 'permissions', Text::_('COM_SUBFORMPOWER_COUNTRY_PERMISSION', true)); ?>
<div class="row">
<div class="col-md-12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_SUBFORMPOWER_COUNTRY_PERMISSION'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
</div>

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 default.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 default_body.php
@@ -76,12 +76,12 @@ $edit = "index.php?option=com_subformpower&view=currencies&task=currency.edit";
<td class="nowrap">
<div class="name">
<?php if ($canDo->get('currency.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->ext_number); ?></a>
<?php if ($item->checked_out): ?>
<?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'currencies.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->name); ?>
<?php echo $this->escape($item->ext_number); ?>
<?php endif; ?>
</div>
</td>

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 default_foot.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 default_head.php
@@ -42,7 +42,7 @@ defined('_JEXEC') or die;
</th>
<?php endif; ?>
<th class="nowrap" >
<?php echo Text::_('COM_SUBFORMPOWER_CURRENCY_NAME_LABEL'); ?>
<?php echo Text::_('COM_SUBFORMPOWER_CURRENCY_EXT_NUMBER_LABEL'); ?>
</th>
<th class="nowrap hidden-phone" >
<?php echo Html::_('searchtools.sort', 'COM_SUBFORMPOWER_CURRENCY_SYMBOL_LABEL', 'a.symbol', $this->listDirn, $this->listOrder); ?>

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 default_toolbar.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 emptystate.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 default.php
@@ -89,14 +89,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'currencyTab', 'permissions', Text::_('COM_SUBFORMPOWER_CURRENCY_PERMISSION', true)); ?>
<div class="row">
<div class="col-md-12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_SUBFORMPOWER_CURRENCY_PERMISSION'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
</div>

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 default.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 default.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 default_main.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 default_vdm.php