From 7282a6b589f3ace14a4fbebe1ce47fe5ade0f35b Mon Sep 17 00:00:00 2001 From: Matt Young Date: Wed, 29 May 2024 21:49:09 -0500 Subject: [PATCH] Move form components out of auth directory --- app/Models/User.php | 6 ++--- .../views/auth/forgot-password.blade.php | 4 ++-- resources/views/auth/login.blade.php | 6 ++--- resources/views/auth/register.blade.php | 16 ++++++------- resources/views/auth/reset-password.blade.php | 8 +++---- resources/views/auth/verify-email.blade.php | 4 ++-- .../button-nocolor.blade.php} | 0 .../button.blade.php} | 0 .../card.blade.php} | 4 ++-- .../field.blade.php} | 1 + .../views/components/layout/app.blade.php | 9 ++++--- .../views/components/layout/navbar.blade.php | 1 + .../components/layout/page-header.blade.php | 5 ++++ resources/views/dashboard/profile.blade.php | 24 +++++++++---------- resources/views/schools/create.blade.php | 14 +++++------ resources/views/schools/edit.blade.php | 14 +++++------ resources/views/students/index.blade.php | 8 +++---- resources/views/welcome.blade.php | 4 ++-- 18 files changed, 67 insertions(+), 61 deletions(-) rename resources/views/components/{auth/form-button-nocolor.blade.php => form/button-nocolor.blade.php} (100%) rename resources/views/components/{auth/form-button.blade.php => form/button.blade.php} (100%) rename resources/views/components/{auth/form-card.blade.php => form/card.blade.php} (83%) rename resources/views/components/{auth/form-field.blade.php => form/field.blade.php} (94%) create mode 100644 resources/views/components/layout/page-header.blade.php diff --git a/app/Models/User.php b/app/Models/User.php index d956843..1a078f7 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -74,13 +74,13 @@ class User extends Authenticatable implements MustVerifyEmail { return $this ->hasManyThrough(Student::class, School::class, 'id','school_id','school_id','id') - ->orderBy('last_name','asc') - ->orderBy('first_name','asc'); + ->orderBy('last_name') + ->orderBy('first_name'); } /** - * Return an array of schools using the users email domiain + * Return an array of schools using the users email domain * @return SchoolEmailDomain[] */ public function possibleSchools() diff --git a/resources/views/auth/forgot-password.blade.php b/resources/views/auth/forgot-password.blade.php index 810c2a9..6fbcbde 100644 --- a/resources/views/auth/forgot-password.blade.php +++ b/resources/views/auth/forgot-password.blade.php @@ -11,8 +11,8 @@
@csrf - - Send Password Reset + + Send Password Reset diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index f2c32a0..fd52197 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -4,10 +4,10 @@
@csrf - - + + - Log In + Log In diff --git a/resources/views/components/auth/form-button-nocolor.blade.php b/resources/views/components/form/button-nocolor.blade.php similarity index 100% rename from resources/views/components/auth/form-button-nocolor.blade.php rename to resources/views/components/form/button-nocolor.blade.php diff --git a/resources/views/components/auth/form-button.blade.php b/resources/views/components/form/button.blade.php similarity index 100% rename from resources/views/components/auth/form-button.blade.php rename to resources/views/components/form/button.blade.php diff --git a/resources/views/components/auth/form-card.blade.php b/resources/views/components/form/card.blade.php similarity index 83% rename from resources/views/components/auth/form-card.blade.php rename to resources/views/components/form/card.blade.php index 8fd8c8a..fd70b79 100644 --- a/resources/views/components/auth/form-card.blade.php +++ b/resources/views/components/form/card.blade.php @@ -21,8 +21,8 @@ {{ $buttons }} @else - Cancel - {{ $submitButtonText }} + Cancel + {{ $submitButtonText }} @endif {{ $buttons }} diff --git a/resources/views/components/auth/form-field.blade.php b/resources/views/components/form/field.blade.php similarity index 94% rename from resources/views/components/auth/form-field.blade.php rename to resources/views/components/form/field.blade.php index 8f27c42..bb3c353 100644 --- a/resources/views/components/auth/form-field.blade.php +++ b/resources/views/components/form/field.blade.php @@ -18,6 +18,7 @@
+ merge($inputAttributes)}}>
@error($name) diff --git a/resources/views/components/layout/app.blade.php b/resources/views/components/layout/app.blade.php index bdc2f08..757a4a0 100644 --- a/resources/views/components/layout/app.blade.php +++ b/resources/views/components/layout/app.blade.php @@ -15,11 +15,10 @@
-
-
-

{{ $page_title }}

-
-
+ @if($page_title) + {{ $page_title }} + @endif +
{{ $slot }} diff --git a/resources/views/components/layout/navbar.blade.php b/resources/views/components/layout/navbar.blade.php index c4cd8ca..9950f17 100644 --- a/resources/views/components/layout/navbar.blade.php +++ b/resources/views/components/layout/navbar.blade.php @@ -1,4 +1,5 @@ @php use Illuminate\Support\Facades\Auth; @endphp +{{--TODO Clean up mobile menu area--}}
@endif - - - - - + + + + +
diff --git a/resources/views/schools/create.blade.php b/resources/views/schools/create.blade.php index d38cf31..361e593 100644 --- a/resources/views/schools/create.blade.php +++ b/resources/views/schools/create.blade.php @@ -6,18 +6,18 @@ section_description="" :first="true"> - - - - - - - + + + + + +
diff --git a/resources/views/schools/edit.blade.php b/resources/views/schools/edit.blade.php index 397f56f..abad79d 100644 --- a/resources/views/schools/edit.blade.php +++ b/resources/views/schools/edit.blade.php @@ -6,17 +6,17 @@ section_description="" :first="true"> - - - - - - - + + + + + +
diff --git a/resources/views/students/index.blade.php b/resources/views/students/index.blade.php index 12d1ddb..7c81437 100644 --- a/resources/views/students/index.blade.php +++ b/resources/views/students/index.blade.php @@ -9,9 +9,9 @@ Create Student Student full names must be unique. Add a middle initial to the first name if necessary. - - - - + + + + diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 0c8be39..543a516 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -5,8 +5,8 @@
- Login - Create Account + Login + Create Account