forked from ohrionmartin/subform-power
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
86a9529ce0
|
|||
752a42b2cb
|
|||
ab99fc1336
|
|||
96cb33e792
|
|||
2024bef575
|
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/subform-power.iml" filepath="$PROJECT_DIR$/.idea/subform-power.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
22
.idea/php.xml
generated
Normal file
22
.idea/php.xml
generated
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="MessDetectorOptionsConfiguration">
|
||||||
|
<option name="transferred" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PHPCSFixerOptionsConfiguration">
|
||||||
|
<option name="transferred" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PHPCodeSnifferOptionsConfiguration">
|
||||||
|
<option name="highlightLevel" value="WARNING" />
|
||||||
|
<option name="transferred" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PhpProjectSharedConfiguration" php_language_level="7.4">
|
||||||
|
<option name="suggestChangeDefaultLanguageLevel" value="false" />
|
||||||
|
</component>
|
||||||
|
<component name="PhpStanOptionsConfiguration">
|
||||||
|
<option name="transferred" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PsalmOptionsConfiguration">
|
||||||
|
<option name="transferred" value="true" />
|
||||||
|
</component>
|
||||||
|
</project>
|
8
.idea/subform-power.iml
generated
Normal file
8
.idea/subform-power.iml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="WEB_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
24
README.md
24
README.md
@@ -1,4 +1,4 @@
|
|||||||
# Subform Power (1.0.0)
|
# Subform Power (1.0.1)
|
||||||
|
|
||||||
Demonstration of subform super power
|
Demonstration of subform super power
|
||||||
|
|
||||||
@@ -8,38 +8,38 @@ Demonstration of subform super power
|
|||||||
+ *Author*: [Oh Martin](mailto:oh@nampharm.com.na)
|
+ *Author*: [Oh Martin](mailto:oh@nampharm.com.na)
|
||||||
+ *Name*: [Subform Power](https://nampharm.com.na)
|
+ *Name*: [Subform Power](https://nampharm.com.na)
|
||||||
+ *First Build*: 24th May, 2024
|
+ *First Build*: 24th May, 2024
|
||||||
+ *Last Build*: 27th June, 2024
|
+ *Last Build*: 5th February, 2025
|
||||||
+ *Version*: 1.0.0
|
+ *Version*: 1.0.1
|
||||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
|
||||||
## Build Time
|
## Build Time
|
||||||
|
|
||||||
**69 Hours** or **9 Eight Hour Days** (actual time the author saved -
|
**72 Hours** or **9 Eight Hour Days** (actual time the author saved -
|
||||||
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
|
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**,
|
> (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.)
|
> never making one mistake or taking any coffee break.)
|
||||||
|
|
||||||
+ *Line count*: **24593**
|
+ *Line count*: **25909**
|
||||||
+ *File count*: **229**
|
+ *File count*: **246**
|
||||||
+ *Folder count*: **78**
|
+ *Folder count*: **85**
|
||||||
|
|
||||||
**45 Hours** or **5 Eight Hour Days** (the actual time the author spent)
|
**48 Hours** or **6 Eight Hour Days** (the actual time the author spent)
|
||||||
|
|
||||||
> (with the following break down:
|
> (with the following break down:
|
||||||
> **debugging @17hours** = codingtime / 4;
|
> **debugging @18hours** = codingtime / 4;
|
||||||
> **planning @10hours** = codingtime / 7;
|
> **planning @10hours** = codingtime / 7;
|
||||||
> **mapping @7hours** = codingtime / 10;
|
> **mapping @7hours** = codingtime / 10;
|
||||||
> **office @11hours** = codingtime / 6;)
|
> **office @12hours** = codingtime / 6;)
|
||||||
|
|
||||||
**114 Hours** or **14 Eight Hour Days**
|
**120 Hours** or **15 Eight Hour Days**
|
||||||
(a total of the realistic time frame for this project)
|
(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**,
|
> (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.)
|
> 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).
|
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||||
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
65
SubformpowerInstallerPowerloader.php
Normal file
65
SubformpowerInstallerPowerloader.php
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||||
|
Nampharm
|
||||||
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
|
@version 1.0.1
|
||||||
|
@build 5th February, 2025
|
||||||
|
@created 24th May, 2024
|
||||||
|
@package Subform Power
|
||||||
|
@subpackage SubformpowerInstallerPowerloader.php
|
||||||
|
@author Oh Martin <https://nampharm.com.na>
|
||||||
|
@copyright Copyright (C) 2015. All Rights Reserved
|
||||||
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||||
|
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||||
|
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||||
|
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||||
|
|
||||||
|
/------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// No direct access to this file
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
// register additional namespace
|
||||||
|
spl_autoload_register(function ($class) {
|
||||||
|
// project-specific base directories and namespace prefix
|
||||||
|
$search = [
|
||||||
|
'libraries/jcb_powers/JCB.Joomla' => 'JCB\\Joomla'
|
||||||
|
];
|
||||||
|
// Start the search and load if found
|
||||||
|
$found = false;
|
||||||
|
$found_base_dir = "";
|
||||||
|
$found_len = 0;
|
||||||
|
foreach ($search as $base_dir => $prefix)
|
||||||
|
{
|
||||||
|
// does the class use the namespace prefix?
|
||||||
|
$len = strlen($prefix);
|
||||||
|
if (strncmp($prefix, $class, $len) === 0)
|
||||||
|
{
|
||||||
|
// we have a match so load the values
|
||||||
|
$found = true;
|
||||||
|
$found_base_dir = $base_dir;
|
||||||
|
$found_len = $len;
|
||||||
|
// done here
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// check if we found a match
|
||||||
|
if (!$found)
|
||||||
|
{
|
||||||
|
// not found so move to the next registered autoloader
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// get the relative class name
|
||||||
|
$relative_class = substr($class, $found_len);
|
||||||
|
// replace the namespace prefix with the base directory, replace namespace
|
||||||
|
// separators with directory separators in the relative class name, append
|
||||||
|
// with .php
|
||||||
|
$file = __DIR__ . '/' . $found_base_dir . '/src' . str_replace('\\', '/', $relative_class) . '.php';
|
||||||
|
// if the file exists, require it
|
||||||
|
if (file_exists($file))
|
||||||
|
{
|
||||||
|
require $file;
|
||||||
|
}
|
||||||
|
});
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage SubformpowerInstallerScript.php
|
@subpackage SubformpowerInstallerScript.php
|
||||||
@@ -23,7 +23,6 @@ use Joomla\CMS\Language\Text;
|
|||||||
use Joomla\CMS\Filesystem\File;
|
use Joomla\CMS\Filesystem\File;
|
||||||
use Joomla\CMS\Installer\InstallerAdapter;
|
use Joomla\CMS\Installer\InstallerAdapter;
|
||||||
use Joomla\CMS\Installer\InstallerScriptInterface;
|
use Joomla\CMS\Installer\InstallerScriptInterface;
|
||||||
use Joomla\CMS\Application\CMSApplication;
|
|
||||||
use Joomla\CMS\Log\Log;
|
use Joomla\CMS\Log\Log;
|
||||||
use Joomla\CMS\Version;
|
use Joomla\CMS\Version;
|
||||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||||
@@ -43,7 +42,6 @@ class Com_SubformpowerInstallerScript implements InstallerScriptInterface
|
|||||||
/**
|
/**
|
||||||
* The CMS Application.
|
* The CMS Application.
|
||||||
*
|
*
|
||||||
* @var CMSApplication
|
|
||||||
* @since 4.4.2
|
* @since 4.4.2
|
||||||
*/
|
*/
|
||||||
protected $app;
|
protected $app;
|
||||||
@@ -168,7 +166,6 @@ class Com_SubformpowerInstallerScript implements InstallerScriptInterface
|
|||||||
* @param InstallerAdapter $adapter The adapter calling this method
|
* @param InstallerAdapter $adapter The adapter calling this method
|
||||||
*
|
*
|
||||||
* @return boolean True on success
|
* @return boolean True on success
|
||||||
*
|
|
||||||
* @since 4.2.0
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public function install(InstallerAdapter $adapter): bool {return true;}
|
public function install(InstallerAdapter $adapter): bool {return true;}
|
||||||
@@ -190,7 +187,6 @@ class Com_SubformpowerInstallerScript implements InstallerScriptInterface
|
|||||||
* @param InstallerAdapter $adapter The adapter calling this method
|
* @param InstallerAdapter $adapter The adapter calling this method
|
||||||
*
|
*
|
||||||
* @return boolean True on success
|
* @return boolean True on success
|
||||||
*
|
|
||||||
* @since 4.2.0
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public function uninstall(InstallerAdapter $adapter): bool
|
public function uninstall(InstallerAdapter $adapter): bool
|
||||||
@@ -226,7 +222,6 @@ class Com_SubformpowerInstallerScript implements InstallerScriptInterface
|
|||||||
* @param InstallerAdapter $adapter The adapter calling this method
|
* @param InstallerAdapter $adapter The adapter calling this method
|
||||||
*
|
*
|
||||||
* @return boolean True on success
|
* @return boolean True on success
|
||||||
*
|
|
||||||
* @since 4.2.0
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public function preflight(string $type, InstallerAdapter $adapter): bool
|
public function preflight(string $type, InstallerAdapter $adapter): bool
|
||||||
@@ -271,7 +266,6 @@ class Com_SubformpowerInstallerScript implements InstallerScriptInterface
|
|||||||
* @param InstallerAdapter $adapter The adapter calling this method
|
* @param InstallerAdapter $adapter The adapter calling this method
|
||||||
*
|
*
|
||||||
* @return boolean True on success
|
* @return boolean True on success
|
||||||
*
|
|
||||||
* @since 4.2.0
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
public function postflight(string $type, InstallerAdapter $adapter): bool
|
public function postflight(string $type, InstallerAdapter $adapter): bool
|
||||||
@@ -311,11 +305,11 @@ class Com_SubformpowerInstallerScript implements InstallerScriptInterface
|
|||||||
// rules
|
// rules
|
||||||
'',
|
'',
|
||||||
// fieldMappings
|
// fieldMappings
|
||||||
'{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","symbol":"symbol","country":"country","guid":"guid"}}',
|
'{"common": {"core_content_item_id": "id","core_title": "ext_number","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"ext_number":"ext_number","symbol":"symbol","country":"country","guid":"guid"}}',
|
||||||
// router
|
// router
|
||||||
'',
|
'',
|
||||||
// contentHistoryOptions
|
// contentHistoryOptions
|
||||||
'{"formFile": "administrator/components/com_subformpower/forms/currency.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "country","targetTable": "#__subformpower_country","targetColumn": "guid","displayColumn": "name"}]}'
|
'{"formFile": "administrator/components/com_subformpower/forms/currency.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","ext_number"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "country","targetTable": "#__subformpower_country","targetColumn": "guid","displayColumn": "name"}]}'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -364,11 +358,11 @@ class Com_SubformpowerInstallerScript implements InstallerScriptInterface
|
|||||||
// rules
|
// rules
|
||||||
'',
|
'',
|
||||||
// fieldMappings
|
// fieldMappings
|
||||||
'{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","symbol":"symbol","country":"country","guid":"guid"}}',
|
'{"common": {"core_content_item_id": "id","core_title": "ext_number","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"ext_number":"ext_number","symbol":"symbol","country":"country","guid":"guid"}}',
|
||||||
// router
|
// router
|
||||||
'',
|
'',
|
||||||
// contentHistoryOptions
|
// contentHistoryOptions
|
||||||
'{"formFile": "administrator/components/com_subformpower/forms/currency.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "country","targetTable": "#__subformpower_country","targetColumn": "guid","displayColumn": "name"}]}'
|
'{"formFile": "administrator/components/com_subformpower/forms/currency.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","ext_number"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "country","targetTable": "#__subformpower_country","targetColumn": "guid","displayColumn": "name"}]}'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -376,7 +370,7 @@ class Com_SubformpowerInstallerScript implements InstallerScriptInterface
|
|||||||
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://nampharm.com.na" title="Subform Power">
|
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://nampharm.com.na" title="Subform Power">
|
||||||
<img src="components/com_subformpower/assets/images/vdm-component.jpg"/>
|
<img src="components/com_subformpower/assets/images/vdm-component.jpg"/>
|
||||||
</a>
|
</a>
|
||||||
<h3>Upgrade to Version 1.0.0 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
<h3>Upgrade to Version 1.0.1 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// move CLI files
|
// move CLI files
|
||||||
@@ -388,11 +382,84 @@ class Com_SubformpowerInstallerScript implements InstallerScriptInterface
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove folders with files (with ignore options)
|
||||||
|
*
|
||||||
|
* @param string $dir The path to the folder to remove.
|
||||||
|
* @param array|null $ignore The folders and files to ignore and not remove.
|
||||||
|
*
|
||||||
|
* @return bool True if all specified files/folders are removed, false otherwise.
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
protected function removeFolder(string $dir, ?array $ignore = null): bool
|
||||||
|
{
|
||||||
|
if (!is_dir($dir))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$it = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
|
||||||
|
$it = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::CHILD_FIRST);
|
||||||
|
|
||||||
|
// Remove trailing slash
|
||||||
|
$dir = rtrim($dir, '/');
|
||||||
|
|
||||||
|
foreach ($it as $file)
|
||||||
|
{
|
||||||
|
$filePath = $file->getPathname();
|
||||||
|
$relativePath = str_replace($dir . '/', '', $filePath);
|
||||||
|
|
||||||
|
if ($ignore !== null && in_array($relativePath, $ignore, true))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($file->isDir())
|
||||||
|
{
|
||||||
|
Folder::delete($filePath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
File::delete($filePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete the root folder if there are no ignored files/folders left
|
||||||
|
if ($ignore === null || $this->isDirEmpty($dir, $ignore))
|
||||||
|
{
|
||||||
|
return Folder::delete($dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a directory is empty considering ignored files/folders.
|
||||||
|
*
|
||||||
|
* @param string $dir The path to the folder to check.
|
||||||
|
* @param array $ignore The folders and files to ignore.
|
||||||
|
*
|
||||||
|
* @return bool True if the directory is empty or contains only ignored items, false otherwise.
|
||||||
|
* @since 3.2.1
|
||||||
|
*/
|
||||||
|
protected function isDirEmpty(string $dir, array $ignore): bool
|
||||||
|
{
|
||||||
|
$it = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
|
||||||
|
foreach ($it as $file)
|
||||||
|
{
|
||||||
|
$relativePath = str_replace($dir . '/', '', $file->getPathname());
|
||||||
|
if (!in_array($relativePath, $ignore, true))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the files and folders in the given array from
|
* Remove the files and folders in the given array from
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
|
||||||
* @since 3.6
|
* @since 3.6
|
||||||
*/
|
*/
|
||||||
protected function removeFiles()
|
protected function removeFiles()
|
||||||
@@ -424,7 +491,6 @@ class Com_SubformpowerInstallerScript implements InstallerScriptInterface
|
|||||||
* Moves the CLI scripts into the CLI folder in the CMS
|
* Moves the CLI scripts into the CLI folder in the CMS
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
|
||||||
* @since 3.6
|
* @since 3.6
|
||||||
*/
|
*/
|
||||||
protected function moveCliFiles()
|
protected function moveCliFiles()
|
||||||
@@ -1206,6 +1272,44 @@ class Com_SubformpowerInstallerScript implements InstallerScriptInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ensures that a class in the namespace is available.
|
||||||
|
* If the class is not already loaded, it attempts to load it via the specified autoloader.
|
||||||
|
*
|
||||||
|
* @param string $className The fully qualified name of the class to check.
|
||||||
|
*
|
||||||
|
* @return bool True if the class exists or was successfully loaded, false otherwise.
|
||||||
|
* @since 4.0.1
|
||||||
|
*/
|
||||||
|
protected function classExists(string $className): bool
|
||||||
|
{
|
||||||
|
if (class_exists($className, true))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Autoloaders to check
|
||||||
|
$autoloaders = [
|
||||||
|
__DIR__ . '/SubformpowerInstallerPowerloader.php',
|
||||||
|
JPATH_ADMINISTRATOR . '/components/com_subformpower/src/Helper/PowerloaderHelper.php'
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($autoloaders as $autoloader)
|
||||||
|
{
|
||||||
|
if (file_exists($autoloader))
|
||||||
|
{
|
||||||
|
require_once $autoloader;
|
||||||
|
|
||||||
|
if (class_exists($className, true))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to move folders into place.
|
* Method to move folders into place.
|
||||||
*
|
*
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# Subform Power (1.0.0)
|
# Subform Power (1.0.1)
|
||||||
|
|
||||||
Demonstration of subform super power
|
Demonstration of subform super power
|
||||||
|
|
||||||
@@ -8,38 +8,38 @@ Demonstration of subform super power
|
|||||||
+ *Author*: [Oh Martin](mailto:oh@nampharm.com.na)
|
+ *Author*: [Oh Martin](mailto:oh@nampharm.com.na)
|
||||||
+ *Name*: [Subform Power](https://nampharm.com.na)
|
+ *Name*: [Subform Power](https://nampharm.com.na)
|
||||||
+ *First Build*: 24th May, 2024
|
+ *First Build*: 24th May, 2024
|
||||||
+ *Last Build*: 27th June, 2024
|
+ *Last Build*: 5th February, 2025
|
||||||
+ *Version*: 1.0.0
|
+ *Version*: 1.0.1
|
||||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
|
||||||
## Build Time
|
## Build Time
|
||||||
|
|
||||||
**69 Hours** or **9 Eight Hour Days** (actual time the author saved -
|
**72 Hours** or **9 Eight Hour Days** (actual time the author saved -
|
||||||
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
|
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**,
|
> (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.)
|
> never making one mistake or taking any coffee break.)
|
||||||
|
|
||||||
+ *Line count*: **24593**
|
+ *Line count*: **25909**
|
||||||
+ *File count*: **229**
|
+ *File count*: **246**
|
||||||
+ *Folder count*: **78**
|
+ *Folder count*: **85**
|
||||||
|
|
||||||
**45 Hours** or **5 Eight Hour Days** (the actual time the author spent)
|
**48 Hours** or **6 Eight Hour Days** (the actual time the author spent)
|
||||||
|
|
||||||
> (with the following break down:
|
> (with the following break down:
|
||||||
> **debugging @17hours** = codingtime / 4;
|
> **debugging @18hours** = codingtime / 4;
|
||||||
> **planning @10hours** = codingtime / 7;
|
> **planning @10hours** = codingtime / 7;
|
||||||
> **mapping @7hours** = codingtime / 10;
|
> **mapping @7hours** = codingtime / 10;
|
||||||
> **office @11hours** = codingtime / 6;)
|
> **office @12hours** = codingtime / 6;)
|
||||||
|
|
||||||
**114 Hours** or **14 Eight Hour Days**
|
**120 Hours** or **15 Eight Hour Days**
|
||||||
(a total of the realistic time frame for this project)
|
(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**,
|
> (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.)
|
> 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).
|
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||||
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
@@ -2,8 +2,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage admin.css
|
@subpackage admin.css
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage countries.css
|
@subpackage countries.css
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage country.css
|
@subpackage country.css
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage currencies.css
|
@subpackage currencies.css
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage currency.css
|
@subpackage currency.css
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage dashboard.css
|
@subpackage dashboard.css
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage admin.js
|
@subpackage admin.js
|
||||||
|
@@ -69,6 +69,41 @@
|
|||||||
class="readonly"
|
class="readonly"
|
||||||
/>
|
/>
|
||||||
</fieldset>
|
</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
|
<fieldset
|
||||||
name="permissions"
|
name="permissions"
|
||||||
label="JCONFIG_PERMISSIONS_LABEL"
|
label="JCONFIG_PERMISSIONS_LABEL"
|
||||||
|
@@ -189,15 +189,15 @@
|
|||||||
default="0"
|
default="0"
|
||||||
filter="STRING"
|
filter="STRING"
|
||||||
/>
|
/>
|
||||||
<!-- Name Field. Type: Text. (joomla) -->
|
<!-- Ext_number Field. Type: Number. (joomla) -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="number"
|
||||||
name="name"
|
name="ext_number"
|
||||||
label="COM_SUBFORMPOWER_COUNTRY_NAME_LABEL"
|
label="COM_SUBFORMPOWER_COUNTRY_EXT_NUMBER_LABEL"
|
||||||
default=""
|
default="9000"
|
||||||
description="COM_SUBFORMPOWER_COUNTRY_NAME_DESCRIPTION"
|
min="1"
|
||||||
message="COM_SUBFORMPOWER_COUNTRY_NAME_MESSAGE"
|
max="40"
|
||||||
hint="COM_SUBFORMPOWER_COUNTRY_NAME_HINT"
|
step="5"
|
||||||
/>
|
/>
|
||||||
<!-- Symbol Field. Type: Text. (joomla) -->
|
<!-- Symbol Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
|
@@ -97,15 +97,15 @@
|
|||||||
default="subformpower currency"
|
default="subformpower currency"
|
||||||
/>
|
/>
|
||||||
<!-- Dynamic Fields. -->
|
<!-- Dynamic Fields. -->
|
||||||
<!-- Name Field. Type: Text. (joomla) -->
|
<!-- Ext_number Field. Type: Number. (joomla) -->
|
||||||
<field
|
<field
|
||||||
type="text"
|
type="number"
|
||||||
name="name"
|
name="ext_number"
|
||||||
label="COM_SUBFORMPOWER_CURRENCY_NAME_LABEL"
|
label="COM_SUBFORMPOWER_CURRENCY_EXT_NUMBER_LABEL"
|
||||||
default=""
|
default="9000"
|
||||||
description="COM_SUBFORMPOWER_CURRENCY_NAME_DESCRIPTION"
|
min="1"
|
||||||
message="COM_SUBFORMPOWER_CURRENCY_NAME_MESSAGE"
|
max="40"
|
||||||
hint="COM_SUBFORMPOWER_CURRENCY_NAME_HINT"
|
step="5"
|
||||||
/>
|
/>
|
||||||
<!-- Symbol Field. Type: Text. (joomla) -->
|
<!-- Symbol Field. Type: Text. (joomla) -->
|
||||||
<field
|
<field
|
||||||
@@ -122,10 +122,7 @@
|
|||||||
type="countries"
|
type="countries"
|
||||||
name="country"
|
name="country"
|
||||||
label="COM_SUBFORMPOWER_CURRENCY_COUNTRY_LABEL"
|
label="COM_SUBFORMPOWER_CURRENCY_COUNTRY_LABEL"
|
||||||
description="COM_SUBFORMPOWER_CURRENCY_COUNTRY_DESCRIPTION"
|
|
||||||
message="COM_SUBFORMPOWER_CURRENCY_COUNTRY_MESSAGE"
|
|
||||||
class="list_class"
|
class="list_class"
|
||||||
layout="joomla.form.field.list-fancy-select"
|
|
||||||
validate="guid"
|
validate="guid"
|
||||||
button="true"
|
button="true"
|
||||||
/>
|
/>
|
||||||
|
@@ -46,7 +46,7 @@ COM_SUBFORMPOWER_COUNTRIES_EDIT_STATE_DESC="Allows the users in this group to up
|
|||||||
COM_SUBFORMPOWER_COUNTRIES_EDIT_VERSION="Countries Edit Version"
|
COM_SUBFORMPOWER_COUNTRIES_EDIT_VERSION="Countries Edit Version"
|
||||||
COM_SUBFORMPOWER_COUNTRIES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version countries"
|
COM_SUBFORMPOWER_COUNTRIES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version countries"
|
||||||
COM_SUBFORMPOWER_COUNTRIES_EMPTYSTATE_BUTTON_ADD="Add your first country"
|
COM_SUBFORMPOWER_COUNTRIES_EMPTYSTATE_BUTTON_ADD="Add your first country"
|
||||||
COM_SUBFORMPOWER_COUNTRIES_EMPTYSTATE_CONTENT="country view (dynamic build)"
|
COM_SUBFORMPOWER_COUNTRIES_EMPTYSTATE_CONTENT="country view"
|
||||||
COM_SUBFORMPOWER_COUNTRIES_EMPTYSTATE_TITLE="No countries have been created yet."
|
COM_SUBFORMPOWER_COUNTRIES_EMPTYSTATE_TITLE="No countries have been created yet."
|
||||||
COM_SUBFORMPOWER_COUNTRIES_EXPORT="Countries Export"
|
COM_SUBFORMPOWER_COUNTRIES_EXPORT="Countries Export"
|
||||||
COM_SUBFORMPOWER_COUNTRIES_EXPORT_DESC="Allows the users in this group to export export countries"
|
COM_SUBFORMPOWER_COUNTRIES_EXPORT_DESC="Allows the users in this group to export export countries"
|
||||||
@@ -84,6 +84,7 @@ COM_SUBFORMPOWER_COUNTRY_DETAILS="Details"
|
|||||||
COM_SUBFORMPOWER_COUNTRY_EDIT="Editing the Country"
|
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="Another Country has the same alias."
|
||||||
COM_SUBFORMPOWER_COUNTRY_ERROR_UNIQUE_ALIAS_TRASHED="A trashed 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_DESCRIPTION="Globally Unique Identifier"
|
||||||
COM_SUBFORMPOWER_COUNTRY_GUID_HINT="Auto Generated"
|
COM_SUBFORMPOWER_COUNTRY_GUID_HINT="Auto Generated"
|
||||||
COM_SUBFORMPOWER_COUNTRY_GUID_LABEL="GUID"
|
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="Currencies Edit Version"
|
||||||
COM_SUBFORMPOWER_CURRENCIES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version currencies"
|
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_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_EMPTYSTATE_TITLE="No currencies have been created yet."
|
||||||
COM_SUBFORMPOWER_CURRENCIES_EXPORT="Currencies Export"
|
COM_SUBFORMPOWER_CURRENCIES_EXPORT="Currencies Export"
|
||||||
COM_SUBFORMPOWER_CURRENCIES_EXPORT_DESC="Allows the users in this group to export export currencies"
|
COM_SUBFORMPOWER_CURRENCIES_EXPORT_DESC="Allows the users in this group to export export currencies"
|
||||||
@@ -184,9 +185,7 @@ COM_SUBFORMPOWER_CURRENCIES_N_ITEMS_UNPUBLISHED_1="%s Currency unpublished."
|
|||||||
COM_SUBFORMPOWER_CURRENCIES_SUBMENU="Currencies Submenu"
|
COM_SUBFORMPOWER_CURRENCIES_SUBMENU="Currencies Submenu"
|
||||||
COM_SUBFORMPOWER_CURRENCIES_SUBMENU_DESC="Allows the users in this group to submenu of currency"
|
COM_SUBFORMPOWER_CURRENCIES_SUBMENU_DESC="Allows the users in this group to submenu of currency"
|
||||||
COM_SUBFORMPOWER_CURRENCY="Currency"
|
COM_SUBFORMPOWER_CURRENCY="Currency"
|
||||||
COM_SUBFORMPOWER_CURRENCY_COUNTRY_DESCRIPTION="The primary currency id is set here."
|
|
||||||
COM_SUBFORMPOWER_CURRENCY_COUNTRY_LABEL="Country"
|
COM_SUBFORMPOWER_CURRENCY_COUNTRY_LABEL="Country"
|
||||||
COM_SUBFORMPOWER_CURRENCY_COUNTRY_MESSAGE="Error! Please add some primary currency id here."
|
|
||||||
COM_SUBFORMPOWER_CURRENCY_CREATED_BY_DESC="The user that created this Currency."
|
COM_SUBFORMPOWER_CURRENCY_CREATED_BY_DESC="The user that created this Currency."
|
||||||
COM_SUBFORMPOWER_CURRENCY_CREATED_BY_LABEL="Created By"
|
COM_SUBFORMPOWER_CURRENCY_CREATED_BY_LABEL="Created By"
|
||||||
COM_SUBFORMPOWER_CURRENCY_CREATED_DATE_DESC="The date this Currency was created."
|
COM_SUBFORMPOWER_CURRENCY_CREATED_DATE_DESC="The date this Currency was created."
|
||||||
@@ -195,6 +194,7 @@ COM_SUBFORMPOWER_CURRENCY_DETAILS="Details"
|
|||||||
COM_SUBFORMPOWER_CURRENCY_EDIT="Editing the Currency"
|
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="Another Currency has the same alias."
|
||||||
COM_SUBFORMPOWER_CURRENCY_ERROR_UNIQUE_ALIAS_TRASHED="A trashed 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_DESCRIPTION="Globally Unique Identifier"
|
||||||
COM_SUBFORMPOWER_CURRENCY_GUID_HINT="Auto Generated"
|
COM_SUBFORMPOWER_CURRENCY_GUID_HINT="Auto Generated"
|
||||||
COM_SUBFORMPOWER_CURRENCY_GUID_LABEL="GUID"
|
COM_SUBFORMPOWER_CURRENCY_GUID_LABEL="GUID"
|
||||||
@@ -203,10 +203,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_BY_LABEL="Modified By"
|
||||||
COM_SUBFORMPOWER_CURRENCY_MODIFIED_DATE_DESC="The date this Currency was modified."
|
COM_SUBFORMPOWER_CURRENCY_MODIFIED_DATE_DESC="The date this Currency was modified."
|
||||||
COM_SUBFORMPOWER_CURRENCY_MODIFIED_DATE_LABEL="Modified Date"
|
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_NEW="A New Currency"
|
||||||
COM_SUBFORMPOWER_CURRENCY_ORDERING_LABEL="Ordering"
|
COM_SUBFORMPOWER_CURRENCY_ORDERING_LABEL="Ordering"
|
||||||
COM_SUBFORMPOWER_CURRENCY_PERMISSION="Permissions"
|
COM_SUBFORMPOWER_CURRENCY_PERMISSION="Permissions"
|
||||||
|
@@ -1,5 +1,13 @@
|
|||||||
COM_SUBFORMPOWER="Subform Power"
|
COM_SUBFORMPOWER="Subform Power"
|
||||||
COM_SUBFORMPOWER_CONFIGURATION="Subform Power Configuration"
|
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="Countries Access"
|
||||||
COM_SUBFORMPOWER_COUNTRIES_ACCESS_DESC="Allows the users in this group to access access countries"
|
COM_SUBFORMPOWER_COUNTRIES_ACCESS_DESC="Allows the users in this group to access access countries"
|
||||||
COM_SUBFORMPOWER_COUNTRIES_BATCH_USE="Countries Batch Use"
|
COM_SUBFORMPOWER_COUNTRIES_BATCH_USE="Countries Batch Use"
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage currencies_fullwidth.php
|
@subpackage currencies_fullwidth.php
|
||||||
@@ -24,6 +24,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
|
|||||||
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
||||||
use JCB\Joomla\Utilities\StringHelper;
|
use JCB\Joomla\Utilities\StringHelper;
|
||||||
use JCB\Joomla\Utilities\ArrayHelper;
|
use JCB\Joomla\Utilities\ArrayHelper;
|
||||||
|
use Joomla\CMS\User\UserFactoryInterface;
|
||||||
|
|
||||||
// No direct access to this file
|
// No direct access to this file
|
||||||
defined('_JEXEC') or die;
|
defined('_JEXEC') or die;
|
||||||
@@ -53,9 +54,9 @@ else
|
|||||||
$ref = ($id) ? "&ref=country&refid=" . $id : "";
|
$ref = ($id) ? "&ref=country&refid=" . $id : "";
|
||||||
}
|
}
|
||||||
// set the create new URL
|
// set the create new URL
|
||||||
$new = "index.php?option=com_subformpower&view=currencies&task=currency.edit" . $ref;
|
$new = "index.php?option=com_subformpower&view=currencies&task=currency.add" . $ref;
|
||||||
// set the create new and close URL
|
// set the create new and close URL
|
||||||
$close_new = "index.php?option=com_subformpower&view=currencies&task=currency.edit";
|
$close_new = "index.php?option=com_subformpower&view=currencies&task=currency.add";
|
||||||
// load the action object
|
// load the action object
|
||||||
$can = SubformpowerHelper::getActions('currency');
|
$can = SubformpowerHelper::getActions('currency');
|
||||||
|
|
||||||
@@ -72,7 +73,7 @@ $can = SubformpowerHelper::getActions('currency');
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-toggle="true">
|
<th data-toggle="true">
|
||||||
<?php echo Text::_('COM_SUBFORMPOWER_CURRENCY_NAME_LABEL'); ?>
|
<?php echo Text::_('COM_SUBFORMPOWER_CURRENCY_EXT_NUMBER_LABEL'); ?>
|
||||||
</th>
|
</th>
|
||||||
<th data-hide="phone">
|
<th data-hide="phone">
|
||||||
<?php echo Text::_('COM_SUBFORMPOWER_CURRENCY_SYMBOL_LABEL'); ?>
|
<?php echo Text::_('COM_SUBFORMPOWER_CURRENCY_SYMBOL_LABEL'); ?>
|
||||||
@@ -93,19 +94,19 @@ $can = SubformpowerHelper::getActions('currency');
|
|||||||
<?php
|
<?php
|
||||||
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
|
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
|
||||||
$userChkOut = Factory::getContainer()->
|
$userChkOut = Factory::getContainer()->
|
||||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
get(UserFactoryInterface::class)->
|
||||||
loadUserById($item->checked_out);
|
loadUserById($item->checked_out ?? 0);
|
||||||
$canDo = SubformpowerHelper::getActions('currency',$item,'currencies');
|
$canDo = SubformpowerHelper::getActions('currency',$item,'currencies');
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php if ($canDo->get('currency.edit')): ?>
|
<?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 if ($item->checked_out): ?>
|
||||||
<?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'currencies.', $canCheckin); ?>
|
<?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'currencies.', $canCheckin); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo $displayData->escape($item->name); ?>
|
<?php echo $displayData->escape($item->ext_number); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage details_above.php
|
@subpackage details_above.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage details_left.php
|
@subpackage details_left.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage details_right.php
|
@subpackage details_right.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage more_stuff_fullwidth.php
|
@subpackage more_stuff_fullwidth.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage publishing.php
|
@subpackage publishing.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage publlshing.php
|
@subpackage publlshing.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage details_above.php
|
@subpackage details_above.php
|
||||||
@@ -35,7 +35,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
|||||||
|
|
||||||
// get the fields
|
// get the fields
|
||||||
$fields = $displayData->get($fields_tab_layout) ?: [
|
$fields = $displayData->get($fields_tab_layout) ?: [
|
||||||
'name'
|
'ext_number'
|
||||||
];
|
];
|
||||||
|
|
||||||
// Ensure $fields is treated as an array and count its size.
|
// Ensure $fields is treated as an array and count its size.
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage details_left.php
|
@subpackage details_left.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage details_right.php
|
@subpackage details_right.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage publishing.php
|
@subpackage publishing.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage publlshing.php
|
@subpackage publlshing.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage provider.php
|
@subpackage provider.php
|
||||||
|
@@ -3,7 +3,7 @@ SET time_zone = "+00:00";
|
|||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `#__subformpower_country` (
|
CREATE TABLE IF NOT EXISTS `#__subformpower_country` (
|
||||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
|
`asset_id` INT(10) unsigned NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
|
||||||
`guid` VARCHAR(36) NOT NULL DEFAULT '',
|
`guid` VARCHAR(36) NOT NULL DEFAULT '',
|
||||||
`iso` VARCHAR(255) NOT NULL DEFAULT '',
|
`iso` VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
`isothree` VARCHAR(255) NOT NULL DEFAULT '',
|
`isothree` VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
@@ -12,17 +12,17 @@ CREATE TABLE IF NOT EXISTS `#__subformpower_country` (
|
|||||||
`phonecode` VARCHAR(255) NOT NULL DEFAULT '',
|
`phonecode` VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
`timezone` VARCHAR(255) NOT NULL DEFAULT '',
|
`timezone` VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
`params` TEXT NULL,
|
`params` TEXT NULL,
|
||||||
`published` TINYINT(3) NOT NULL DEFAULT 1,
|
`published` TINYINT(3) NULL DEFAULT 1,
|
||||||
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
`created_by` INT unsigned NULL,
|
||||||
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
`modified_by` INT unsigned,
|
||||||
`created` DATETIME DEFAULT CURRENT_TIMESTAMP,
|
`created` DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||||
`modified` DATETIME DEFAULT NULL,
|
`modified` DATETIME,
|
||||||
`checked_out` int(11) unsigned NOT NULL DEFAULT 0,
|
`checked_out` int unsigned,
|
||||||
`checked_out_time` DATETIME DEFAULT NULL,
|
`checked_out_time` DATETIME,
|
||||||
`version` INT(10) unsigned NOT NULL DEFAULT 1,
|
`version` INT(10) unsigned NULL DEFAULT 1,
|
||||||
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
|
`hits` INT(10) unsigned NULL DEFAULT 0,
|
||||||
`access` INT(10) unsigned NOT NULL DEFAULT 0,
|
`access` INT(10) unsigned NULL DEFAULT 0,
|
||||||
`ordering` INT(11) NOT NULL DEFAULT 0,
|
`ordering` INT(11) NULL DEFAULT 0,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `idx_name` (`name`),
|
KEY `idx_name` (`name`),
|
||||||
KEY `idx_guid` (`guid`),
|
KEY `idx_guid` (`guid`),
|
||||||
@@ -35,25 +35,25 @@ CREATE TABLE IF NOT EXISTS `#__subformpower_country` (
|
|||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `#__subformpower_currency` (
|
CREATE TABLE IF NOT EXISTS `#__subformpower_currency` (
|
||||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
|
`asset_id` INT(10) unsigned NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
|
||||||
`country` VARCHAR(36) NOT NULL DEFAULT '',
|
`country` VARCHAR(36) NOT NULL DEFAULT '',
|
||||||
|
`ext_number` INT(10) NOT NULL DEFAULT 0,
|
||||||
`guid` VARCHAR(36) NOT NULL DEFAULT '',
|
`guid` VARCHAR(36) NOT NULL DEFAULT '',
|
||||||
`name` VARCHAR(255) NOT NULL DEFAULT '',
|
|
||||||
`symbol` VARCHAR(255) NULL DEFAULT '',
|
`symbol` VARCHAR(255) NULL DEFAULT '',
|
||||||
`params` TEXT NULL,
|
`params` TEXT NULL,
|
||||||
`published` TINYINT(3) NOT NULL DEFAULT 1,
|
`published` TINYINT(3) NULL DEFAULT 1,
|
||||||
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
`created_by` INT unsigned NULL,
|
||||||
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
`modified_by` INT unsigned,
|
||||||
`created` DATETIME DEFAULT CURRENT_TIMESTAMP,
|
`created` DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||||
`modified` DATETIME DEFAULT NULL,
|
`modified` DATETIME,
|
||||||
`checked_out` int(11) unsigned NOT NULL DEFAULT 0,
|
`checked_out` int unsigned,
|
||||||
`checked_out_time` DATETIME DEFAULT NULL,
|
`checked_out_time` DATETIME,
|
||||||
`version` INT(10) unsigned NOT NULL DEFAULT 1,
|
`version` INT(10) unsigned NULL DEFAULT 1,
|
||||||
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
|
`hits` INT(10) unsigned NULL DEFAULT 0,
|
||||||
`access` INT(10) unsigned NOT NULL DEFAULT 0,
|
`access` INT(10) unsigned NULL DEFAULT 0,
|
||||||
`ordering` INT(11) NOT NULL DEFAULT 0,
|
`ordering` INT(11) NULL DEFAULT 0,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `idx_name` (`name`),
|
KEY `idx_ext_number` (`ext_number`),
|
||||||
KEY `idx_country` (`country`),
|
KEY `idx_country` (`country`),
|
||||||
KEY `idx_guid` (`guid`),
|
KEY `idx_guid` (`guid`),
|
||||||
KEY `idx_access` (`access`),
|
KEY `idx_access` (`access`),
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CountriesController.php
|
@subpackage CountriesController.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CountryController.php
|
@subpackage CountryController.php
|
||||||
@@ -71,6 +71,22 @@ class CountryController extends FormController
|
|||||||
*/
|
*/
|
||||||
protected $view_list = 'countries';
|
protected $view_list = 'countries';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Referral value
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 5.0
|
||||||
|
*/
|
||||||
|
protected string $ref;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Referral ID value
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 5.0
|
||||||
|
*/
|
||||||
|
protected int $refid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method override to check if you can add a new record.
|
* Method override to check if you can add a new record.
|
||||||
*
|
*
|
||||||
@@ -170,13 +186,22 @@ class CountryController extends FormController
|
|||||||
*/
|
*/
|
||||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
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');
|
$ref = $this->input->get('ref', 0, 'string');
|
||||||
$refid = $this->input->get('refid', 0, 'int');
|
$refid = $this->input->get('refid', 0, 'int');
|
||||||
|
|
||||||
// get redirect info.
|
// get redirect info.
|
||||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||||
|
|
||||||
|
// set int-defaults
|
||||||
|
if (!empty($init_defaults))
|
||||||
|
{
|
||||||
|
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||||
|
}
|
||||||
|
|
||||||
// set the referral options
|
// set the referral options
|
||||||
if ($refid && $ref)
|
if ($refid && $ref)
|
||||||
{
|
{
|
||||||
@@ -338,7 +363,7 @@ class CountryController extends FormController
|
|||||||
* Function that allows child controller access to model data
|
* Function that allows child controller access to model data
|
||||||
* after the data has been saved.
|
* 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.
|
* @param array $validData The validated data.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CurrenciesController.php
|
@subpackage CurrenciesController.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CurrencyController.php
|
@subpackage CurrencyController.php
|
||||||
@@ -71,6 +71,22 @@ class CurrencyController extends FormController
|
|||||||
*/
|
*/
|
||||||
protected $view_list = 'currencies';
|
protected $view_list = 'currencies';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Referral value
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 5.0
|
||||||
|
*/
|
||||||
|
protected string $ref;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Referral ID value
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 5.0
|
||||||
|
*/
|
||||||
|
protected int $refid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method override to check if you can add a new record.
|
* Method override to check if you can add a new record.
|
||||||
*
|
*
|
||||||
@@ -170,13 +186,22 @@ class CurrencyController extends FormController
|
|||||||
*/
|
*/
|
||||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
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');
|
$ref = $this->input->get('ref', 0, 'string');
|
||||||
$refid = $this->input->get('refid', 0, 'int');
|
$refid = $this->input->get('refid', 0, 'int');
|
||||||
|
|
||||||
// get redirect info.
|
// get redirect info.
|
||||||
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
|
||||||
|
|
||||||
|
// set int-defaults
|
||||||
|
if (!empty($init_defaults))
|
||||||
|
{
|
||||||
|
$append = '&init_defaults='. (string) $init_defaults . $append;
|
||||||
|
}
|
||||||
|
|
||||||
// set the referral options
|
// set the referral options
|
||||||
if ($refid && $ref)
|
if ($refid && $ref)
|
||||||
{
|
{
|
||||||
@@ -338,7 +363,7 @@ class CurrencyController extends FormController
|
|||||||
* Function that allows child controller access to model data
|
* Function that allows child controller access to model data
|
||||||
* after the data has been saved.
|
* 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.
|
* @param array $validData The validated data.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage DisplayController.php
|
@subpackage DisplayController.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage ImportController.php
|
@subpackage ImportController.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage SubformpowerController.php
|
@subpackage SubformpowerController.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage SubformpowerComponent.php
|
@subpackage SubformpowerComponent.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CountriesField.php
|
@subpackage CountriesField.php
|
||||||
@@ -25,6 +25,7 @@ use Joomla\CMS\Language\Text;
|
|||||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||||
use Joomla\CMS\Component\ComponentHelper;
|
use Joomla\CMS\Component\ComponentHelper;
|
||||||
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
||||||
|
use Joomla\CMS\Uri\Uri;
|
||||||
|
|
||||||
// No direct access to this file
|
// No direct access to this file
|
||||||
\defined('_JEXEC') or die;
|
\defined('_JEXEC') or die;
|
||||||
@@ -79,7 +80,7 @@ class CountriesField extends ListField
|
|||||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||||
// get the return value.
|
// get the return value.
|
||||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
$_uri = (string) Uri::getInstance();
|
||||||
$_return = urlencode(base64_encode($_uri));
|
$_return = urlencode(base64_encode($_uri));
|
||||||
// load return value.
|
// load return value.
|
||||||
$ref .= '&return=' . $_return;
|
$ref .= '&return=' . $_return;
|
||||||
@@ -110,12 +111,14 @@ class CountriesField extends ListField
|
|||||||
// build script
|
// build script
|
||||||
$script[] = "
|
$script[] = "
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
document.getElementById('jform_".$button_code_name."').addEventListener('change', function(e) {
|
let ".$button_code_name."Field = document.getElementById('jform_".$button_code_name."');
|
||||||
|
if (!".$button_code_name."Field) { return; }
|
||||||
|
".$button_code_name."Field.addEventListener('change', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let ".$button_code_name."Value = this.value;
|
let ".$button_code_name."Value = this.value;
|
||||||
".$button_code_name."Button(".$button_code_name."Value);
|
".$button_code_name."Button(".$button_code_name."Value);
|
||||||
});
|
});
|
||||||
let ".$button_code_name."Value = document.getElementById('jform_".$button_code_name."').value;
|
let ".$button_code_name."Value = ".$button_code_name."Field.value;
|
||||||
".$button_code_name."Button(".$button_code_name."Value);
|
".$button_code_name."Button(".$button_code_name."Value);
|
||||||
});
|
});
|
||||||
function ".$button_code_name."Button(value) {
|
function ".$button_code_name."Button(value) {
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CountriesfilterisoField.php
|
@subpackage CountriesfilterisoField.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CountriesfilterisothreeField.php
|
@subpackage CountriesfilterisothreeField.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CountriesfilternumcodeField.php
|
@subpackage CountriesfilternumcodeField.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CountriesfilterphonecodeField.php
|
@subpackage CountriesfilterphonecodeField.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CurrenciesfiltersymbolField.php
|
@subpackage CurrenciesfiltersymbolField.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage HeaderCheck.php
|
@subpackage HeaderCheck.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage PowerloaderHelper.php
|
@subpackage PowerloaderHelper.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage SubformpowerHelper.php
|
@subpackage SubformpowerHelper.php
|
||||||
@@ -31,7 +31,7 @@ use Joomla\CMS\Language\Text;
|
|||||||
use Joomla\CMS\Access\Access;
|
use Joomla\CMS\Access\Access;
|
||||||
use Joomla\CMS\Access\Rules as AccessRules;
|
use Joomla\CMS\Access\Rules as AccessRules;
|
||||||
use Joomla\CMS\Component\ComponentHelper;
|
use Joomla\CMS\Component\ComponentHelper;
|
||||||
use Joomla\CMS\Filesystem\File;
|
use Joomla\Filesystem\File;
|
||||||
use Joomla\CMS\Language\Language;
|
use Joomla\CMS\Language\Language;
|
||||||
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||||
use Joomla\CMS\Object\CMSObject;
|
use Joomla\CMS\Object\CMSObject;
|
||||||
@@ -43,9 +43,6 @@ use Joomla\Database\DatabaseInterface;
|
|||||||
use Joomla\Registry\Registry;
|
use Joomla\Registry\Registry;
|
||||||
use Joomla\String\StringHelper;
|
use Joomla\String\StringHelper;
|
||||||
use Joomla\Utilities\ArrayHelper;
|
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\StringHelper as UtilitiesStringHelper;
|
||||||
use JCB\Joomla\Utilities\ObjectHelper;
|
use JCB\Joomla\Utilities\ObjectHelper;
|
||||||
use JCB\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
use JCB\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CountriesModel.php
|
@subpackage CountriesModel.php
|
||||||
@@ -421,6 +421,8 @@ class CountriesModel extends ListModel
|
|||||||
{
|
{
|
||||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
$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
|
// Implement View Level Access
|
||||||
if (!$user->authorise('core.options', 'com_subformpower'))
|
if (!$user->authorise('core.options', 'com_subformpower'))
|
||||||
{
|
{
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CountryModel.php
|
@subpackage CountryModel.php
|
||||||
@@ -391,6 +391,19 @@ class CountryModel extends AdminModel
|
|||||||
// Now set the local-redirected field default value
|
// Now set the local-redirected field default value
|
||||||
$form->setValue($redirectedField, null, $redirectedValue);
|
$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)
|
// Only load the GUID if new item (or empty)
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CurrenciesModel.php
|
@subpackage CurrenciesModel.php
|
||||||
@@ -350,6 +350,16 @@ class CurrenciesModel extends ListModel
|
|||||||
{
|
{
|
||||||
$query->where('a.id IN (' . implode(',',$pks) . ')');
|
$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
|
// Implement View Level Access
|
||||||
if (!$user->authorise('core.options', 'com_subformpower'))
|
if (!$user->authorise('core.options', 'com_subformpower'))
|
||||||
{
|
{
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CurrencyModel.php
|
@subpackage CurrencyModel.php
|
||||||
@@ -70,7 +70,7 @@ class CurrencyModel extends AdminModel
|
|||||||
'country'
|
'country'
|
||||||
),
|
),
|
||||||
'above' => array(
|
'above' => array(
|
||||||
'name'
|
'ext_number'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -281,6 +281,19 @@ class CurrencyModel extends AdminModel
|
|||||||
// Now set the local-redirected field default value
|
// Now set the local-redirected field default value
|
||||||
$form->setValue($redirectedField, null, $redirectedValue);
|
$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)
|
// Only load the GUID if new item (or empty)
|
||||||
@@ -697,9 +710,9 @@ class CurrencyModel extends AdminModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Only for strings
|
// 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
|
// insert all set values
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage ImportModel.php
|
@subpackage ImportModel.php
|
||||||
@@ -21,8 +21,8 @@ namespace JCB\Component\Subformpower\Administrator\Model;
|
|||||||
|
|
||||||
use Joomla\CMS\Factory;
|
use Joomla\CMS\Factory;
|
||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
use Joomla\CMS\Filesystem\File;
|
use Joomla\Filesystem\File;
|
||||||
use Joomla\CMS\Filesystem\Folder;
|
use Joomla\Filesystem\Folder;
|
||||||
use Joomla\CMS\Filesystem\Path;
|
use Joomla\CMS\Filesystem\Path;
|
||||||
use Joomla\CMS\Filter\OutputFilter;
|
use Joomla\CMS\Filter\OutputFilter;
|
||||||
use Joomla\CMS\Installer\InstallerHelper;
|
use Joomla\CMS\Installer\InstallerHelper;
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage SubformpowerModel.php
|
@subpackage SubformpowerModel.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage GuidRule.php
|
@subpackage GuidRule.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CountryTable.php
|
@subpackage CountryTable.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage CurrencyTable.php
|
@subpackage CurrencyTable.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage HtmlView.php
|
@subpackage HtmlView.php
|
||||||
@@ -25,6 +25,7 @@ use Joomla\CMS\Toolbar\Toolbar;
|
|||||||
use Joomla\CMS\Form\FormHelper;
|
use Joomla\CMS\Form\FormHelper;
|
||||||
use Joomla\CMS\Session\Session;
|
use Joomla\CMS\Session\Session;
|
||||||
use Joomla\CMS\Uri\Uri;
|
use Joomla\CMS\Uri\Uri;
|
||||||
|
use Joomla\CMS\User\User;
|
||||||
use Joomla\CMS\Component\ComponentHelper;
|
use Joomla\CMS\Component\ComponentHelper;
|
||||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||||
use Joomla\CMS\Layout\FileLayout;
|
use Joomla\CMS\Layout\FileLayout;
|
||||||
@@ -44,17 +45,75 @@ use JCB\Joomla\Utilities\StringHelper;
|
|||||||
*
|
*
|
||||||
* @since 1.6
|
* @since 1.6
|
||||||
*/
|
*/
|
||||||
|
#[\AllowDynamicProperties]
|
||||||
class HtmlView extends BaseHtmlView
|
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
|
* Countries view display method
|
||||||
*
|
*
|
||||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
* @throws \Exception
|
||||||
* @since 1.6
|
* @since 1.6
|
||||||
*/
|
*/
|
||||||
public function display($tpl = null)
|
public function display($tpl = null): void
|
||||||
{
|
{
|
||||||
// Assign data to the view
|
// Assign data to the view
|
||||||
$this->items = $this->get('Items');
|
$this->items = $this->get('Items');
|
||||||
@@ -62,7 +121,7 @@ class HtmlView extends BaseHtmlView
|
|||||||
$this->state = $this->get('State');
|
$this->state = $this->get('State');
|
||||||
$this->styles = $this->get('Styles');
|
$this->styles = $this->get('Styles');
|
||||||
$this->scripts = $this->get('Scripts');
|
$this->scripts = $this->get('Scripts');
|
||||||
$this->user ??= Factory::getApplication()->getIdentity();
|
$this->user ??= $this->getCurrentUser();
|
||||||
// Load the filter form from xml.
|
// Load the filter form from xml.
|
||||||
$this->filterForm = $this->get('FilterForm');
|
$this->filterForm = $this->get('FilterForm');
|
||||||
// Load the active filters.
|
// Load the active filters.
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage HtmlView.php
|
@subpackage HtmlView.php
|
||||||
@@ -25,6 +25,7 @@ use Joomla\CMS\Toolbar\Toolbar;
|
|||||||
use Joomla\CMS\Form\FormHelper;
|
use Joomla\CMS\Form\FormHelper;
|
||||||
use Joomla\CMS\Session\Session;
|
use Joomla\CMS\Session\Session;
|
||||||
use Joomla\CMS\Uri\Uri;
|
use Joomla\CMS\Uri\Uri;
|
||||||
|
use Joomla\CMS\User\User;
|
||||||
use Joomla\CMS\Component\ComponentHelper;
|
use Joomla\CMS\Component\ComponentHelper;
|
||||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||||
use Joomla\CMS\Layout\FileLayout;
|
use Joomla\CMS\Layout\FileLayout;
|
||||||
@@ -43,23 +44,105 @@ use JCB\Joomla\Utilities\StringHelper;
|
|||||||
*
|
*
|
||||||
* @since 1.6
|
* @since 1.6
|
||||||
*/
|
*/
|
||||||
|
#[\AllowDynamicProperties]
|
||||||
class HtmlView extends BaseHtmlView
|
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
|
* Country view display method
|
||||||
*
|
*
|
||||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
* @throws \Exception
|
||||||
* @since 1.6
|
* @since 1.6
|
||||||
*/
|
*/
|
||||||
public function display($tpl = null)
|
public function display($tpl = null): void
|
||||||
{
|
{
|
||||||
// set params
|
// set params
|
||||||
$this->params = ComponentHelper::getParams('com_subformpower');
|
$this->params = ComponentHelper::getParams('com_subformpower');
|
||||||
$this->useCoreUI = true;
|
$this->useCoreUI = true;
|
||||||
// Assign the variables
|
// Assign the variables
|
||||||
$this->form = $this->get('Form');
|
$this->form ??= $this->get('Form');
|
||||||
$this->item = $this->get('Item');
|
$this->item = $this->get('Item');
|
||||||
$this->styles = $this->get('Styles');
|
$this->styles = $this->get('Styles');
|
||||||
$this->scripts = $this->get('Scripts');
|
$this->scripts = $this->get('Scripts');
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage HtmlView.php
|
@subpackage HtmlView.php
|
||||||
@@ -25,6 +25,7 @@ use Joomla\CMS\Toolbar\Toolbar;
|
|||||||
use Joomla\CMS\Form\FormHelper;
|
use Joomla\CMS\Form\FormHelper;
|
||||||
use Joomla\CMS\Session\Session;
|
use Joomla\CMS\Session\Session;
|
||||||
use Joomla\CMS\Uri\Uri;
|
use Joomla\CMS\Uri\Uri;
|
||||||
|
use Joomla\CMS\User\User;
|
||||||
use Joomla\CMS\Component\ComponentHelper;
|
use Joomla\CMS\Component\ComponentHelper;
|
||||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||||
use Joomla\CMS\Layout\FileLayout;
|
use Joomla\CMS\Layout\FileLayout;
|
||||||
@@ -44,17 +45,75 @@ use JCB\Joomla\Utilities\StringHelper;
|
|||||||
*
|
*
|
||||||
* @since 1.6
|
* @since 1.6
|
||||||
*/
|
*/
|
||||||
|
#[\AllowDynamicProperties]
|
||||||
class HtmlView extends BaseHtmlView
|
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
|
* Currencies view display method
|
||||||
*
|
*
|
||||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
* @throws \Exception
|
||||||
* @since 1.6
|
* @since 1.6
|
||||||
*/
|
*/
|
||||||
public function display($tpl = null)
|
public function display($tpl = null): void
|
||||||
{
|
{
|
||||||
// Assign data to the view
|
// Assign data to the view
|
||||||
$this->items = $this->get('Items');
|
$this->items = $this->get('Items');
|
||||||
@@ -62,7 +121,7 @@ class HtmlView extends BaseHtmlView
|
|||||||
$this->state = $this->get('State');
|
$this->state = $this->get('State');
|
||||||
$this->styles = $this->get('Styles');
|
$this->styles = $this->get('Styles');
|
||||||
$this->scripts = $this->get('Scripts');
|
$this->scripts = $this->get('Scripts');
|
||||||
$this->user ??= Factory::getApplication()->getIdentity();
|
$this->user ??= $this->getCurrentUser();
|
||||||
// Load the filter form from xml.
|
// Load the filter form from xml.
|
||||||
$this->filterForm = $this->get('FilterForm');
|
$this->filterForm = $this->get('FilterForm');
|
||||||
// Load the active filters.
|
// Load the active filters.
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage HtmlView.php
|
@subpackage HtmlView.php
|
||||||
@@ -25,6 +25,7 @@ use Joomla\CMS\Toolbar\Toolbar;
|
|||||||
use Joomla\CMS\Form\FormHelper;
|
use Joomla\CMS\Form\FormHelper;
|
||||||
use Joomla\CMS\Session\Session;
|
use Joomla\CMS\Session\Session;
|
||||||
use Joomla\CMS\Uri\Uri;
|
use Joomla\CMS\Uri\Uri;
|
||||||
|
use Joomla\CMS\User\User;
|
||||||
use Joomla\CMS\Component\ComponentHelper;
|
use Joomla\CMS\Component\ComponentHelper;
|
||||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||||
use Joomla\CMS\Layout\FileLayout;
|
use Joomla\CMS\Layout\FileLayout;
|
||||||
@@ -43,23 +44,105 @@ use JCB\Joomla\Utilities\StringHelper;
|
|||||||
*
|
*
|
||||||
* @since 1.6
|
* @since 1.6
|
||||||
*/
|
*/
|
||||||
|
#[\AllowDynamicProperties]
|
||||||
class HtmlView extends BaseHtmlView
|
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
|
* Currency view display method
|
||||||
*
|
*
|
||||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
* @throws \Exception
|
||||||
* @since 1.6
|
* @since 1.6
|
||||||
*/
|
*/
|
||||||
public function display($tpl = null)
|
public function display($tpl = null): void
|
||||||
{
|
{
|
||||||
// set params
|
// set params
|
||||||
$this->params = ComponentHelper::getParams('com_subformpower');
|
$this->params = ComponentHelper::getParams('com_subformpower');
|
||||||
$this->useCoreUI = true;
|
$this->useCoreUI = true;
|
||||||
// Assign the variables
|
// Assign the variables
|
||||||
$this->form = $this->get('Form');
|
$this->form ??= $this->get('Form');
|
||||||
$this->item = $this->get('Item');
|
$this->item = $this->get('Item');
|
||||||
$this->styles = $this->get('Styles');
|
$this->styles = $this->get('Styles');
|
||||||
$this->scripts = $this->get('Scripts');
|
$this->scripts = $this->get('Scripts');
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage HtmlView.php
|
@subpackage HtmlView.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage HtmlView.php
|
@subpackage HtmlView.php
|
||||||
@@ -36,13 +36,17 @@ use JCB\Joomla\Utilities\StringHelper;
|
|||||||
*
|
*
|
||||||
* @since 1.6
|
* @since 1.6
|
||||||
*/
|
*/
|
||||||
|
#[\AllowDynamicProperties]
|
||||||
class HtmlView extends BaseHtmlView
|
class HtmlView extends BaseHtmlView
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* View display method
|
* View display method
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
* @throws \Exception
|
||||||
|
* @since 1.6
|
||||||
*/
|
*/
|
||||||
function display($tpl = null)
|
function display($tpl = null): void
|
||||||
{
|
{
|
||||||
// Assign data to the view
|
// Assign data to the view
|
||||||
$this->icons = $this->get('Icons');
|
$this->icons = $this->get('Icons');
|
||||||
@@ -104,7 +108,7 @@ class HtmlView extends BaseHtmlView
|
|||||||
// set page title
|
// set page title
|
||||||
$this->getDocument()->setTitle(Text::_('COM_SUBFORMPOWER_DASHBOARD'));
|
$this->getDocument()->setTitle(Text::_('COM_SUBFORMPOWER_DASHBOARD'));
|
||||||
// add manifest to page JavaScript
|
// add manifest to page JavaScript
|
||||||
$this->getDocument()->addScriptDeclaration("var manifest = JSON.parse('" . json_encode($this->manifest) . "');", "text/javascript");
|
$this->getDocument()->addScriptDeclaration("var manifest = JSON.parse(" . json_encode($this->manifest) . ");", "text/javascript");
|
||||||
// add styles
|
// add styles
|
||||||
foreach ($this->styles as $style)
|
foreach ($this->styles as $style)
|
||||||
{
|
{
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default.php
|
@subpackage default.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default_body.php
|
@subpackage default_body.php
|
||||||
@@ -22,6 +22,7 @@ use Joomla\CMS\Factory;
|
|||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||||
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
||||||
|
use Joomla\CMS\User\UserFactoryInterface;
|
||||||
|
|
||||||
// No direct access to this file
|
// No direct access to this file
|
||||||
defined('_JEXEC') or die;
|
defined('_JEXEC') or die;
|
||||||
@@ -33,8 +34,8 @@ $edit = "index.php?option=com_subformpower&view=countries&task=country.edit";
|
|||||||
<?php
|
<?php
|
||||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||||
$userChkOut = Factory::getContainer()->
|
$userChkOut = Factory::getContainer()->
|
||||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
get(UserFactoryInterface::class)->
|
||||||
loadUserById($item->checked_out);
|
loadUserById($item->checked_out ?? 0);
|
||||||
$canDo = SubformpowerHelper::getActions('country',$item,'countries');
|
$canDo = SubformpowerHelper::getActions('country',$item,'countries');
|
||||||
?>
|
?>
|
||||||
<tr class="row<?php echo $i % 2; ?>">
|
<tr class="row<?php echo $i % 2; ?>">
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default_foot.php
|
@subpackage default_foot.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default_head.php
|
@subpackage default_head.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default_toolbar.php
|
@subpackage default_toolbar.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage emptystate.php
|
@subpackage emptystate.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default.php
|
@subpackage default.php
|
||||||
@@ -111,14 +111,10 @@ defined('_JEXEC') or die;
|
|||||||
<?php echo Html::_('uitab.addTab', 'countryTab', 'permissions', Text::_('COM_SUBFORMPOWER_COUNTRY_PERMISSION', true)); ?>
|
<?php echo Html::_('uitab.addTab', 'countryTab', 'permissions', Text::_('COM_SUBFORMPOWER_COUNTRY_PERMISSION', true)); ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<fieldset class="adminform">
|
<fieldset id="fieldset-rules" class="options-form">
|
||||||
<div class="adminformlist">
|
<legend><?php echo Text::_('COM_SUBFORMPOWER_COUNTRY_PERMISSION'); ?></legend>
|
||||||
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
|
|
||||||
<div>
|
<div>
|
||||||
<?php echo $field->label; echo $field->input;?>
|
<?php echo $this->form->getInput('rules'); ?>
|
||||||
</div>
|
|
||||||
<div class="clearfix"></div>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default.php
|
@subpackage default.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default_body.php
|
@subpackage default_body.php
|
||||||
@@ -22,6 +22,7 @@ use Joomla\CMS\Factory;
|
|||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||||
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
||||||
|
use Joomla\CMS\User\UserFactoryInterface;
|
||||||
|
|
||||||
// No direct access to this file
|
// No direct access to this file
|
||||||
defined('_JEXEC') or die;
|
defined('_JEXEC') or die;
|
||||||
@@ -33,8 +34,8 @@ $edit = "index.php?option=com_subformpower&view=currencies&task=currency.edit";
|
|||||||
<?php
|
<?php
|
||||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||||
$userChkOut = Factory::getContainer()->
|
$userChkOut = Factory::getContainer()->
|
||||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
get(UserFactoryInterface::class)->
|
||||||
loadUserById($item->checked_out);
|
loadUserById($item->checked_out ?? 0);
|
||||||
$canDo = SubformpowerHelper::getActions('currency',$item,'currencies');
|
$canDo = SubformpowerHelper::getActions('currency',$item,'currencies');
|
||||||
?>
|
?>
|
||||||
<tr class="row<?php echo $i % 2; ?>">
|
<tr class="row<?php echo $i % 2; ?>">
|
||||||
@@ -76,12 +77,12 @@ $edit = "index.php?option=com_subformpower&view=currencies&task=currency.edit";
|
|||||||
<td class="nowrap">
|
<td class="nowrap">
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<?php if ($canDo->get('currency.edit')): ?>
|
<?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 if ($item->checked_out): ?>
|
||||||
<?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'currencies.', $canCheckin); ?>
|
<?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'currencies.', $canCheckin); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php echo $this->escape($item->name); ?>
|
<?php echo $this->escape($item->ext_number); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default_foot.php
|
@subpackage default_foot.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default_head.php
|
@subpackage default_head.php
|
||||||
@@ -42,7 +42,7 @@ defined('_JEXEC') or die;
|
|||||||
</th>
|
</th>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<th class="nowrap" >
|
<th class="nowrap" >
|
||||||
<?php echo Text::_('COM_SUBFORMPOWER_CURRENCY_NAME_LABEL'); ?>
|
<?php echo Text::_('COM_SUBFORMPOWER_CURRENCY_EXT_NUMBER_LABEL'); ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="nowrap hidden-phone" >
|
<th class="nowrap hidden-phone" >
|
||||||
<?php echo Html::_('searchtools.sort', 'COM_SUBFORMPOWER_CURRENCY_SYMBOL_LABEL', 'a.symbol', $this->listDirn, $this->listOrder); ?>
|
<?php echo Html::_('searchtools.sort', 'COM_SUBFORMPOWER_CURRENCY_SYMBOL_LABEL', 'a.symbol', $this->listDirn, $this->listOrder); ?>
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default_toolbar.php
|
@subpackage default_toolbar.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage emptystate.php
|
@subpackage emptystate.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default.php
|
@subpackage default.php
|
||||||
@@ -89,14 +89,10 @@ defined('_JEXEC') or die;
|
|||||||
<?php echo Html::_('uitab.addTab', 'currencyTab', 'permissions', Text::_('COM_SUBFORMPOWER_CURRENCY_PERMISSION', true)); ?>
|
<?php echo Html::_('uitab.addTab', 'currencyTab', 'permissions', Text::_('COM_SUBFORMPOWER_CURRENCY_PERMISSION', true)); ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<fieldset class="adminform">
|
<fieldset id="fieldset-rules" class="options-form">
|
||||||
<div class="adminformlist">
|
<legend><?php echo Text::_('COM_SUBFORMPOWER_CURRENCY_PERMISSION'); ?></legend>
|
||||||
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
|
|
||||||
<div>
|
<div>
|
||||||
<?php echo $field->label; echo $field->input;?>
|
<?php echo $this->form->getInput('rules'); ?>
|
||||||
</div>
|
|
||||||
<div class="clearfix"></div>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default.php
|
@subpackage default.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default.php
|
@subpackage default.php
|
||||||
@@ -31,18 +31,10 @@ defined('_JEXEC') or die;
|
|||||||
<div class="main-card" style="padding: 20px;">
|
<div class="main-card" style="padding: 20px;">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<?php echo Html::_('bootstrap.startAccordion', 'dashboard_left', array('active' => 'main')); ?>
|
|
||||||
<?php echo Html::_('bootstrap.addSlide', 'dashboard_left', 'cPanel', 'main'); ?>
|
|
||||||
<?php echo $this->loadTemplate('main');?>
|
<?php echo $this->loadTemplate('main');?>
|
||||||
<?php echo Html::_('bootstrap.endSlide'); ?>
|
|
||||||
<?php echo Html::_('bootstrap.endAccordion'); ?>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<?php echo Html::_('bootstrap.startAccordion', 'dashboard_right', array('active' => 'vdm')); ?>
|
|
||||||
<?php echo Html::_('bootstrap.addSlide', 'dashboard_right', 'Nampharm', 'vdm'); ?>
|
|
||||||
<?php echo $this->loadTemplate('vdm');?>
|
<?php echo $this->loadTemplate('vdm');?>
|
||||||
<?php echo Html::_('bootstrap.endSlide'); ?>
|
|
||||||
<?php echo Html::_('bootstrap.endAccordion'); ?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default_main.php
|
@subpackage default_main.php
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
Nampharm
|
Nampharm
|
||||||
/-------------------------------------------------------------------------------------------------------/
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
@version 1.0.0
|
@version 1.0.1
|
||||||
@build 27th June, 2024
|
@build 5th February, 2025
|
||||||
@created 24th May, 2024
|
@created 24th May, 2024
|
||||||
@package Subform Power
|
@package Subform Power
|
||||||
@subpackage default_vdm.php
|
@subpackage default_vdm.php
|
||||||
|
1
api/index.html
Normal file
1
api/index.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<html><body bgcolor="#FFFFFF"></body></html>
|
51
api/src/Controller/CountriesController.php
Normal file
51
api/src/Controller/CountriesController.php
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||||
|
Nampharm
|
||||||
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
|
@version 1.0.1
|
||||||
|
@build 5th February, 2025
|
||||||
|
@created 24th May, 2024
|
||||||
|
@package Subform Power
|
||||||
|
@subpackage CountriesController.php
|
||||||
|
@author Oh Martin <https://nampharm.com.na>
|
||||||
|
@copyright Copyright (C) 2015. All Rights Reserved
|
||||||
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||||
|
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||||
|
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||||
|
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||||
|
|
||||||
|
/------------------------------------------------------------------------------------------------------*/
|
||||||
|
namespace JCB\Component\Subformpower\Api\Controller;
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\MVC\Controller\ApiController;
|
||||||
|
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
||||||
|
|
||||||
|
// No direct access to this file
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Countries Api Controller
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
class CountriesController extends ApiController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The content type of the item.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
protected $contentType = 'countries';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default view for the display method.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 3.0
|
||||||
|
*/
|
||||||
|
protected $default_view = 'countries';
|
||||||
|
}
|
138
api/src/Controller/CountryController.php
Normal file
138
api/src/Controller/CountryController.php
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
<?php
|
||||||
|
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||||
|
Nampharm
|
||||||
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
|
@version 1.0.1
|
||||||
|
@build 5th February, 2025
|
||||||
|
@created 24th May, 2024
|
||||||
|
@package Subform Power
|
||||||
|
@subpackage CountryController.php
|
||||||
|
@author Oh Martin <https://nampharm.com.na>
|
||||||
|
@copyright Copyright (C) 2015. All Rights Reserved
|
||||||
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||||
|
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||||
|
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||||
|
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||||
|
|
||||||
|
/------------------------------------------------------------------------------------------------------*/
|
||||||
|
namespace JCB\Component\Subformpower\Api\Controller;
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\MVC\Controller\ApiController;
|
||||||
|
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
||||||
|
|
||||||
|
// No direct access to this file
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Country Api Controller
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
class CountryController extends ApiController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The content type of the item.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
protected $contentType = 'country';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default view for the display method.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 3.0
|
||||||
|
*/
|
||||||
|
protected $default_view = 'country';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method override to check if you can add a new record.
|
||||||
|
*
|
||||||
|
* @param array $data An array of input data.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @since 1.6
|
||||||
|
*/
|
||||||
|
protected function allowAdd($data = [])
|
||||||
|
{
|
||||||
|
// Get user object.
|
||||||
|
$user = $this->app->getIdentity();
|
||||||
|
// Access check.
|
||||||
|
$access = $user->authorise('country.access', 'com_subformpower');
|
||||||
|
if (!$access)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// In the absence of better information, revert to the component permissions.
|
||||||
|
return $user->authorise('country.create', $this->option);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method override to check if you can edit an existing record.
|
||||||
|
*
|
||||||
|
* @param array $data An array of input data.
|
||||||
|
* @param string $key The name of the key for the primary key.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @since 1.6
|
||||||
|
*/
|
||||||
|
protected function allowEdit($data = [], $key = 'id')
|
||||||
|
{
|
||||||
|
// get user object.
|
||||||
|
$user = $this->app->getIdentity();
|
||||||
|
// get record id.
|
||||||
|
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||||
|
|
||||||
|
|
||||||
|
// Access check.
|
||||||
|
$access = ($user->authorise('country.access', 'com_subformpower.country.' . (int) $recordId) && $user->authorise('country.access', 'com_subformpower'));
|
||||||
|
if (!$access)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($recordId)
|
||||||
|
{
|
||||||
|
// The record has been set. Check the record permissions.
|
||||||
|
$permission = $user->authorise('country.edit', 'com_subformpower.country.' . (int) $recordId);
|
||||||
|
if (!$permission)
|
||||||
|
{
|
||||||
|
if ($user->authorise('country.edit.own', 'com_subformpower.country.' . $recordId))
|
||||||
|
{
|
||||||
|
// Now test the owner is the user.
|
||||||
|
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||||
|
if (empty($ownerId))
|
||||||
|
{
|
||||||
|
// Need to do a lookup from the model.
|
||||||
|
$record = $this->getModel()->getItem($recordId);
|
||||||
|
|
||||||
|
if (empty($record))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$ownerId = $record->created_by;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the owner matches 'me' then allow.
|
||||||
|
if ($ownerId == $user->id)
|
||||||
|
{
|
||||||
|
if ($user->authorise('country.edit.own', 'com_subformpower'))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Since there is no permission, revert to the component permissions.
|
||||||
|
return $user->authorise('country.edit', $this->option);
|
||||||
|
}
|
||||||
|
}
|
51
api/src/Controller/CurrenciesController.php
Normal file
51
api/src/Controller/CurrenciesController.php
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||||
|
Nampharm
|
||||||
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
|
@version 1.0.1
|
||||||
|
@build 5th February, 2025
|
||||||
|
@created 24th May, 2024
|
||||||
|
@package Subform Power
|
||||||
|
@subpackage CurrenciesController.php
|
||||||
|
@author Oh Martin <https://nampharm.com.na>
|
||||||
|
@copyright Copyright (C) 2015. All Rights Reserved
|
||||||
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||||
|
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||||
|
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||||
|
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||||
|
|
||||||
|
/------------------------------------------------------------------------------------------------------*/
|
||||||
|
namespace JCB\Component\Subformpower\Api\Controller;
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\MVC\Controller\ApiController;
|
||||||
|
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
||||||
|
|
||||||
|
// No direct access to this file
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Currencies Api Controller
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
class CurrenciesController extends ApiController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The content type of the item.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
protected $contentType = 'currencies';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default view for the display method.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 3.0
|
||||||
|
*/
|
||||||
|
protected $default_view = 'currencies';
|
||||||
|
}
|
138
api/src/Controller/CurrencyController.php
Normal file
138
api/src/Controller/CurrencyController.php
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
<?php
|
||||||
|
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||||
|
Nampharm
|
||||||
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
|
@version 1.0.1
|
||||||
|
@build 5th February, 2025
|
||||||
|
@created 24th May, 2024
|
||||||
|
@package Subform Power
|
||||||
|
@subpackage CurrencyController.php
|
||||||
|
@author Oh Martin <https://nampharm.com.na>
|
||||||
|
@copyright Copyright (C) 2015. All Rights Reserved
|
||||||
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||||
|
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||||
|
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||||
|
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||||
|
|
||||||
|
/------------------------------------------------------------------------------------------------------*/
|
||||||
|
namespace JCB\Component\Subformpower\Api\Controller;
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\MVC\Controller\ApiController;
|
||||||
|
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
||||||
|
|
||||||
|
// No direct access to this file
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Currency Api Controller
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
class CurrencyController extends ApiController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The content type of the item.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
protected $contentType = 'currency';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default view for the display method.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 3.0
|
||||||
|
*/
|
||||||
|
protected $default_view = 'currency';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method override to check if you can add a new record.
|
||||||
|
*
|
||||||
|
* @param array $data An array of input data.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @since 1.6
|
||||||
|
*/
|
||||||
|
protected function allowAdd($data = [])
|
||||||
|
{
|
||||||
|
// Get user object.
|
||||||
|
$user = $this->app->getIdentity();
|
||||||
|
// Access check.
|
||||||
|
$access = $user->authorise('currency.access', 'com_subformpower');
|
||||||
|
if (!$access)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// In the absence of better information, revert to the component permissions.
|
||||||
|
return $user->authorise('currency.create', $this->option);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method override to check if you can edit an existing record.
|
||||||
|
*
|
||||||
|
* @param array $data An array of input data.
|
||||||
|
* @param string $key The name of the key for the primary key.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @since 1.6
|
||||||
|
*/
|
||||||
|
protected function allowEdit($data = [], $key = 'id')
|
||||||
|
{
|
||||||
|
// get user object.
|
||||||
|
$user = $this->app->getIdentity();
|
||||||
|
// get record id.
|
||||||
|
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||||
|
|
||||||
|
|
||||||
|
// Access check.
|
||||||
|
$access = ($user->authorise('currency.access', 'com_subformpower.currency.' . (int) $recordId) && $user->authorise('currency.access', 'com_subformpower'));
|
||||||
|
if (!$access)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($recordId)
|
||||||
|
{
|
||||||
|
// The record has been set. Check the record permissions.
|
||||||
|
$permission = $user->authorise('currency.edit', 'com_subformpower.currency.' . (int) $recordId);
|
||||||
|
if (!$permission)
|
||||||
|
{
|
||||||
|
if ($user->authorise('currency.edit.own', 'com_subformpower.currency.' . $recordId))
|
||||||
|
{
|
||||||
|
// Now test the owner is the user.
|
||||||
|
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||||
|
if (empty($ownerId))
|
||||||
|
{
|
||||||
|
// Need to do a lookup from the model.
|
||||||
|
$record = $this->getModel()->getItem($recordId);
|
||||||
|
|
||||||
|
if (empty($record))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$ownerId = $record->created_by;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the owner matches 'me' then allow.
|
||||||
|
if ($ownerId == $user->id)
|
||||||
|
{
|
||||||
|
if ($user->authorise('currency.edit.own', 'com_subformpower'))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Since there is no permission, revert to the component permissions.
|
||||||
|
return $user->authorise('currency.edit', $this->option);
|
||||||
|
}
|
||||||
|
}
|
1
api/src/Controller/index.html
Normal file
1
api/src/Controller/index.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<html><body bgcolor="#FFFFFF"></body></html>
|
36
api/src/View/Countries/JsonapiView.php
Normal file
36
api/src/View/Countries/JsonapiView.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||||
|
Nampharm
|
||||||
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
|
@version 1.0.1
|
||||||
|
@build 5th February, 2025
|
||||||
|
@created 24th May, 2024
|
||||||
|
@package Subform Power
|
||||||
|
@subpackage JsonapiView.php
|
||||||
|
@author Oh Martin <https://nampharm.com.na>
|
||||||
|
@copyright Copyright (C) 2015. All Rights Reserved
|
||||||
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||||
|
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||||
|
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||||
|
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||||
|
|
||||||
|
/------------------------------------------------------------------------------------------------------*/
|
||||||
|
namespace JCB\Component\Subformpower\Api\View\Countries;
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
|
||||||
|
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
||||||
|
|
||||||
|
// No direct access to this file
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Subformpower Json View class for the Countries
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
class JsonapiView extends BaseApiView
|
||||||
|
{
|
||||||
|
}
|
1
api/src/View/Countries/index.html
Normal file
1
api/src/View/Countries/index.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<html><body bgcolor="#FFFFFF"></body></html>
|
36
api/src/View/Country/JsonapiView.php
Normal file
36
api/src/View/Country/JsonapiView.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||||
|
Nampharm
|
||||||
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
|
@version 1.0.1
|
||||||
|
@build 5th February, 2025
|
||||||
|
@created 24th May, 2024
|
||||||
|
@package Subform Power
|
||||||
|
@subpackage JsonapiView.php
|
||||||
|
@author Oh Martin <https://nampharm.com.na>
|
||||||
|
@copyright Copyright (C) 2015. All Rights Reserved
|
||||||
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||||
|
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||||
|
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||||
|
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||||
|
|
||||||
|
/------------------------------------------------------------------------------------------------------*/
|
||||||
|
namespace JCB\Component\Subformpower\Api\View\Country;
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
|
||||||
|
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
||||||
|
|
||||||
|
// No direct access to this file
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Country Json View class
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
class JsonapiView extends BaseApiView
|
||||||
|
{
|
||||||
|
}
|
1
api/src/View/Country/index.html
Normal file
1
api/src/View/Country/index.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<html><body bgcolor="#FFFFFF"></body></html>
|
36
api/src/View/Currencies/JsonapiView.php
Normal file
36
api/src/View/Currencies/JsonapiView.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||||
|
Nampharm
|
||||||
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
|
@version 1.0.1
|
||||||
|
@build 5th February, 2025
|
||||||
|
@created 24th May, 2024
|
||||||
|
@package Subform Power
|
||||||
|
@subpackage JsonapiView.php
|
||||||
|
@author Oh Martin <https://nampharm.com.na>
|
||||||
|
@copyright Copyright (C) 2015. All Rights Reserved
|
||||||
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||||
|
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||||
|
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||||
|
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||||
|
|
||||||
|
/------------------------------------------------------------------------------------------------------*/
|
||||||
|
namespace JCB\Component\Subformpower\Api\View\Currencies;
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
|
||||||
|
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
||||||
|
|
||||||
|
// No direct access to this file
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Subformpower Json View class for the Currencies
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
class JsonapiView extends BaseApiView
|
||||||
|
{
|
||||||
|
}
|
1
api/src/View/Currencies/index.html
Normal file
1
api/src/View/Currencies/index.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<html><body bgcolor="#FFFFFF"></body></html>
|
36
api/src/View/Currency/JsonapiView.php
Normal file
36
api/src/View/Currency/JsonapiView.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||||
|
Nampharm
|
||||||
|
/-------------------------------------------------------------------------------------------------------/
|
||||||
|
|
||||||
|
@version 1.0.1
|
||||||
|
@build 5th February, 2025
|
||||||
|
@created 24th May, 2024
|
||||||
|
@package Subform Power
|
||||||
|
@subpackage JsonapiView.php
|
||||||
|
@author Oh Martin <https://nampharm.com.na>
|
||||||
|
@copyright Copyright (C) 2015. All Rights Reserved
|
||||||
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||||
|
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||||
|
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||||
|
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||||
|
|
||||||
|
/------------------------------------------------------------------------------------------------------*/
|
||||||
|
namespace JCB\Component\Subformpower\Api\View\Currency;
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
|
||||||
|
use JCB\Component\Subformpower\Administrator\Helper\SubformpowerHelper;
|
||||||
|
|
||||||
|
// No direct access to this file
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Currency Json View class
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
class JsonapiView extends BaseApiView
|
||||||
|
{
|
||||||
|
}
|
1
api/src/View/Currency/index.html
Normal file
1
api/src/View/Currency/index.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<html><body bgcolor="#FFFFFF"></body></html>
|
1
api/src/View/index.html
Normal file
1
api/src/View/index.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<html><body bgcolor="#FFFFFF"></body></html>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user