From ce2323a83f2c9b49c07243e5904a4103da596233 Mon Sep 17 00:00:00 2001 From: Ankush Maherwal Date: Tue, 24 May 2022 15:35:48 +0530 Subject: [PATCH 1/4] Task #173952 feat: Jticketing compatibility with joomla 4 --- .../views/notifications/tmpl/default_bs5.php | 2 +- .../admin/views/subscription/tmpl/edit.php | 68 +---- .../views/subscription/tmpl/edit_bs2.php | 72 ++++++ .../views/subscription/tmpl/edit_bs5.php | 71 ++++++ .../views/subscriptions/tmpl/default.php | 208 +--------------- .../views/subscriptions/tmpl/default_bs2.php | 212 ++++++++++++++++ .../views/subscriptions/tmpl/default_bs5.php | 232 ++++++++++++++++++ 7 files changed, 604 insertions(+), 261 deletions(-) create mode 100644 src/com_tjnotifications/admin/views/subscription/tmpl/edit_bs2.php create mode 100644 src/com_tjnotifications/admin/views/subscription/tmpl/edit_bs5.php create mode 100644 src/com_tjnotifications/admin/views/subscriptions/tmpl/default_bs2.php create mode 100644 src/com_tjnotifications/admin/views/subscriptions/tmpl/default_bs5.php diff --git a/src/com_tjnotifications/admin/views/notifications/tmpl/default_bs5.php b/src/com_tjnotifications/admin/views/notifications/tmpl/default_bs5.php index b6595cf9..8b686968 100644 --- a/src/com_tjnotifications/admin/views/notifications/tmpl/default_bs5.php +++ b/src/com_tjnotifications/admin/views/notifications/tmpl/default_bs5.php @@ -56,7 +56,7 @@ { ?>
 
