-
Notifications
You must be signed in to change notification settings - Fork 81
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
Canceling adding/editing a location does not work #719
Comments
So half of this bug is fixed (canceling editing a location), but the remaining half (canceling adding a location) isn't. The problem is that we can add a location from practically anywhere in the project due to the big "Add location" button in the project header. The decision now is: when the user cancels adding a location, do we (1) put the user back to page where they clicked the "Add location" button by storing the HTTP referrer somehow, or (2) put the user to the project dashboard page, ignoring the HTTP referrer? |
I think the HTTP referrer would be helpful so that the user isn't losing their context. |
OK. If there are no objections, I'll try to see if I can somehow store the HTTP referrer when the page is first rendered so that if adding the location encounters errors, we still maintain that HTTP referrer as the URL for the "Cancel" link all throughout. |
Status: I currently have working code for this in a branch (bugfix/#719), but it currently has a workaround for a limitation in django-skivvy, which I've already filed as an issue. |
Steps to reproduce the error
Adding a location:
Editing a location:
Actual behavior
The cancel button brings you to the same add/edit page.
Expected behavior
When editing, cancel should bring you to the location detail page. When adding, cancel should bring you to where you were when you brought up the add location feature, or to the project dashboard.
Cause
This is caused by setting the HTTP referrer to the cancel button. When you get an error, the HTTP referrer is the add/edit location page.
The text was updated successfully, but these errors were encountered: