Closed patmbolger closed 7 years ago
Here is an example: this is the initial load of the CP home page:
Here, the user (the company admin in this case) has navigated to the company info table:
Now, the user has clicked "Edit Company info" and then clicked the "Cancel" button in that view .... and the CP home page is reloaded and prior context is lost:
NOTE: We also want to do this kind of story for the agency person home page - will create a separate story when this one is submitted and merged.
There are links on the company person home page that lead to other views that have a "Cancel" button.
The cancel button leads back to the CP home page (typically via
link_to "Cancel", :back, ....
This causes the CP home page to reload. We don't want this, and the CP home page should just be refreshed from cache.
Turbolinks takes care of this automatically if the user clicks the browser back button (https://github.com/turbolinks/turbolinks#restoration-visits).
For this story, we need to remove the "Cancel" button from views accessible from the CP home page (and thus have the user use the browser's back button).
This includes the views accessed via these buttons on the CP home page:
1) Post job 2) Invite Colleague 3) Edit Company info
(BTW - also, we might as well standardize the capitalization on these button titles - that is, capitalize the first letter of each word (e.g. "Post Job" rather than "Post job"))