Skip to content

Commit b2e192c

Browse files
authored
Fix Vue state usages in blade-bootstrap (#387)
1 parent 6bdff2b commit b2e192c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ui-presets/blade-bootstrap/views/post/confirm-delete.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<div class="card-body">
1717

1818
@if (config('forum.general.soft_deletes'))
19-
<div class="form-check" v-if="selectedPostAction == 'delete'">
19+
<div class="form-check" v-if="state.selectedPostAction == 'delete'">
2020
<input class="form-check-input" type="checkbox" name="permadelete" value="1" id="permadelete">
2121
<label class="form-check-label" for="permadelete">
2222
{{ trans('forum::general.perma_delete') }}

ui-presets/blade-bootstrap/views/thread/show.blade.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@
8383
<hr>
8484

8585
@if ((count($posts) > 1 || $posts->currentPage() > 1) && (Gate::allows('deletePosts', $thread) || Gate::allows('restorePosts', $thread)) && count($selectablePosts) > 0)
86-
<form :action="postActions[selectedPostAction]" method="POST">
86+
<form :action="postActions[state.selectedPostAction]" method="POST">
8787
@csrf
88-
<input type="hidden" name="_method" :value="postActionMethods[selectedPostAction]" />
88+
<input type="hidden" name="_method" :value="postActionMethods[state.selectedPostAction]" />
8989
@endif
9090

9191
<div class="row mb-3">
@@ -114,7 +114,7 @@
114114
<label for="selectAllPosts">
115115
{{ trans('forum::posts.select_all') }}
116116
</label>
117-
<input type="checkbox" value="" id="selectAllPosts" class="align-middle" @click="toggleAll" :checked="selectedPosts.length == posts.data.length">
117+
<input type="checkbox" value="" id="selectAllPosts" class="align-middle" @click="toggleAll" :checked="state.selectedPosts.length == posts.data.length">
118118
</div>
119119
</div>
120120
@endif
@@ -126,7 +126,7 @@
126126
@if ((count($posts) > 1 || $posts->currentPage() > 1) && (Gate::allows('deletePosts', $thread) || Gate::allows('restorePosts', $thread)) && count($selectablePosts) > 0)
127127
<div class="fixed-bottom-right pb-xs-0 pr-xs-0 pb-sm-3 pr-sm-3">
128128
<transition name="fade">
129-
<div class="card text-white bg-secondary shadow-sm" v-if="selectedPosts.length">
129+
<div class="card text-white bg-secondary shadow-sm" v-if="state.selectedPosts.length">
130130
<div class="card-header text-center">
131131
{{ trans('forum::general.with_selection') }}
132132
</div>
@@ -135,14 +135,14 @@
135135
<div class="input-group-prepend">
136136
<label class="input-group-text" for="bulk-actions">{{ trans_choice('forum::general.actions', 1) }}</label>
137137
</div>
138-
<select class="custom-select" id="bulk-actions" v-model="selectedPostAction">
138+
<select class="custom-select" id="bulk-actions" v-model="state.selectedPostAction">
139139
<option value="delete">{{ trans('forum::general.delete') }}</option>
140140
<option value="restore">{{ trans('forum::general.restore') }}</option>
141141
</select>
142142
</div>
143143

144144
@if (config('forum.general.soft_deletes'))
145-
<div class="form-check mb-3" v-if="selectedPostAction == 'delete'">
145+
<div class="form-check mb-3" v-if="state.selectedPostAction == 'delete'">
146146
<input class="form-check-input" type="checkbox" name="permadelete" value="1" id="permadelete">
147147
<label class="form-check-label" for="permadelete">
148148
{{ trans('forum::general.perma_delete') }}

0 commit comments

Comments
 (0)