Skip to content

Commit

Permalink
Merge Release 1.0.4 into Master (#91)
Browse files Browse the repository at this point in the history
* Bug #167400 fix: Redirection on form submit issue for front and backend (#88)

* Bug #167400 fix: Reirection issue for front and backend

* Bug #167400 fix: Update version in xml

* Bug #167400 fix: Redirection on form submit issue for front and backend (#89)

* Bug #167400 fix: Redirection on form submit issue for front and backend

* Bug #167400 fix: Redirection on form submit issue for front and backend

* Bug #167400 fix: Redirection on form submit issue for front and backend (#90)

Co-authored-by: Tushar Shekokar <[email protected]>
Co-authored-by: pranotiTechjoomla <[email protected]>
  • Loading branch information
3 people authored Jan 19, 2021
1 parent 9b4c33c commit 8c513b1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public function save($key = null, $urlVar = null)
$app = Factory::getApplication();
$user = Factory::getUser();
$recordId = $app->input->getInt('id');
$params = ComponentHelper::getParams('com_tjcertificate');
$params = ComponentHelper::getParams('com_tjcertificate');
$task = $this->getTask();

if (!$user->id)
{
Expand Down Expand Up @@ -151,10 +152,22 @@ public function save($key = null, $urlVar = null)
// Save task using to "Save & Close" action which is used only in backend
if ($task === "save")
{
// Redirect to the list screen.
$this->setRedirect(
Route::_('index.php?option=com_tjcertificate&view=certificates', false)
);
$site = $app->input->get('site', 'f', 'string');

if ($site == 'f')
{
// Redirect to the list screen.
$this->setRedirect(
Route::_('index.php?option=com_tjcertificate&view=certificates&layout=my', false)
);
}
else
{
// Redirect to the list screen.
$this->setRedirect(
Route::_('index.php?option=com_tjcertificate&view=certificates', false)
);
}
}

// Flush the data from the session.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ class="p-5"
<input type="hidden" name="jform[id]" id="id" value="<?php echo $this->item->id; ?>" />
<input type="hidden" name="option" value="com_tjcertificate"/>
<input type="hidden" name="task" value="trainingrecord.save"/>
<?php echo HTMLHelper::_( 'form.token'); ?>
<input type="hidden" name="site" value="f"/>
<?php echo HTMLHelper::_('form.token'); ?>
</form>

<script type="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion src/components/com_tjcertificate/tjcertificate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<authorEmail>[email protected]</authorEmail>
<authorUrl>http://techjoomla.com</authorUrl>
<description />
<version>1.0.3</version>
<version>1.0.4</version>
<install>
<!-- Runs on install -->
<sql>
Expand Down

0 comments on commit 8c513b1

Please sign in to comment.