blue-twilight/resources/views/themes/base/partials/login.blade.php

70 lines
2.8 KiB
PHP
Raw Permalink Normal View History

@if (!$is_sso)
@if (UserConfig::isSocialMediaLoginEnabled())
<p>@lang('auth.social_login')</p>
@include(Theme::viewName('partials.social_login_providers'))
<p class="mt-5 mb-4">@lang('auth.email_password_login')</p>
@endif
@else
<p>@lang('auth.email_password_login_sso')</p>
<p class="mb-5">@lang('auth.email_password_login_sso_2')</p>
@endif
<form role="form" method="POST" action="{{ url('/login') }}">
{{ csrf_field() }}
<div class="form-group row{{ $errors->has('email') ? ' has-danger' : '' }}">
<label for="email" class="col-md-4 col-form-label text-md-right">@lang('forms.email_label')</label>
<div class="col-md-6">
@if ($is_sso)
<input type="hidden" name="email" value="{{ $login_data['email'] }}">
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" value="{{ $login_data['email'] }}" readonly>
@else
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" autofocus>
@endif
@if ($errors->has('email'))
<div class="invalid-feedback">
<strong>{{ $errors->first('email') }}</strong>
</div>
@endif
</div>
</div>
<div class="form-group row{{ $errors->has('password') ? ' has-danger' : '' }}">
<label for="password" class="col-md-4 col-form-label text-md-right">@lang('forms.password_label')</label>
<div class="col-md-6">
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password"{{ $is_sso ? ' autofocus' : '' }}>
@if ($errors->has('password'))
<div class="invalid-feedback">
<strong>{{ $errors->first('password') }}</strong>
</div>
@endif
</div>
</div>
@if (!$is_sso)
<div class="form-group row">
<div class="col-md-4"><!-- --></div>
<div class="col-md-6">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="remember-me" name="remember">
<label class="form-check-label" for="remember-me">@lang('forms.remember_me_label')
</label>
</div>
</div>
</div>
@endif
<div class="form-group row">
<div class="col-md-2"><!-- --></div>
<div class="col-md-8 text-right">
<a class="btn btn-link" href="{{ url('/password/reset') }}">@lang('auth.forgot_password_link')</a>
<button type="submit" class="btn btn-success"><i class="fa fa-fw fa-check"></i> @lang('forms.login_action')</button>
</div>
</div>
</form>