Fix returning to the edit-list from edit-item

This commit is contained in:
Kevin MacMartin 2018-01-12 00:02:16 -05:00
parent 22da70893a
commit 34183cb338
2 changed files with 2 additions and 2 deletions

View file

@ -433,7 +433,7 @@ function editItemInit() {
// initialize back button
$backButton.on("click", function() {
if (!submitting) {
askConfirmation("Cancel and return to the " + model + " list?", function() {
askConfirmation("Cancel and return to the " + path + " list?", function() {
window.location.href = "/dashboard/" + path;
});
}

View file

@ -13,7 +13,7 @@
</div>
@endif
<form id="edit-item" class="edit-item" data-id="{{ $id }}" data-model="{{ $model }}">
<form id="edit-item" class="edit-item" data-id="{{ $id }}" data-model="{{ $model }}" data-path="{{ isset($path) ? $path : $model }}">
<input type="hidden" name="_token" id="_token" value="{{ csrf_token() }}" />
<div class="container-fluid">