]> BookStack Code Mirror - bookstack/commit
Fix Book form (create) returning to the full books list on cancel 1687/head
authorChristopher Wilkinson <redacted>
Thu, 26 Sep 2019 21:51:24 +0000 (22:51 +0100)
committerChristopher Wilkinson <redacted>
Thu, 26 Sep 2019 21:51:24 +0000 (22:51 +0100)
commit2f94f078e36cf65fa8c7b1d640c030b415714cdc
treeec6dc5d5b4750e5a76fb9e33578ce9fe54e298c6
parent7cd956b24b7a08a8b274d9f244bf6ab482de9635
Fix Book form (create) returning to the full books list on cancel

Fixes #1662
Added a small block of logic to determine the correct URL to attribute to the cancel button on a given page create form.
If adding a book from a bookshelf, return to the bookshelf. If editing a book, return to the book. In all other cases, return to the full books list.
resources/views/books/form.blade.php
tests/Entity/EntityTest.php