Skip to content

Commit 30d22ed

Browse files
Merge pull request #1584 from suraj-webkul/issue#1578
Issue #1578 fixed
2 parents 26f25ce + cd0228c commit 30d22ed

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/Webkul/Admin/src/Resources/views/settings/users/index.blade.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class="cursor-pointer rounded-md p-1.5 text-2xl transition-all hover:bg-gray-200
160160
{!! view_render_event('admin.users.index.datagrid.after') !!}
161161
162162
<x-admin::form
163-
v-slot="{ meta, errors, handleSubmit }"
163+
v-slot="{ meta, values, errors, handleSubmit }"
164164
as="div"
165165
ref="modalForm"
166166
>
@@ -249,7 +249,7 @@ class="cursor-pointer rounded-md p-1.5 text-2xl transition-all hover:bg-gray-200
249249
type="password"
250250
id="password"
251251
name="password"
252-
rules="required|min:6"
252+
::rules="user.id ? '' : 'required|min:6'"
253253
:label="trans('admin::app.settings.users.index.create.password')"
254254
:placeholder="trans('admin::app.settings.users.index.create.password')"
255255
ref="password"
@@ -268,7 +268,7 @@ class="cursor-pointer rounded-md p-1.5 text-2xl transition-all hover:bg-gray-200
268268
type="password"
269269
id="confirm_password"
270270
name="confirm_password"
271-
rules="confirmed:@password"
271+
::rules="values.password ? 'confirmed:@password' : ''"
272272
:label="trans('admin::app.settings.users.index.create.password')"
273273
:placeholder="trans('admin::app.settings.users.index.create.confirm-password')"
274274
/>
@@ -358,6 +358,7 @@ class="cursor-pointer rounded-md p-1.5 text-2xl transition-all hover:bg-gray-200
358358
<select
359359
name="groups[]"
360360
class="flex min-h-[39px] w-full rounded-md border px-3 py-2 text-sm text-gray-600 transition-all hover:border-gray-400 focus:border-gray-400 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300 dark:hover:border-gray-400 dark:focus:border-gray-400"
361+
:class="[errors['groups[]'] ? 'border !border-red-600 hover:border-red-600' : '']"
361362
multiple
362363
v-model="user.groups"
363364
>
@@ -369,6 +370,8 @@ class="flex min-h-[39px] w-full rounded-md border px-3 py-2 text-sm text-gray-60
369370
</option>
370371
</select>
371372
</v-field>
373+
374+
<x-admin::form.control-group.error name="groups[]" />
372375
</x-admin::form.control-group>
373376
374377
{!! view_render_event('admin.settings.users.index.form.role_id.after') !!}

0 commit comments

Comments
 (0)