parent
							
								
									3242ae9cbe
								
							
						
					
					
						commit
						a9ffd378a0
					
				| @ -0,0 +1,14 @@ | ||||
| <?php | ||||
| 
 | ||||
| 
 | ||||
| namespace App\View; | ||||
| 
 | ||||
| 
 | ||||
| class CheckboxWidget extends Widget | ||||
| { | ||||
|     public function checked($condition=true) | ||||
|     { | ||||
|         $this->value = (bool)$condition; | ||||
|         return $this; | ||||
|     } | ||||
| } | ||||
| @ -1,102 +1,62 @@ | ||||
| @extends('layouts.app') | ||||
| 
 | ||||
| @section('content') | ||||
| <div class="container"> | ||||
|   <div class="container"> | ||||
|     <div class="row justify-content-center"> | ||||
|         <div class="col-md-8"> | ||||
|             <div class="card"> | ||||
|                 <div class="card-header">{{ __('Login') }}</div> | ||||
| 
 | ||||
|                 <div class="card-body"> | ||||
|                     <form method="POST" action="{{ route('login') }}" aria-label="{{ __('Login') }}"> | ||||
|                         @csrf | ||||
| 
 | ||||
|                         <div class="form-group row"> | ||||
|                             <label for="email" class="col-sm-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label> | ||||
| 
 | ||||
|                             <div class="col-md-6"> | ||||
|                                 <input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" required autofocus> | ||||
| 
 | ||||
|                                 @if ($errors->has('email')) | ||||
|                                     <span class="invalid-feedback" role="alert"> | ||||
|                                         <strong>{{ $errors->first('email') }}</strong> | ||||
|                                     </span> | ||||
|                                 @endif | ||||
|                             </div> | ||||
|                         </div> | ||||
| 
 | ||||
|                         <div class="form-group row"> | ||||
|                             <label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Password') }}</label> | ||||
| 
 | ||||
|                             <div class="col-md-6"> | ||||
|                                 <input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" required> | ||||
| 
 | ||||
|                                 @if ($errors->has('password')) | ||||
|                                     <span class="invalid-feedback" role="alert"> | ||||
|                                         <strong>{{ $errors->first('password') }}</strong> | ||||
|                                     </span> | ||||
|                                 @endif | ||||
|                             </div> | ||||
|                         </div> | ||||
| 
 | ||||
|                         <div class="form-group row"> | ||||
|                             <div class="col-md-6 offset-md-4"> | ||||
|                                 <div class="checkbox"> | ||||
|                                     <label> | ||||
|                                         <input type="checkbox" name="remember" {{ old('remember') ? 'checked' : '' }}> {{ __('Remember Me') }} | ||||
|                                     </label> | ||||
|                                 </div> | ||||
|                             </div> | ||||
|                         </div> | ||||
| 
 | ||||
|                         <div class="form-group row mb-0"> | ||||
|                             <div class="col-md-8 offset-md-4"> | ||||
|                                 <button type="submit" class="btn btn-primary"> | ||||
|                                     {{ __('Login') }} | ||||
|                                 </button>{{-- | ||||
| 
 | ||||
|                                 --}}<a class="btn btn-link" href="{{ route('password.request') }}"> | ||||
|                                     {{ __('Forgot Your Password?') }} | ||||
|                                 </a>{{-- | ||||
| 
 | ||||
|                                 --}}<a class="btn btn-link pl-0" href="{{ route('register') }}"> | ||||
|                                     {{ __('Register') }} | ||||
|                                 </a> | ||||
|                             </div> | ||||
|                         </div> | ||||
|                     </form> | ||||
| 				</div> | ||||
| 
 | ||||
| 				<div class="card-footer bg-white"> | ||||
| 					<div class="form-group row mb-0"> | ||||
| 						<span class="col-md-2 col-form-label text-md-right">{{ __('Login with') }}</span> | ||||
| 
 | ||||
| 						<div class="col-md-8"> | ||||
| 							@set('services.oauth_providers.github.client_id') | ||||
| 							<a type="submit" href="{{route('oauth-github-authorize')}}" class="btn btn-dark"> | ||||
|                 <i class="fa-github pr-1"></i> | ||||
| 								{{ __('GitHub') }} | ||||
| 							</a> | ||||
| 							@endset | ||||
| 
 | ||||
| 							@set('services.oauth_providers.google.client_id') | ||||
| 							<a type="submit" href="{{route('oauth-google-authorize')}}" class="btn btn-dark"> | ||||
|                 <i class="fa-google pr-1"></i> | ||||
| 								{{ __('Google') }} | ||||
| 							</a> | ||||
| 							@endset | ||||
| 
 | ||||
