Skip to content

Commit

Permalink
Add action to Cancel buttons
Browse files Browse the repository at this point in the history
Let Cancel button in Create view restore to index view and in Edit view
to show view.
  • Loading branch information
sacren committed Dec 13, 2024
1 parent 97569a8 commit 5185a91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion resources/views/jobs/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ class="block w-full rounded-md shadow-sm ring-1 ring-gray-300 focus:ring-indigo-
<button
type="button"
class="rounded-md bg-red-500 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2">
Cancel
<a href="{{ route('jobs.index') }}">
Cancel
</a>
</button>
<button
type="submit"
Expand Down
4 changes: 3 additions & 1 deletion resources/views/jobs/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class="block w-full rounded-md shadow-sm ring-1 ring-gray-300 focus:ring-indigo-
<button
type="button"
class="rounded-md bg-gray-500 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2">
Cancel
<a href="{{ route('jobs.show', $job->id) }}">
Cancel
</a>
</button>
<button
type="submit"
Expand Down

0 comments on commit 5185a91

Please sign in to comment.