firefly-iii/resources/views/auth/login.twig
2022-03-19 11:19:58 +01:00

88 lines
3.8 KiB
Twig

{% extends "./layout/guest" %}
{% block content %}
{% if IS_DEMO_SITE %}
<div class="row">
<div class="col-lg-12">
<p class="well">
Welcome to the Firefly III demonstration website!<br/>
<br/>
To log in, please use email address <strong>{{ DEMO_USERNAME }}</strong> with password <strong>{{ DEMO_PASSWORD }}</strong>
</p>
</div>
</div>
{% endif %}
{# SUCCESS MESSAGE (ALWAYS SINGULAR) #}
{% if Session.has('success') %}
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert">
<span>&times;</span><span class="sr-only">{{ 'close'|_ }}</span>
</button>
<strong>{{ 'flash_success'|_ }}</strong> {{ session('success') }}
</div>
{% endif %}
{% if errors.count > 0 %}
<div class="row">
<div class="col-lg-12">
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert"><span>&times;</span><span class="sr-only">{{ 'close'|_ }}</span>
</button>
<strong>{{ 'flash_error'|_ }}</strong> {{ errors.first }}
</div>
</div>
</div>
{% endif %}
{% if session('logoutMessage') %}
<div class="row">
<div class="col-lg-12">
<div class="alert alert-info alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert"><span>&times;</span><span class="sr-only">{{ 'close'|_ }}</span>
</button>
{{ session('logoutMessage') }}
</div>
</div>
</div>
{% endif %}
<div class="login-box-body">
<p class="login-box-msg">{{ 'sign_in_to_start'|_ }}</p>
<form action="{{ route('login') }}" method="post">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<div class="form-group has-feedback">
{% if config('firefly.authentication_guard') == 'web' %}
<input type="email" autocomplete="email" name="email" value="{% if not IS_DEMO_SITE %}{{ email }}{% else %}{{ DEMO_USERNAME }}{% endif %}" class="form-control" placeholder="{{ trans('form.email') }}"/>
{% else %}
<input type="text" autocomplete="username" name="{{ usernameField }}" value="{{ email }}" class="form-control" placeholder="{{ trans('form.login_name') }}"/>
{% endif %}
</div>
<div class="form-group has-feedback">
<input type="password" name="password" autocomplete="current-password" {% if IS_DEMO_SITE %}value="{{ DEMO_PASSWORD }}"{% endif%} class="form-control" placeholder="{{ trans('form.password') }}"/>
</div>
<div class="row">
<div class="col-xs-6">
<div class="checkbox">
<label>
<input type="checkbox" name="remember" {% if remember %}checked="checked"{% endif %} value="1"> {{ trans('form.remember_me') }}
</label>
</div>
</div>
<div class="col-xs-6">
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ 'sign_in'|_ }}</button>
</div>
</div>
</form>
{% if allowRegistration %}
<a href="{{ route('register') }}" class="text-center">{{ 'register_new_account'|_ }}</a><br>
{% endif %}
{% if allowReset %}
<a href="{{ route('password.reset.request') }}">{{ 'forgot_my_password'|_ }}</a>
{% endif %}
</div>
{% endblock %}