diff --git a/resources/views/admin/users/edit.blade.php b/resources/views/admin/users/edit.blade.php index 180739726b..741a449382 100644 --- a/resources/views/admin/users/edit.blade.php +++ b/resources/views/admin/users/edit.blade.php @@ -263,6 +263,7 @@ username: null, firstname: null, lastname: null, + title: null, email: null, password: null, status: null, @@ -444,6 +445,7 @@ username: null, firstname: null, lastname: null, + title: null, email: null, password: null, status: null diff --git a/resources/views/profile/edit.blade.php b/resources/views/profile/edit.blade.php index 6154ab5dc5..a9f56fee55 100644 --- a/resources/views/profile/edit.blade.php +++ b/resources/views/profile/edit.blade.php @@ -168,6 +168,7 @@ username: null, firstname: null, lastname: null, + title: null, email: null, password: null, status: null @@ -240,6 +241,7 @@ username: null, firstname: null, lastname: null, + title: null, email: null, password: null, status: null diff --git a/resources/views/shared/users/profile.blade.php b/resources/views/shared/users/profile.blade.php index ab98ec366a..2e5e7f1a81 100644 --- a/resources/views/shared/users/profile.blade.php +++ b/resources/views/shared/users/profile.blade.php @@ -27,10 +27,14 @@ id="title" class="mb-2" v-model="formData.title" + :state="errors.title ? false : null" type="text" required placeholder="Job Title" > +
{{__('Contact Information')}}
diff --git a/tests/Feature/Admin/UserTest.php b/tests/Feature/Admin/UserTest.php index 6dd0f18530..f738e464ea 100644 --- a/tests/Feature/Admin/UserTest.php +++ b/tests/Feature/Admin/UserTest.php @@ -76,4 +76,18 @@ public function testCannotSeeAditionalInformationInProfileRoute() $response->assertViewIs('profile.edit'); $response->assertDontSee('Additional Information'); } + + public function testJobTitleValidationFeedbackIsRenderedInUserEditForms(): void + { + $userId = User::factory()->create()->id; + + foreach (["/admin/users/{$userId}/edit", '/profile/edit'] as $url) { + $response = $this->webCall('GET', $url); + + $response->assertStatus(200); + $response->assertSee(':state="errors.title ? false : null"', false); + $response->assertSee('v-if="errors.title"', false); + $response->assertSee('{{errors.title[0]}}', false); + } + } }