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') |
@extends('layouts.app') |
||||||
|
|
||||||
@section('content') |
@section('content') |
||||||
<div class="container"> |
<div class="container"> |
||||||
<div class="row justify-content-center"> |
<div class="row justify-content-center"> |
||||||
<div class="col-md-8"> |
<div class="col-md-8"> |
||||||
<div class="card"> |
<div class="card"> |
||||||
<div class="card-header">{{ __('Login') }}</div> |
<div class="card-header">{{ __('Login') }}</div> |
||||||
|
|
||||||
<div class="card-body"> |
<div class="card-body"> |
||||||
<form method="POST" action="{{ route('login') }}" aria-label="{{ __('Login') }}"> |
<form method="POST" action="{{ route('login') }}" aria-label="{{ __('Login') }}"> |
||||||
@csrf |
@csrf |
||||||
|
|
||||||
<div class="form-group row"> |
@php(Widget::setLayout(4, 6)) |
||||||
<label for="email" class="col-sm-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label> |
|
||||||
|
{!! Widget::email('email', 'E-Mail Address')->required()->autofocus() !!} |
||||||
<div class="col-md-6"> |
{!! Widget::password('password', 'Password')->required() !!} |
||||||
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" required autofocus> |
{!! Widget::checkbox('remember', 'Remember Me')->checked(false) !!} |
||||||
|
|
||||||
@if ($errors->has('email')) |
<div class="form-group row mb-0"> |
||||||
<span class="invalid-feedback" role="alert"> |
<div class="col-md-8 offset-md-4"> |
||||||
<strong>{{ $errors->first('email') }}</strong> |
<button type="submit" class="btn btn-primary">{{ __('Login') }}</button>{{-- |
||||||
</span> |
--}}<a class="btn btn-link" href="{{ route('password.request') }}">{{ __('Forgot Your Password?') }}</a>{{-- |
||||||
@endif |
--}}<a class="btn btn-link pl-0" href="{{ route('register') }}">{{ __('Register') }}</a> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
</form> |
||||||
<div class="form-group row"> |
</div> |
||||||
<label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Password') }}</label> |
|
||||||
|
<div class="card-footer bg-white"> |
||||||
<div class="col-md-6"> |
<div class="form-group row mb-0"> |
||||||
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" required> |
<span class="col-md-4 col-form-label text-md-right text-muted">…or authenticate with</span> |
||||||
|
|
||||||
@if ($errors->has('password')) |
<div class="col-md-6"> |
||||||
<span class="invalid-feedback" role="alert"> |
@set('services.oauth_providers.github.client_id') |
||||||
<strong>{{ $errors->first('password') }}</strong> |
<a type="submit" href="{{route('oauth-github-authorize')}}" class="btn btn-dark"> |
||||||
</span> |
<i class="fa-github pr-1"></i> |
||||||
@endif |
{{ __('GitHub') }} |
||||||
</div> |
</a> |
||||||
</div> |
@endset |
||||||
|
|
||||||
<div class="form-group row"> |
@set('services.oauth_providers.google.client_id') |
||||||
<div class="col-md-6 offset-md-4"> |
<a type="submit" href="{{route('oauth-google-authorize')}}" class="btn btn-dark"> |
||||||
<div class="checkbox"> |
<i class="fa-google pr-1"></i> |
||||||
<label> |
{{ __('Google') }} |
||||||
<input type="checkbox" name="remember" {{ old('remember') ? 'checked' : '' }}> {{ __('Remember Me') }} |
</a> |
||||||
</label> |
@endset |
||||||
</div> |
|
||||||
</div> |
@set('services.oauth_providers.facebook.client_id') |
||||||
</div> |
<a type="submit" href="{{route('oauth-facebook-authorize')}}" class="btn btn-dark"> |
||||||
|
<i class="fa-facebook-square pr-1"></i> |
||||||
<div class="form-group row mb-0"> |
{{ __('Facebook') }} |
||||||
<div class="col-md-8 offset-md-4"> |
</a> |
||||||
<button type="submit" class="btn btn-primary"> |
@endset |
||||||
{{ __('Login') }} |
</div> |
||||||
</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> |
</div> |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
@endsection |
@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