style up login/logout/signup pages
This commit is contained in:
@ -6,29 +6,70 @@
|
||||
{% block title %}{% trans "Log in" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form method="POST" action="{% url "account_login" %}" autocapitalize="off" {% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
|
||||
<legend>{% trans "Log in to an existing account" %}</legend>
|
||||
<div class="uk-flex uk-flex-center uk-margin-large-top" uk-grid>
|
||||
|
||||
<div class="uk-width-medium">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-margin">
|
||||
<legend class="uk-legend">{% trans "Guest access" %}</legend>
|
||||
<div class="uk-text-meta uk-margin">Quick access for downloading
|
||||
product images and making one-off catalogs.</div>
|
||||
<a href="{% url 'login_guest' %}" class="uk-button uk-button-primary">{% trans "Log in as guest" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-width-medium">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-margin">
|
||||
|
||||
<form method="POST" action="{% url "account_login" %}"
|
||||
autocapitalize="off"
|
||||
class="uk-form"
|
||||
{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
|
||||
<legend class="uk-legend">{% trans "Log in" %}</legend>
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
|
||||
<div class="uk-margin">
|
||||
<div class="uk-inline uk-form-width-medium">
|
||||
<span class="uk-form-icon" uk-icon="icon: user"></span>
|
||||
<input class="uk-input"
|
||||
type="text" name="username" id="id_username"
|
||||
maxlength="30" required
|
||||
placeholder="{% trans 'Username' %}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-margin">
|
||||
<div class="uk-inline uk-form-width-medium">
|
||||
<span class="uk-form-icon" uk-icon="icon: lock"></span>
|
||||
<input class="uk-input"
|
||||
type="password" name="password" id="id_password"
|
||||
required
|
||||
placeholder="{% trans 'Password' %}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-margin uk-form-width-medium">
|
||||
<input class="uk-checkbox" type="checkbox" name="remember" id="id_remember">
|
||||
<label class="uk-form-label" for="id_remember">Remember Me</label>
|
||||
</div>
|
||||
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||
{% endif %}
|
||||
<button type="submit" class="btn btn-primary">{% trans "Log in" %}</button>
|
||||
<a href="{% url "account_password_reset" %}" class="btn btn-link">{% trans "Forgot your password?" %}</a>
|
||||
|
||||
<button type="submit" class="uk-button uk-button-primary">{% trans "Log in" %}</button>
|
||||
</form>
|
||||
{% if ACCOUNT_OPEN_SIGNUP %}
|
||||
<p class="login-signup">
|
||||
|
||||
<p>
|
||||
<small>
|
||||
<a href="{% url "account_password_reset" %}" class="btn btn-link">{% trans "Forgot your password?" %}</a>
|
||||
<br/>
|
||||
{% if ACCOUNT_OPEN_SIGNUP %}
|
||||
{% trans "Don't have an account?" %} <strong><a href="{% urlnext 'account_signup' %}">{% trans "Sign up" %}</a></strong>
|
||||
{% endif %}
|
||||
</small>
|
||||
</p>
|
||||
{% endif %}
|
||||
<a href="{% url 'login_guest' %}" class="btn btn-link">{% trans "Log in as guest" %}</a>
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{% include "account/_login_sidebar.html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@ -5,16 +5,18 @@
|
||||
{% block title %}{% trans "Log out" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="uk-flex uk-flex-center">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-margin-large-top">
|
||||
|
||||
<form method="POST" action="{% url "account_logout" %}">
|
||||
<legend>{% trans "Log out" %}</legend>
|
||||
<fieldset>
|
||||
<legend class="uk-legend">{% trans "Log out" %}</legend>
|
||||
<fieldset class="uk-fieldset">
|
||||
{% csrf_token %}
|
||||
<p>{% trans "Are you sure you want to log out?" %}</p>
|
||||
<button type="submit" class="btn btn-primary">{% trans "Log out" %}</button>
|
||||
<button type="submit" class="uk-button uk-button-primary">{% trans "Log out" %}</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@ -6,16 +6,39 @@
|
||||
{% block title %}{% trans "Sign up" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form id="signup_form" method="post" action="{% url "account_signup" %}" autocapitalize="off" {% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
|
||||
<legend>{% trans "Sign up" %}</legend>
|
||||
<div class="uk-flex uk-flex-center uk-margin-top">
|
||||
|
||||
<div class="uk-card uk-card-default uk-card-body">
|
||||
<legend class="uk-legend">{% trans "Sign up" %}</legend>
|
||||
|
||||
<form class="uk-form" id="signup_form" method="post" action="{% url "account_signup" %}" autocapitalize="off" {% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
|
||||
<div class="uk-margin">
|
||||
<label class="uk-form-label" for="id_username">Username</label>
|
||||
<input class="uk-input uk-form-small" type="text" name="username" id="id_username" maxlength="30" required>
|
||||
</div>
|
||||
|
||||
<div class="uk-margin">
|
||||
<label class="uk-form-label" for="id_email">Email</label>
|
||||
<input class="uk-input uk-form-small" type="text" name="email" id="id_email" required>
|
||||
</div>
|
||||
|
||||
<div class="uk-margin">
|
||||
<label class="uk-form-label" for="id_password">Password</label>
|
||||
<input class="uk-input uk-form-small" type="password" name="password" id="id_password" required>
|
||||
</div>
|
||||
|
||||
<div class="uk-margin">
|
||||
<label class="uk-form-label" for="id_password_confirm">Password (again)</label>
|
||||
<input class="uk-input uk-form-small" type="password" name="password_confirm" id="id_password_confirm" required>
|
||||
<input type="hidden" name="code" id="id_code">
|
||||
</div>
|
||||
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||
{% endif %}
|
||||
<button type="submit" class="btn btn-primary">{% trans "Sign up" %}</button>
|
||||
<button type="submit" class="uk-button uk-button-primary">{% trans "Sign up" %}</button>
|
||||
</form>
|
||||
<p class="login-signup">
|
||||
<small>
|
||||
@ -23,9 +46,6 @@
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{% include "account/_signup_sidebar.html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user