Skip to content

Commit 9580da8

Browse files
committed
Redirect back to link list after deleting single link (#852)
1 parent e1a3375 commit 9580da8

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

lang/en_US/link.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
'added_connection_error' => 'The Link was added but a connection error occurred when trying to access the URL. Details can be found in the logs.',
6060
'added_request_error' => 'The Link was added but an error occurred when trying to request the URL, for example an invalid certificate. Details can be found in the logs.',
6161
'updated_successfully' => 'Link updated successfully.',
62-
'deleted_successfully' => 'Link deleted successfully.',
62+
'deleted_successfully' => 'Link successfully moved to the trash.',
6363
'deletion_error' => 'Link could not be deleted.',
6464

6565
'duplicates_found' => 'LinkAce found possible duplicates of the submitted URL:',

resources/views/models/links/partials/single-card.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class="btn btn-xs btn-link text-condensed">
6666
action="{{ route('links.destroy', [$link->id]) }}">
6767
@method('DELETE')
6868
@csrf
69-
<input type="hidden" name="link_id" value="{{ $link->id }}">
69+
<input type="hidden" name="redirect_back" value="true">
7070
</form>
7171
</div>
7272
@if($shareLinks !== '')

resources/views/models/links/partials/single-detailed.blade.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,10 @@ class="btn btn-xs btn-link text-condensed">
6666
</div>
6767
</div>
6868
@endif
69-
7069
<form id="link-delete-{{ $link->id }}" method="POST" style="display: none;"
7170
action="{{ route('links.destroy', [$link->id]) }}">
7271
@method('DELETE')
7372
@csrf
74-
<input type="hidden" name="link_id" value="{{ $link->id }}">
73+
<input type="hidden" name="redirect_back" value="true">
7574
</form>
7675
</div>

resources/views/models/lists/partials/single.blade.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
action="{{ route('lists.destroy', ['list' => $list]) }}">
3636
@method('DELETE')
3737
@csrf
38-
<input type="hidden" name="redirect_back" value="1">
39-
<input type="hidden" name="list_id" value="{{ $list->id }}">
38+
<input type="hidden" name="redirect_back" value="true">
4039
</form>
4140
</div>
4241
</div>

resources/views/models/tags/partials/single.blade.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ class="btn btn-xs btn-link text-condensed">
2424
</div>
2525

2626
<form id="tag-delete-{{ $tag->id }}" method="POST" style="display: none;"
27-
action="{{ route('tags.destroy', [$tag]) }}">
27+
action="{{ route('tags.destroy', ['tag' => $tag]) }}">
2828
@method('DELETE')
2929
@csrf
3030
<input type="hidden" name="redirect_back" value="1">
31-
<input type="hidden" name="tag_id" value="{{ $tag->id }}">
3231
</form>
3332
</td>
3433
</tr>

0 commit comments

Comments
 (0)