1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 13:42:49 +01:00
invoiceninja/resources/views/auth/login.blade.php

111 lines
4.0 KiB
PHP
Raw Normal View History

2017-02-15 23:47:37 +01:00
@extends('login')
2015-03-29 14:37:42 +02:00
2017-02-15 23:47:37 +01:00
@section('form')
2015-03-29 14:37:42 +02:00
@include('partials.warn_session', ['redirectTo' => '/logout?reason=inactivity'])
2015-03-29 14:37:42 +02:00
2017-02-15 23:47:37 +01:00
<div class="container">
{!! Former::open('login')
->rules(['email' => 'required|email', 'password' => 'required'])
->addClass('form-signin') !!}
<h2 class="form-signin-heading">{{ trans('texts.account_login') }}</h2>
<hr class="green">
@if (count($errors->all()))
<div class="alert alert-danger">
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
2015-10-18 09:30:28 +02:00
@endforeach
2017-02-15 23:47:37 +01:00
</div>
@endif
2015-03-29 14:37:42 +02:00
2017-02-15 23:47:37 +01:00
@if (Session::has('warning'))
2016-08-02 15:22:02 +02:00
<div class="alert alert-warning">{!! Session::get('warning') !!}</div>
2017-02-15 23:47:37 +01:00
@endif
2015-03-29 14:37:42 +02:00
2017-02-15 23:47:37 +01:00
@if (Session::has('message'))
2016-08-02 15:22:02 +02:00
<div class="alert alert-info">{!! Session::get('message') !!}</div>
2017-02-15 23:47:37 +01:00
@endif
2015-03-29 14:37:42 +02:00
2017-02-15 23:47:37 +01:00
@if (Session::has('error'))
<div class="alert alert-danger">
<li>{!! Session::get('error') !!}</li>
</div>
@endif
@if (env('REMEMBER_ME_ENABLED'))
{{ Former::populateField('remember', 'true') }}
{!! Former::hidden('remember')->raw() !!}
@endif
2015-03-29 14:37:42 +02:00
2017-02-15 23:47:37 +01:00
<div>
{!! Former::text('email')->placeholder(trans('texts.email_address'))->raw() !!}
{!! Former::password('password')->placeholder(trans('texts.password'))->raw() !!}
2015-03-29 14:37:42 +02:00
</div>
2017-02-15 23:47:37 +01:00
{!! Button::success(trans('texts.login'))
->withAttributes(['id' => 'loginButton', 'class' => 'green'])
->large()->submit()->block() !!}
2015-03-29 14:37:42 +02:00
2017-02-15 23:47:37 +01:00
@if (Utils::isOAuthEnabled())
<div class="row existing-accounts">
<p>{{ trans('texts.login_or_existing') }}</p>
@foreach (App\Services\AuthService::$providers as $provider)
<div class="col-md-3 col-xs-6">
2017-02-21 11:44:34 +01:00
<a href="{{ URL::to('auth/' . $provider) }}" class="btn btn-primary btn-lg" title="{{ $provider }}"
2017-02-15 23:47:37 +01:00
id="{{ strtolower($provider) }}LoginButton">
@if($provider == SOCIAL_GITHUB)
<i class="fa fa-github-alt"></i>
@else
<i class="fa fa-{{ strtolower($provider) }}"></i>
@endif
</a>
</div>
@endforeach
</div>
@endif
2015-03-29 14:37:42 +02:00
2017-02-15 23:47:37 +01:00
<div class="row meta">
2017-03-09 10:24:24 +01:00
@if (Utils::isWhiteLabel())
<center>
<br/>{!! link_to('/recover_password', trans('texts.recover_password')) !!}
</center>
@else
<div class="col-md-7 col-sm-12">
{!! link_to('/recover_password', trans('texts.recover_password')) !!}
</div>
<div class="col-md-5 col-sm-12">
{!! link_to(NINJA_WEB_URL.'/knowledgebase/', trans('texts.knowledge_base'), ['target' => '_blank']) !!}
</div>
@endif
2017-02-15 23:47:37 +01:00
</div>
{!! Former::close() !!}
@if(Utils::allowNewAccounts())
<div class="row sign-up">
<div class="col-md-3 col-md-offset-3 col-xs-12">
<h3>{{trans('texts.not_a_member_yet')}}</h3>
<p>{{trans('texts.login_create_an_account')}}</p>
</div>
<div class="col-md-3 col-xs-12">
{!! Button::primary(trans('texts.sign_up_now'))->asLinkTo(URL::to('/invoice_now?sign_up=true'))->withAttributes(['class' => 'blue'])->large()->submit()->block() !!}
</div>
</div>
@endif
2015-03-29 14:37:42 +02:00
</div>
2015-05-09 20:25:16 +02:00
<script type="text/javascript">
$(function() {
if ($('#email').val()) {
$('#password').focus();
} else {
$('#email').focus();
}
})
</script>
2016-08-02 15:22:02 +02:00
@endsection