File tree Expand file tree Collapse file tree 5 files changed +24
-12
lines changed
vendor/blade-ui-kit/components/forms Expand file tree Collapse file tree 5 files changed +24
-12
lines changed Original file line number Diff line number Diff line change 1313
1414 @if (Auth:: user ()-> hasPassword () )
1515 <div class =" col-span-12" >
16- <x-label for =" current_password" >Current Password</ x-label >
16+ <x-label for =" current_password" / >
1717 <x-input type =" password" name =" current_password" required />
1818 </div >
1919 @endif
Original file line number Diff line number Diff line change 1313 <div class =" flex flex-col space-y-6 lg:flex-row lg:space-y-0 lg:space-x-6" >
1414 <div class =" flex-grow space-y-6" >
1515 <div class =" space-y-1" >
16- <x-label for =" name" >Name</ x-label >
16+ <x-label for =" name" / >
1717 <x-input name =" name" value =" {{ Auth:: user ()-> name () } }" required />
1818 </div >
1919
2020 <div class =" space-y-1" >
21- <x-label for =" bio" >Bio</ x-label >
21+ <x-label for =" bio" / >
2222 <x-textarea name =" bio" rows =" 3" maxlength =" 160" >
2323 {{ Auth:: user ()-> bio () } }
2424 </x-textarea >
3939 </div >
4040
4141 <div class =" grid grid-cols-12 gap-6" >
42- <div class =" col-span-12 sm:col-span-6 " >
43- <x-label for =" email" >Email</ x-label >
42+ <div class =" col-span-12" >
43+ <x-label for =" email" / >
4444 <x-input type =" email" name =" email" value =" {{ Auth:: user ()-> emailAddress () } }" required />
4545 @unless (Auth:: user ()-> hasVerifiedEmail () )
4646 <span class =" mt-2 text-sm text-gray-500" >
5151 </div >
5252
5353 <div class =" col-span-12 sm:col-span-6" >
54- <x-label for =" username" >Username</ x-label >
54+ <x-label for =" username" / >
5555 <x-input name =" username" value =" {{ Auth:: user ()-> username () } }" required />
5656 </div >
5757
58+ <div class =" col-span-12 sm:col-span-6" >
59+ <x-label for =" twitter" >Twitter handle</x-label >
60+ <x-input name =" twitter" value =" {{ Auth:: user ()-> twitter () } }" prefix-icon =" heroicon-o-at-symbol" />
61+ <span class =" mt-2 text-sm text-gray-500" >
62+ Enter your Twitter handle without the leading @ symbol
63+ </span >
64+ </div >
5865 </div >
5966
6067 </div >
Original file line number Diff line number Diff line change 11<div >
22 <div class =" relative" >
3+ @if ($attributes -> get (' prefix-icon' ) )
4+ <div class =" absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" >
5+ @svg ($attributes -> get (' prefix-icon' ), [' class' => ' h-5 w-5 text-gray-400' ] )
6+ </div >
7+ @endif
38 <input
49 name =" {{ $name } }"
510 type =" {{ $type } }"
611 id =" {{ $id } }"
712 @if ($value )value =" {{ $value } }" @endif
813 {{ $attributes -> merge ([
9- ' class' => ' form-input block w-full sm:text-sm sm:leading-5 mt-1' . ($errors -> has ($name ) ? ' border-red-300 text-red-900 placeholder-red-300 focus:outline-none focus:ring-red-500 focus:border-red-500' : ' ' )
14+ ' class' => ' form-input block w-full sm:text-sm sm:leading-5 mt-1' . ($attributes -> get ( ' prefix-icon ' ) ? ' pl-10 ' : ' ' ) . ( $ errors-> has ($name ) ? ' border-red-300 text-red-900 placeholder-red-300 focus:outline-none focus:ring-red-500 focus:border-red-500' : ' ' )
1015 ]) } }"
1116 />
12- @if ($errors -> has ($name ) )
17+ @if ($errors -> has ($name ) )
1318 <div class=" absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none " >
1419 <x-heroicon-o-exclamation-circle class=" h-5 w-5 text-red-500 " />
1520 </div>
1621 @endif
1722 </div>
18- @if ($errors -> has ($name ) )
23+ @if ($errors -> has ($name ) )
1924 @foreach ($errors -> get ($name ) as $error )
2025 <p class=" mt-2 text-sm text-red-600 " >{{ $error } } </p>
2126 @endforeach
Original file line number Diff line number Diff line change 11<label for =" {{ $for } }" {{ $attributes -> merge ([' class' => ' block text-sm font-medium leading-5 text-gray-700' ]) } } >
2- {{ $fallback } }
2+ {{ $slot -> isNotEmpty () ? $slot : $ fallback } }
33</label >
Original file line number Diff line number Diff line change 33namespace Tests \Feature ;
44
55use App \User ;
6- use Illuminate \Foundation \Testing \DatabaseMigrations ;
76use Illuminate \Support \Facades \Auth ;
7+ use Illuminate \Foundation \Testing \DatabaseMigrations ;
88
99class SettingsTest extends BrowserKitTestCase
1010{
@@ -120,7 +120,7 @@ public function twitter_is_optional()
120120 $ this ->loginAs ($ user );
121121
122122 $ this ->visit ('/settings ' )
123- ->submitForm ('Save ' , [
123+ ->submitForm ('Update Profile ' , [
124124 'name ' => 'Freek Murze ' ,
125125 'email ' => 'freek@example.com ' ,
126126 'username ' => 'freekmurze ' ,
You can’t perform that action at this time.
0 commit comments