| 							@set('services.oauth_providers.facebook.client_id') | ||||
| 							<a type="submit" href="{{route('oauth-facebook-authorize')}}" class="btn btn-dark"> | ||||
|                 <i class="fa-facebook-square pr-1"></i> | ||||
| 								{{ __('Facebook') }} | ||||
| 							</a> | ||||
| 							@endset | ||||
| 						</div> | ||||
| 					</div> | ||||
| 				</div> | ||||
|       <div class="col-md-8"> | ||||
|         <div class="card"> | ||||
|           <div class="card-header">{{ __('Login') }}</div> | ||||
| 
 | ||||
|           <div class="card-body"> | ||||
|             <form method="POST" action="{{ route('login') }}" aria-label="{{ __('Login') }}"> | ||||
|               @csrf | ||||
| 
 | ||||
|               @php(Widget::setLayout(4, 6)) | ||||
| 
 | ||||
|               {!! Widget::email('email', 'E-Mail Address')->required()->autofocus() !!} | ||||
|               {!! Widget::password('password', 'Password')->required() !!} | ||||
|               {!! Widget::checkbox('remember', 'Remember Me')->checked(false) !!} | ||||
| 
 | ||||
|               <div class="form-group row mb-0"> | ||||
|                 <div class="col-md-8 offset-md-4"> | ||||
|                   <button type="submit" class="btn btn-primary">{{ __('Login') }}</button>{{-- | ||||
|                   --}}<a class="btn btn-link" href="{{ route('password.request') }}">{{ __('Forgot Your Password?') }}</a>{{-- | ||||
|                   --}}<a class="btn btn-link pl-0" href="{{ route('register') }}">{{ __('Register') }}</a> | ||||
|                 </div> | ||||
|               </div> | ||||
|             </form> | ||||
|           </div> | ||||
| 
 | ||||
|           <div class="card-footer bg-white"> | ||||
|             <div class="form-group row mb-0"> | ||||
|               <span class="col-md-4 col-form-label text-md-right text-muted">…or authenticate with</span> | ||||
| 
 | ||||
|               <div class="col-md-6"> | ||||
|                 @set('services.oauth_providers.github.client_id') | ||||
|                 <a type="submit" href="{{route('oauth-github-authorize')}}" class="btn btn-dark"> | ||||
|                   <i class="fa-github pr-1"></i> | ||||
|                   {{ __('GitHub') }} | ||||
|                 </a> | ||||
|                 @endset | ||||
| 
 | ||||
|                 @set('services.oauth_providers.google.client_id') | ||||
|                 <a type="submit" href="{{route('oauth-google-authorize')}}" class="btn btn-dark"> | ||||
|                   <i class="fa-google pr-1"></i> | ||||
|                   {{ __('Google') }} | ||||
|                 </a> | ||||
|                 @endset | ||||
| 
 | ||||
|                 @set('services.oauth_providers.facebook.client_id') | ||||
|                 <a type="submit" href="{{route('oauth-facebook-authorize')}}" class="btn btn-dark"> | ||||
|                   <i class="fa-facebook-square pr-1"></i> | ||||
|                   {{ __('Facebook') }} | ||||
|                 </a> | ||||
|                 @endset | ||||
|               </div> | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
| </div> | ||||
|   </div> | ||||
| @endsection | ||||
|  | ||||
| @ -0,0 +1,22 @@ | ||||
| @php | ||||
| /** @var \App\View\Widget $w */ | ||||
| @endphp | ||||
| 
 | ||||
| <div class="row form-group"> | ||||
|   <div class="col-md-{{$w->fieldCols}} offset-md-{{$w->labelCols}}"> | ||||
|     <div class="custom-control custom-checkbox{{ $errors->has($w->name) ? ' is-invalid' : '' }}"> | ||||
|       <input type="checkbox" class="custom-control-input" | ||||
|              id="field-{{ $w->name }}" | ||||
|              {{+$w->value?'checked':''}} | ||||
|              name="{{ $w->name }}"> | ||||
|       <label class="custom-control-label" for="field-{{ $w->name }}">{{ $w->label }}</label> | ||||
|     </div> | ||||
| 
 | ||||
|     @if ($errors->has($w->name)) | ||||
|       <span class="invalid-feedback" role="alert"> | ||||
|         <strong>{{ $errors->first($w->name) }}</strong> | ||||
|       </span> | ||||
|     @endif | ||||
|   </div> | ||||
|   @include('form._help') | ||||
| </div> | ||||
					Loading…
					
					
				
		Reference in new issue