Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add the return value to the Cancel option #20144
Summary of Changes
This change adds the behavior of being able to use a return URL on the Cancel button. This feature already exists on the Save & Close button and makes sense to me to add it to the other functions as well.
This is not something users will use manually but programmers can use it to make sure users go back to where they came from. It adds consistency to the workflow.
We are going to assume you reached the article via Banners
Repeat step 1 & 2
Repeat step 1 & 2
After Cancel you end up where you started
You end up at the Article listing
Documentation Changes Required
also a little irrelevant but you would not verify it when just passing it, usually we would check it for being "internal" only before final usage ?
@ggppdk Thank you for reviewing the code. You are correct, for Save & Close the change is not needed because the code is already in place there. I have updated the code and test instructions to reflect this.
I am not sure what you are asking here. Are you talking about the isInternal check? That is just taken from how it is used in the Save action.
I meant (for the code that you have now removed) when appending the '&return' variable
$return_url = $this->getInput(...); // No need check return_url is internal, just append it // it will be checked when it is time to be used (redirecting to it) $this->setRedirect($someurl . '&return = ' . $url);
Like you correctly check it in cancel,
I have tested this item
already support using return url for the cancel task
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20144.