mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-04 14:13:52 +09:00
Merge pull request #762 from FOSSBilling/evrifaessa-patch-2
Add a link to the admin password reset flow
This commit is contained in:
2 files changed
+33
-22
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{% extends 'layout_login.html.twig' %}
|
||||
|
||||
{% block meta_title %}{{ 'Login'|trans }}{% endblock %}
|
||||
{% block meta_title %}{{ 'Login' | trans }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
@@ -14,56 +14,61 @@
|
||||
<div class="card card-md">
|
||||
<div class="card-body">
|
||||
{% if create_admin %}
|
||||
<h2 class="card-title text-center mb-4">{{ 'Create main administrator account'|trans }}</h2>
|
||||
<h2 class="card-title text-center mb-4">{{ 'Create main administrator account' | trans }}</h2>
|
||||
<form class="api-form" action="{{ 'api/guest/staff/create'|link }}" method="post" data-api-redirect="{{ 'index'|alink }}">
|
||||
<input type="hidden" name="CSRFToken" value="{{ CSRFToken }}"/>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="inputEmail">{{ 'Email'|trans }}</label>
|
||||
<label class="form-label" for="inputEmail">{{ 'Email' | trans }}</label>
|
||||
<div class="col">
|
||||
<input class="form-control" id="inputEmail" type="email" name="email" value="{{ request.email }}" placeholder="{{ 'Enter your email address'|trans }}">
|
||||
<input class="form-control" id="inputEmail" type="email" name="email" value="{{ request.email }}" placeholder="{{ 'Enter your email address' | trans }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="inputPassword">{{ 'Password'|trans }}</label>
|
||||
<label class="form-label" for="inputPassword">{{ 'Password' | trans }}</label>
|
||||
<div class="col">
|
||||
<input class="form-control" id="inputPassword" type="password" name="password" value="{{ request.password }}" placeholder="{{ 'Enter your password'|trans }}">
|
||||
<input class="form-control" id="inputPassword" type="password" name="password" value="{{ request.password }}" placeholder="{{ 'Enter your password' | trans }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<button class="btn btn-primary w-100" type="submit">{{ 'Create administrator account'|trans }}</button>
|
||||
<button class="btn btn-primary w-100" type="submit">{{ 'Create administrator account' | trans }}</button>
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<h2 class="h2 text-center mb-4">Log into your account</h2>
|
||||
<h2 class="h2 text-center mb-4">{{ 'Log into your account' | trans }}</h2>
|
||||
<form class="api-form" action="{{ 'api/guest/staff/login'|link }}" method="post" data-api-redirect="{{ 'index'|alink }}">
|
||||
<input type="hidden" name="CSRFToken" value="{{ CSRFToken }}"/>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="inputEmail">{{ 'Email'|trans }}</label>
|
||||
<label class="form-label" for="inputEmail">{{ 'Email' | trans }}</label>
|
||||
<input class="form-control"
|
||||
id="inputEmail"
|
||||
type="email"
|
||||
name="email"
|
||||
value="{{ request.email }}"
|
||||
placeholder="{{ 'Enter your email address'|trans }}"
|
||||
placeholder="{{ 'Enter your email address' | trans }}"
|
||||
required
|
||||
autofocus>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="inputPassword">{{ 'Password'|trans }}</label>
|
||||
<label class="form-label" for="inputPassword">
|
||||
{{ 'Password' | trans }}
|
||||
<span class="form-label-description">
|
||||
<a href="{{ 'staff/passwordreset'|alink }}">{{ 'Forgot your password?' | trans }}</a>
|
||||
</span>
|
||||
</label>
|
||||
<input class="form-control"
|
||||
id="inputPassword"
|
||||
type="password"
|
||||
name="password"
|
||||
value="{{ request.password }}"
|
||||
placeholder="{{ 'Enter your password'|trans }}"
|
||||
placeholder="{{ 'Enter your password' | trans }}"
|
||||
required>
|
||||
</div>
|
||||
<div class="mb-3 form-check">
|
||||
<input class="form-check-input" id="inputRemember" type="checkbox" name="remember" value="1" checked>
|
||||
<label class="form-check-label" for="inputRemember">{{ 'Remember me'|trans }}</label>
|
||||
<label class="form-check-label" for="inputRemember">{{ 'Remember me' | trans }}</label>
|
||||
</div>
|
||||
<div class="form-footer">
|
||||
<button class="btn btn-primary w-100" type="submit">{{ 'Sign in'|trans }}</button>
|
||||
<button class="btn btn-primary w-100" type="submit">{{ 'Sign in' | trans }}</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends 'layout_login.html.twig' %}
|
||||
|
||||
{% block meta_title %}{{ 'Password Reset'|trans }}{% endblock %}
|
||||
{% block meta_title %}{{ 'Reset your password' | trans }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
@@ -13,29 +13,35 @@
|
||||
</div>
|
||||
<div class="card card-md">
|
||||
<div class="card-body">
|
||||
<h2 class="h2 text-center mb-4">Reset your Password</h2>
|
||||
<h2 class="h2 text-center mb-4">{{ 'Reset your password' | trans }}</h2>
|
||||
<p class="text-muted mb-4">{{ 'Enter your email address. You will receive a confirmation link if your account exists.' | trans }}</p>
|
||||
<form class="api-form" action="{{ 'api/guest/staff/passwordreset'|link }}" method="post" data-api-redirect="{{ 'index'|alink }}">
|
||||
<input type="hidden" name="CSRFToken" value="{{ CSRFToken }}"/>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="inputEmail">{{ 'Email'|trans }}</label>
|
||||
<label class="form-label" for="inputEmail">{{ 'Email address' | trans }}</label>
|
||||
<input class="form-control"
|
||||
id="inputEmail"
|
||||
type="email"
|
||||
name="email"
|
||||
value="{{ request.email }}"
|
||||
placeholder="{{ 'Enter your email address'|trans }}"
|
||||
placeholder="{{ 'Enter your email address' | trans }}"
|
||||
required
|
||||
autofocus>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<p>Enter your email to reset password. You will receive new password after reset link is confirmed.</p>
|
||||
</div>
|
||||
<div class="form-footer">
|
||||
<button class="btn btn-primary w-100" type="submit">{{ 'Reset Password'|trans }}</button>
|
||||
<button class="btn btn-primary w-100" type="submit">
|
||||
<svg class="icon">
|
||||
<use xlink:href="#mail" />
|
||||
</svg>
|
||||
{{ 'Send me the link' | trans }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center text-muted mt-3">
|
||||
<a href="{{ 'staff/login'|alink }}">{{ 'Take me back to the login screen.' | trans }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user