]> BookStack Code Mirror - bookstack/commitdiff
Fixed back button behaviour on books edit
authorDan Brown <redacted>
Sun, 19 Mar 2017 08:32:04 +0000 (08:32 +0000)
committerDan Brown <redacted>
Sun, 19 Mar 2017 08:32:04 +0000 (08:32 +0000)
As reported in #339

resources/views/books/form.blade.php

index 514abf42cab9413e1c0011898dbf5f079cebfe51..b1484d1296f3cf84ef6f2e59bf11d6af8a5c3c2d 100644 (file)
@@ -11,6 +11,6 @@
 </div>
 
 <div class="form-group">
-    <a href="{{ back()->getTargetUrl() }}" class="button muted">{{ trans('common.cancel') }}</a>
+    <a href="{{ isset($book) ? $book->getUrl() : baseUrl('/books') }}" class="button muted">{{ trans('common.cancel') }}</a>
     <button type="submit" class="button pos">{{ trans('entities.books_save') }}</button>
 </div>
\ No newline at end of file