Skip to content

Commit

Permalink
Fix list and tag loading for bulk editing links
Browse files Browse the repository at this point in the history
  • Loading branch information
Kovah committed Sep 30, 2024
1 parent 037fdc0 commit a98c215
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/Http/Controllers/Models/BulkEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public function form(BulkEditFormRequest $request)
return view($view, [
'models' => $models,
'modelCount' => count($models),
'all_tags' => Tag::visibleForUser()->with('user:id,name')->get(['name', 'id', 'user_id']),
'all_lists' => LinkList::visibleForUser()->with('user:id,name')->get(['name', 'id', 'user_id']),
]);
}

Expand Down
4 changes: 2 additions & 2 deletions resources/views/models/links/bulk-edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div>
<label class="form-label" for="tags">@lang('tag.update_tags')</label>
<input name="tags" id="tags" type="text" placeholder="@lang('placeholder.tags_select')"
class="tag-select"
class="tag-select" data-tag-data="{{ $all_tags->toJson() }}"
data-value="{{ Link::oldTaxonomyOutputWithoutLink('tags', []) }}"
data-allow-creation="1" data-tag-type="tags">
@if ($errors->has('tags'))
Expand All @@ -36,7 +36,7 @@ class="tag-select"
<div>
<label class="form-label" for="lists">@lang('list.update_lists')</label>
<input name="lists" id="lists" type="text" placeholder="@lang('placeholder.list_select')"
class="tag-select"
class="tag-select" data-tag-data="{{ $all_lists->toJson() }}"
data-value="{{ Link::oldTaxonomyOutputWithoutLink('lists', []) }}"
data-allow-creation="1" data-tag-type="lists">
@if ($errors->has('lists'))
Expand Down

0 comments on commit a98c215

Please sign in to comment.