Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link on error.tpl does not work properly #35

Closed
treborin opened this issue Apr 27, 2021 · 4 comments
Closed

Link on error.tpl does not work properly #35

treborin opened this issue Apr 27, 2021 · 4 comments

Comments

@treborin
Copy link
Contributor

treborin commented Apr 27, 2021

Hi there,

I've found this on error.tpl:
If you are not loged in, and you try to click the link and view any resource on view-schedule.php grid, then that link goes to an error page, telling that you can't access, and the link below tells you (in english): "Return to the last page that you were on". But this link do not works propertly.
I've found this solution:
Substitute this line insde error.tpl:
<h5><a href="//{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}">{translate key='ReturnToPreviousPage'}</a>/h5>
By this:
<h5><a href="#" onclick="goBack()">{translate key='ReturnToPreviousPage'}</a></h5>

And you need to include this JavaScript code outside the div and before the foot, like this:

</div>

<script>
function goBack() {
 window.history.back();
}
</script>

{include file="javascript-includes.tpl"}
{include file='globalfooter.tpl'}

It works ok for me, tested on Firefox, Chrome and Edge browsers.
Hope it helps :)

@effgarces
Copy link
Collaborator

Thanks for the report/solution, I will try to check this as soon as possible.

@blazindrop
Copy link

Why not just submit a PR @treborin since you already have a fix :)

@effgarces
Copy link
Collaborator

Sorry about this one, it slipped between multiple emails/notifications/etc. So thanks for the PR, and the message to alert me that this had slipped my mind.

@treborin
Copy link
Contributor Author

No problem @effgarces . Happy to help :)
Good proposal @blazindrop. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants