diff --git a/invenio/modules/accounts/templates/accounts/login_base.html b/invenio/modules/accounts/templates/accounts/login_base.html index e85368c2d..ba761be76 100644 --- a/invenio/modules/accounts/templates/accounts/login_base.html +++ b/invenio/modules/accounts/templates/accounts/login_base.html @@ -1,114 +1,114 @@ {# # This file is part of Invenio. # Copyright (C) 2012, 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Invenio is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Invenio; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. #} {%- from "_formhelpers.html" import render_field with context %} {%- extends "page.html" %} {%- set title = title|default(None) %} {% block body %} {%- block form_header scoped -%} <div class="row"> {% if config.CFG_EXTERNAL_AUTH_USING_SSO %}{% block form_header_sso scoped %} <div class="col-md-8 col-md-offset-2"> <p class="lead text-center"> {% autoescape false %} {{ _("You can login using %(x_url_open)sSingle-Sign-On%(x_url_close)s", x_url_open='<a href="'+url_for('sso_login', _external=True, _scheme='https', referer=request.values.get('referer'))+'">', x_url_close='</a>') }} {% endautoescape %} </p> <hr/> </div> {% endblock form_header_sso %}{% endif %} {%- block form_header_message scoped -%} <div class="col-md-8 col-md-offset-2"> {% set x_url_open = '<a href="%s">'|format(url_for('webaccount.register')) %} <p class="lead text-center">{{ _("If you already have an account, please login using the form below.") }}</p> <p class="text-center">{{ _("If you don't own an account yet, please %(x_url_open)s register", x_url_open=x_url_open|safe) }} {{ _("%(x_url_close)s an internal account.", x_url_close='</a>'|safe) }}</p> <hr/> </div> {%- endblock form_header_message -%} </div> {%- endblock form_header -%} {%- block form_body scoped -%} <div class="row"> {%- block form_auth_internal scoped -%} <div class="col-md-4 col-md-offset-4"> {%- block form_auth_internal_form scoped -%} - {%- block form_auth_internal_title scoped -%}<legend>{{ _('Please Sign In') }}</legend>{% endblock %} <form class="form-signin" action="{{ url_for('webaccount.login', _external=True, _scheme='https') }}" method="POST"> - {{ form.referer }} - {{ form.login_method }} - <div class="form-group{% if form.nickname.errors%} has-error{% endif %}"> - {{ form.nickname(placeholder=_('Username or email'), class_="form-control", type="text") }} - {%- if form.nickname.errors %}{% for error in form.nickname.errors %} - <span class="help-block">{{ error }}</span> - {%- endfor %}{% endif %} - </div> - <div class="form-group{% if form.password.errors%} has-error{% endif %}"> - {{ form.password(placeholder=_('Password'), class_="form-control", type="password") }} - {%- if form.password.errors %}{% for error in form.password.errors %} - <span class="help-block">{{ error }}</span> - {%- endfor %}{% endif %} - - <label class="checkbox"> - {{ form.remember(class_="checkbox") }} {{ form.remember.label.text }} - </label> + {%- block form_auth_internal_title scoped -%}<legend>{{ _('Please Sign In') }}</legend>{% endblock %} + {{ form.referer }} + {{ form.login_method }} + <div class="form-group{% if form.nickname.errors%} has-error{% endif %}"> + {{ form.nickname(placeholder=_('Username or email'), class_="form-control", type="text") }} + {%- if form.nickname.errors %}{% for error in form.nickname.errors %} + <span class="help-block">{{ error }}</span> + {%- endfor %}{% endif %} + </div> + <div class="form-group{% if form.password.errors%} has-error{% endif %}"> + {{ form.password(placeholder=_('Password'), class_="form-control", type="password") }} + {%- if form.password.errors %}{% for error in form.password.errors %} + <span class="help-block">{{ error }}</span> + {%- endfor %}{% endif %} + </div> + <div class="checkbox"> + <label>{{ form.remember(class_="checkbox") }} {{ form.remember.label.text }}</label> + </div> {{ form.submit(class_="btn btn-info btn-block") }} </form> <p class="text-center"><small> <a href="{{ url_for('webaccount.lost') }}"> {{ _('Lost your password?') }} </a> </small></p> {%- endblock form_auth_internal_form -%} </div> {%- endblock form_auth_internal -%} </div> {%- endblock form_body -%} {%- block form_footer scoped -%}{%- endblock form_footer -%} {% endblock %} {% block javascript %} {{ super() }} <script type="text/javascript"> require(["jquery", "bootstrap"], function($) { function show_username_form(element) { $('#form_field').html($(element).html()) return false } (function($) { $('#nickname').popover({ title: '<strong>{{ _('Note') }}</strong>', content: '{{ _('You can use your nickname or your email address to login.') }}', trigger: 'focus', html: true, container: 'body', placement: '{% block nickname_popover_placement %}right{% endblock%}' }); })(jQuery); }); </script> {% endblock %}