Skip to content

Commit

Permalink
Merge pull request #141 from techjoomla/release-3.0.2
Browse files Browse the repository at this point in the history
Release 3.0.2
  • Loading branch information
ankush-maherwal authored Aug 4, 2022
2 parents b11c8b0 + c3cbcf3 commit bd4934f
Show file tree
Hide file tree
Showing 13 changed files with 614 additions and 275 deletions.
4 changes: 0 additions & 4 deletions src/com_tjnotifications/admin/sql/updates/mysql/1.0.6.sql
Original file line number Diff line number Diff line change
@@ -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));
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
{
?>
<div class="clearfix">&nbsp;</div>
<div class="alert alert-no-items">
<div class="alert alert-info">
<?php echo Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_NO_MATCHING_RESULTS"); ?>
</div>
<?php
Expand Down
68 changes: 8 additions & 60 deletions src/com_tjnotifications/admin/views/subscription/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,63 +10,11 @@
// No direct access
defined('_JEXEC') or die('Restricted access');

use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;

HTMLHelper::_('behavior.keepalive');
HTMLHelper::_('behavior.formvalidator');
HTMLHelper::_('formbehavior.chosen', 'select');
HTMLHelper::_('bootstrap.tooltip');

$doc = Factory::getDocument();

$script = "
Joomla.submitbutton = function (task) {
if (task == 'subscription.cancel') {
Joomla.submitform(task, document.getElementById('subscription-form'));
}
else {
if (task != 'subscription.cancel' && document.formvalidator.isValid(document.id('subscription-form'))) {
Joomla.submitform(task, document.getElementById('subscription-form'));
}
else {
alert(Joomla.Text._('JGLOBAL_VALIDATION_FORM_FAILED'));
}
}
}
";

$doc->addScriptDeclaration($script);

Text::script('JGLOBAL_VALIDATION_FORM_FAILED');
?>

<div class="subscription-edit row-fluid">
<form
action="<?php echo Route::_('index.php?option=com_tjnotifications&layout=edit&id=' . (int) $this->item->id) . '&extension=' . $this->extension; ?>"
method="post" enctype="multipart/form-data" name="adminForm" id="subscription-form" class="form-validate form-horizontal">

<div class="row-fluid">
<?php echo $this->form->renderField('title'); ?>
<?php echo $this->form->renderField('user_id'); ?>
<?php echo $this->form->renderField('backend'); ?>
<?php echo $this->form->renderField('address'); ?>
<?php echo $this->form->renderField('device_id'); ?>
<?php echo $this->form->renderField('platform'); ?>
<?php echo $this->form->renderField('state'); ?>
<?php echo $this->form->renderField('is_confirmed'); ?>
</div>

<input type="hidden" name="extension" value="<?php echo $this->extension; ?>"/>
<input type="hidden" name="jform[id]" value="<?php echo $this->item->id; ?>" />
<input type="hidden" name="jform[state]" value="<?php echo $this->item->state; ?>" />
<input type="hidden" name="jform[checked_out]" value="<?php echo $this->item->checked_out; ?>" />
<input type="hidden" name="jform[checked_out_time]" value="<?php echo $this->item->checked_out_time; ?>" />
<input type="hidden" name="task" value=""/>

<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div>
if (JVERSION < '4.0.0')
{
echo $this->loadTemplate('bs2');
}
else
{
echo $this->loadTemplate('bs5');
}
72 changes: 72 additions & 0 deletions src/com_tjnotifications/admin/views/subscription/tmpl/edit_bs2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?php
/**
* @package Tjnotifications
* @subpackage com_tjnotifications
*
* @copyright Copyright (C) 2009 - 2020 Techjoomla. All rights reserved.
* @license http:/www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

// No direct access
defined('_JEXEC') or die('Restricted access');

use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;

HTMLHelper::_('behavior.keepalive');
HTMLHelper::_('behavior.formvalidator');
HTMLHelper::_('formbehavior.chosen', 'select');
HTMLHelper::_('bootstrap.tooltip');

$doc = Factory::getDocument();

$script = "
Joomla.submitbutton = function (task) {
if (task == 'subscription.cancel') {
Joomla.submitform(task, document.getElementById('subscription-form'));
}
else {
if (task != 'subscription.cancel' && document.formvalidator.isValid(document.getElementById('subscription-form'))) {
Joomla.submitform(task, document.getElementById('subscription-form'));
}
else {
alert(Joomla.Text._('JGLOBAL_VALIDATION_FORM_FAILED'));
}
}
}
";

$doc->addScriptDeclaration($script);

Text::script('JGLOBAL_VALIDATION_FORM_FAILED');
?>

<div class="subscription-edit row-fluid">
<form
action="<?php echo Route::_('index.php?option=com_tjnotifications&layout=edit&id=' . (int) $this->item->id) . '&extension=' . $this->extension; ?>"
method="post" enctype="multipart/form-data" name="adminForm" id="subscription-form" class="form-validate form-horizontal">

<div class="row-fluid">
<?php echo $this->form->renderField('title'); ?>
<?php echo $this->form->renderField('user_id'); ?>
<?php echo $this->form->renderField('backend'); ?>
<?php echo $this->form->renderField('address'); ?>
<?php echo $this->form->renderField('device_id'); ?>
<?php echo $this->form->renderField('platform'); ?>
<?php echo $this->form->renderField('state'); ?>
<?php echo $this->form->renderField('is_confirmed'); ?>
</div>

<input type="hidden" name="extension" value="<?php echo $this->extension; ?>"/>
<input type="hidden" name="jform[id]" value="<?php echo $this->item->id; ?>" />
<input type="hidden" name="jform[state]" value="<?php echo $this->item->state; ?>" />
<input type="hidden" name="jform[checked_out]" value="<?php echo $this->item->checked_out; ?>" />
<input type="hidden" name="jform[checked_out_time]" value="<?php echo $this->item->checked_out_time; ?>" />
<input type="hidden" name="task" value=""/>

<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div>
71 changes: 71 additions & 0 deletions src/com_tjnotifications/admin/views/subscription/tmpl/edit_bs5.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php
/**
* @package Tjnotifications
* @subpackage com_tjnotifications
*
* @copyright Copyright (C) 2009 - 2020 Techjoomla. All rights reserved.
* @license http:/www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

// No direct access
defined('_JEXEC') or die('Restricted access');

use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;

HTMLHelper::_('behavior.keepalive');
HTMLHelper::_('behavior.formvalidator');
HTMLHelper::_('bootstrap.tooltip');

$doc = Factory::getDocument();

$script = "
Joomla.submitbutton = function (task) {
if (task == 'subscription.cancel') {
Joomla.submitform(task, document.getElementById('subscription-form'));
}
else {
if (task != 'subscription.cancel' && document.formvalidator.isValid(document.getElementById('subscription-form'))) {
Joomla.submitform(task, document.getElementById('subscription-form'));
}
else {
alert(Joomla.Text._('JGLOBAL_VALIDATION_FORM_FAILED'));
}
}
}
";

$doc->addScriptDeclaration($script);

Text::script('JGLOBAL_VALIDATION_FORM_FAILED');
?>

<div class="subscription-edit row-fluid tjBs5">
<form
action="<?php echo Route::_('index.php?option=com_tjnotifications&layout=edit&id=' . (int) $this->item->id) . '&extension=' . $this->extension; ?>"
method="post" enctype="multipart/form-data" name="adminForm" id="subscription-form" class="form-validate form-horizontal">

<div class="row-fluid">
<?php echo $this->form->renderField('title'); ?>
<?php echo $this->form->renderField('user_id'); ?>
<?php echo $this->form->renderField('backend'); ?>
<?php echo $this->form->renderField('address'); ?>
<?php echo $this->form->renderField('device_id'); ?>
<?php echo $this->form->renderField('platform'); ?>
<?php echo $this->form->renderField('state'); ?>
<?php echo $this->form->renderField('is_confirmed'); ?>
</div>

<input type="hidden" name="extension" value="<?php echo $this->extension; ?>"/>
<input type="hidden" name="jform[id]" value="<?php echo $this->item->id; ?>" />
<input type="hidden" name="jform[state]" value="<?php echo $this->item->state; ?>" />
<input type="hidden" name="jform[checked_out]" value="<?php echo $this->item->checked_out; ?>" />
<input type="hidden" name="jform[checked_out_time]" value="<?php echo $this->item->checked_out_time; ?>" />
<input type="hidden" name="task" value=""/>

<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div>
Loading

0 comments on commit bd4934f

Please sign in to comment.