-
+
addScriptDeclaration($script); - -Text::script('JGLOBAL_VALIDATION_FORM_FAILED'); -?> - -
-
- -
- form->renderField('title'); ?> - form->renderField('user_id'); ?> - form->renderField('backend'); ?> - form->renderField('address'); ?> - form->renderField('device_id'); ?> - form->renderField('platform'); ?> - form->renderField('state'); ?> - form->renderField('is_confirmed'); ?> -
- - - - - - - - - -
-
+if (JVERSION < '4.0.0') +{ + echo $this->loadTemplate('bs2'); +} +else +{ + echo $this->loadTemplate('bs5'); +} diff --git a/src/com_tjnotifications/admin/views/subscription/tmpl/edit_bs2.php b/src/com_tjnotifications/admin/views/subscription/tmpl/edit_bs2.php new file mode 100644 index 00000000..0c5ba5aa --- /dev/null +++ b/src/com_tjnotifications/admin/views/subscription/tmpl/edit_bs2.php @@ -0,0 +1,72 @@ +addScriptDeclaration($script); + +Text::script('JGLOBAL_VALIDATION_FORM_FAILED'); +?> + +
+
+ +
+ form->renderField('title'); ?> + form->renderField('user_id'); ?> + form->renderField('backend'); ?> + form->renderField('address'); ?> + form->renderField('device_id'); ?> + form->renderField('platform'); ?> + form->renderField('state'); ?> + form->renderField('is_confirmed'); ?> +
+ + + + + + + + + +
+
diff --git a/src/com_tjnotifications/admin/views/subscription/tmpl/edit_bs5.php b/src/com_tjnotifications/admin/views/subscription/tmpl/edit_bs5.php new file mode 100644 index 00000000..2271bc3f --- /dev/null +++ b/src/com_tjnotifications/admin/views/subscription/tmpl/edit_bs5.php @@ -0,0 +1,71 @@ +addScriptDeclaration($script); + +Text::script('JGLOBAL_VALIDATION_FORM_FAILED'); +?> + +
+
+ +
+ form->renderField('title'); ?> + form->renderField('user_id'); ?> + form->renderField('backend'); ?> + form->renderField('address'); ?> + form->renderField('device_id'); ?> + form->renderField('platform'); ?> + form->renderField('state'); ?> + form->renderField('is_confirmed'); ?> +
+ + + + + + + + + +
+
diff --git a/src/com_tjnotifications/admin/views/subscriptions/tmpl/default.php b/src/com_tjnotifications/admin/views/subscriptions/tmpl/default.php index 22d8f001..7f9e3c34 100644 --- a/src/com_tjnotifications/admin/views/subscriptions/tmpl/default.php +++ b/src/com_tjnotifications/admin/views/subscriptions/tmpl/default.php @@ -10,203 +10,11 @@ // No direct access defined('_JEXEC') or die('Restricted access'); -use Joomla\CMS\HTML\HTMLHelper; -use Joomla\CMS\Factory; -use Joomla\CMS\Language\Text; -use Joomla\CMS\Layout\LayoutHelper; -use Joomla\CMS\Router\Route; -use Joomla\CMS\Uri\Uri; - -HTMLHelper::_('behavior.multiselect'); -HTMLHelper::_('formbehavior.chosen', 'select'); -HTMLHelper::_('bootstrap.tooltip'); - -$userId = $this->user->get('id'); -$listOrder = $this->state->get('list.ordering'); -$listDirn = $this->state->get('list.direction'); -$canOrder = $this->user->authorise('core.edit.state', 'com_tjnotifications'); - -$sortFields = $this->getSortFields(); -?> - -
- sidebar)) - { - ?> -
- sidebar; ?> -
- -
- -
- - - $this)); ?> - -
- - - - - - - items[0]->state)) - { - ?> - - - - - - - - - - - - - - - - - - - items as $i => $item) - { - $ordering = ($listOrder == 'a.id'); - $canCreate = $this->user->authorise('core.create', 'com_tjnotifications'); - $canEdit = $this->user->authorise('core.edit', 'com_tjnotifications'); - $canCheckin = $this->user->authorise('core.manage', 'com_tjnotifications'); - $canChange = $this->user->authorise('core.edit.state', 'com_tjnotifications'); - ?> - - - - - items[0]->state)) - { - ?> - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- id); ?> - - state, $i, 'subscriptions.', $canChange, 'cb'); ?> - - checked_out) && $item->checked_out && ($canEdit || $canChange)) - { - echo HTMLHelper::_('jgrid.checkedout', $i, $item->uEditor, $item->checked_out_time, 'subscriptions.', $canCheckin); - } - - if ($canEdit) - { - ?> - - user_id)->name; ?> - - -
- - - escape($item->title); ?> - - - user_id)->name; - ?> - -
- - - escape($item->title); ?> - - - -
backend; ?>address; ?> - device_id; ?> - - platform)) - { - ?> -
- - platform; ?> - - -
- is_confirmed) ? Text::_('JYES') : Text::_('JNO'); ?> - id; ?>
- pagination->getListFooter(); ?> -
- - - - - - -
- +if (JVERSION < '4.0.0') +{ + echo $this->loadTemplate('bs2'); +} +else +{ + echo $this->loadTemplate('bs5'); +} diff --git a/src/com_tjnotifications/admin/views/subscriptions/tmpl/default_bs2.php b/src/com_tjnotifications/admin/views/subscriptions/tmpl/default_bs2.php new file mode 100644 index 00000000..22d8f001 --- /dev/null +++ b/src/com_tjnotifications/admin/views/subscriptions/tmpl/default_bs2.php @@ -0,0 +1,212 @@ +user->get('id'); +$listOrder = $this->state->get('list.ordering'); +$listDirn = $this->state->get('list.direction'); +$canOrder = $this->user->authorise('core.edit.state', 'com_tjnotifications'); + +$sortFields = $this->getSortFields(); +?> + +
+ sidebar)) + { + ?> +
+ sidebar; ?> +
+ +
+ +
+ + + $this)); ?> + +
+ + + + + + + items[0]->state)) + { + ?> + + + + + + + + + + + + + + + + + + + items as $i => $item) + { + $ordering = ($listOrder == 'a.id'); + $canCreate = $this->user->authorise('core.create', 'com_tjnotifications'); + $canEdit = $this->user->authorise('core.edit', 'com_tjnotifications'); + $canCheckin = $this->user->authorise('core.manage', 'com_tjnotifications'); + $canChange = $this->user->authorise('core.edit.state', 'com_tjnotifications'); + ?> + + + + + items[0]->state)) + { + ?> + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ id); ?> + + state, $i, 'subscriptions.', $canChange, 'cb'); ?> + + checked_out) && $item->checked_out && ($canEdit || $canChange)) + { + echo HTMLHelper::_('jgrid.checkedout', $i, $item->uEditor, $item->checked_out_time, 'subscriptions.', $canCheckin); + } + + if ($canEdit) + { + ?> + + user_id)->name; ?> + + +
+ + + escape($item->title); ?> + + + user_id)->name; + ?> + +
+ + + escape($item->title); ?> + + + +
backend; ?>address; ?> + device_id; ?> + + platform)) + { + ?> +
+ + platform; ?> + + +
+ is_confirmed) ? Text::_('JYES') : Text::_('JNO'); ?> + id; ?>
+ pagination->getListFooter(); ?> +
+ + + + + + +
+ diff --git a/src/com_tjnotifications/admin/views/subscriptions/tmpl/default_bs5.php b/src/com_tjnotifications/admin/views/subscriptions/tmpl/default_bs5.php new file mode 100644 index 00000000..e2fd094e --- /dev/null +++ b/src/com_tjnotifications/admin/views/subscriptions/tmpl/default_bs5.php @@ -0,0 +1,232 @@ +addStyleDeclaration($style); + +$userId = $this->user->get('id'); +$listOrder = $this->state->get('list.ordering'); +$listDirn = $this->state->get('list.direction'); +$canOrder = $this->user->authorise('core.edit.state', 'com_tjnotifications'); + +$sortFields = $this->getSortFields(); +?> + +
+ sidebar)) + { + ?> +
+ sidebar; ?> +
+ +
+ +
+ + + $this)); ?> + +
+ items)) + { + ?> + + + + + + items[0]->state)) + { + ?> + + + + + + + + + + + + + + + + + + + items as $i => $item) + { + $ordering = ($listOrder == 'a.id'); + $canCreate = $this->user->authorise('core.create', 'com_tjnotifications'); + $canEdit = $this->user->authorise('core.edit', 'com_tjnotifications'); + $canCheckin = $this->user->authorise('core.manage', 'com_tjnotifications'); + $canChange = $this->user->authorise('core.edit.state', 'com_tjnotifications'); + ?> + + + + + items[0]->state)) + { + ?> + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ id); ?> + + state, $i, 'subscriptions.', $canChange, 'cb'); ?> + + checked_out) && $item->checked_out && ($canEdit || $canChange)) + { + echo HTMLHelper::_('jgrid.checkedout', $i, $item->uEditor, $item->checked_out_time, 'subscriptions.', $canCheckin); + } + + if ($canEdit) + { + ?> + + user_id)->name; ?> + + +
+ + + escape($item->title); ?> + + + user_id)->name; + ?> + +
+ + + escape($item->title); ?> + + + +
backend; ?>address; ?> + device_id; ?> + + platform)) + { + ?> +
+ + platform; ?> + + +
+ is_confirmed) ? Text::_('JYES') : Text::_('JNO'); ?> + id; ?>
+ pagination->getListFooter(); ?> +
+ +
+ +
+ + + + + + +
+ From 1d5c3e2193090397b83644881a6cba28332404ad Mon Sep 17 00:00:00 2001 From: ankush_m Date: Tue, 21 Jun 2022 17:37:54 +0530 Subject: [PATCH 2/4] Bug #184788 fix: BE> Subscription form> Unable to save the Subscription form joomla 3.10 --- .../admin/views/subscription/tmpl/edit_bs2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com_tjnotifications/admin/views/subscription/tmpl/edit_bs2.php b/src/com_tjnotifications/admin/views/subscription/tmpl/edit_bs2.php index 0c5ba5aa..4251e219 100644 --- a/src/com_tjnotifications/admin/views/subscription/tmpl/edit_bs2.php +++ b/src/com_tjnotifications/admin/views/subscription/tmpl/edit_bs2.php @@ -29,7 +29,7 @@ Joomla.submitform(task, document.getElementById('subscription-form')); } else { - if (task != 'subscription.cancel' && document.formvalidator.isValid(document.id('subscription-form'))) { + if (task != 'subscription.cancel' && document.formvalidator.isValid(document.getElementById('subscription-form'))) { Joomla.submitform(task, document.getElementById('subscription-form')); } else { From c17c813a1f8d0cc861211a8e30facda5207f5373 Mon Sep 17 00:00:00 2001 From: ankush_m Date: Thu, 4 Aug 2022 12:45:31 +0530 Subject: [PATCH 3/4] Task #181258 feat: Joomla 4 compatability --- src/com_tjnotifications/admin/sql/updates/mysql/1.0.6.sql | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/com_tjnotifications/admin/sql/updates/mysql/1.0.6.sql b/src/com_tjnotifications/admin/sql/updates/mysql/1.0.6.sql index 40092139..e69de29b 100644 --- a/src/com_tjnotifications/admin/sql/updates/mysql/1.0.6.sql +++ b/src/com_tjnotifications/admin/sql/updates/mysql/1.0.6.sql @@ -1,4 +0,0 @@ -----Change table Key; - -ALTER TABLE `#__tj_notification_user_exclusions` DROP INDEX `client1`; -ALTER TABLE `#__tj_notification_user_exclusions` ADD INDEX `client1` (`client`(100), `provider`(50), `key`(100)); From 0d61de33ecd3e48a52f1eacb1886b5f47ee4bdab Mon Sep 17 00:00:00 2001 From: ankush_m Date: Thu, 4 Aug 2022 12:48:43 +0530 Subject: [PATCH 4/4] Task #181258 feat: Joomla 4 compatability --- src/com_tjnotifications/tjnotifications.xml | 4 ++-- src/plugins/actionlog/tjnotification/tjnotification.xml | 4 ++-- src/plugins/api/tjnotifications/tjnotifications.xml | 4 ++-- src/plugins/privacy/tjnotification/tjnotification.xml | 4 ++-- .../tjnotificationsmobilenumber.xml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/com_tjnotifications/tjnotifications.xml b/src/com_tjnotifications/tjnotifications.xml index a0dab188..7a952f51 100644 --- a/src/com_tjnotifications/tjnotifications.xml +++ b/src/com_tjnotifications/tjnotifications.xml @@ -6,8 +6,8 @@ https://techjoomla.com Copyright (C) 2016 - 2022 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 7th Feb 2022 - 3.0.1 + 4th Aug 2022 + 3.0.2 sql/install.mysql.utf8.sql diff --git a/src/plugins/actionlog/tjnotification/tjnotification.xml b/src/plugins/actionlog/tjnotification/tjnotification.xml index d03e8cc2..ab051cd4 100644 --- a/src/plugins/actionlog/tjnotification/tjnotification.xml +++ b/src/plugins/actionlog/tjnotification/tjnotification.xml @@ -2,12 +2,12 @@ plg_actionlog_tjnotification Techjoomla - 7th Feb 2022 + 4th Aug 2022 Copyright (C) 2016 - 2022 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL extensions@techjoomla.com https://techjoomla.com - 3.0.1 + 3.0.2 PLG_ACTIONLOG_TJNOTIFICATION_XML_DESCRIPTION tjnotification.php diff --git a/src/plugins/api/tjnotifications/tjnotifications.xml b/src/plugins/api/tjnotifications/tjnotifications.xml index c11d0ac9..9bcfd936 100644 --- a/src/plugins/api/tjnotifications/tjnotifications.xml +++ b/src/plugins/api/tjnotifications/tjnotifications.xml @@ -5,10 +5,10 @@ Techjoomla extensions@techjoomla.com https://techjoomla.com - 7th Feb 2022 + 4th Aug 2022 Copyright (C) 2016 - 2022 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 3.0.1 + 3.0.2 tjnotifications.php diff --git a/src/plugins/privacy/tjnotification/tjnotification.xml b/src/plugins/privacy/tjnotification/tjnotification.xml index 101cf7e9..20efc12d 100644 --- a/src/plugins/privacy/tjnotification/tjnotification.xml +++ b/src/plugins/privacy/tjnotification/tjnotification.xml @@ -1,8 +1,8 @@ plg_privacy_tjnotification - 3.0.1 - 7th Feb 2022 + 3.0.2 + 4th Aug 2022 Techjoomla extensions@techjoomla.com https://techjoomla.com diff --git a/src/plugins/user/tjnotificationsmobilenumber/tjnotificationsmobilenumber.xml b/src/plugins/user/tjnotificationsmobilenumber/tjnotificationsmobilenumber.xml index 84698663..67ecc704 100644 --- a/src/plugins/user/tjnotificationsmobilenumber/tjnotificationsmobilenumber.xml +++ b/src/plugins/user/tjnotificationsmobilenumber/tjnotificationsmobilenumber.xml @@ -5,10 +5,10 @@ Techjoomla extensions@techjoomla.com https://techjoomla.com - 7th Feb 2022 + 4th Aug 2022 Copyright (C) 2016 - 2022 Techjoomla. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 3.0.1 + 3.0.2 tjnotificationsmobilenumber.php