Skip to content

Commit

Permalink
[2454] Add login templates
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jun 6, 2012
1 parent 6316010 commit 92cb94f
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
46 changes: 46 additions & 0 deletions ckan/templates/user/login.html
@@ -0,0 +1,46 @@
{% extends "page.jinja.html" %}

{% block title %}{{ _('Login') }} - {{ super() }}{% endblock %}

{% block breadcrumb %}
<ol class="breadcrumb">
<li class="current">{{ h.nav_link(_('Login'), controller='user', action='login') }}</li>
</ol>
{% endblock %}

{% block actions %}
<ul class="actions">
<li>{{ h.nav_link(_('Register'), controller='user', action='register', class_="btn", icon="head") }}</li>
</ul>
{% endblock %}

{% block primary_content %}
<section class="module">
<div class="content">
<h1 class="page-heading">{{ _('Login') }}</h1>
{% include "user/partials/login_form.html" %}
</div>
</section>
{% endblock %}

{% block secondary_content %}
<section class="module info">
<h2 class="heading">{{ _('Need an Account?') }}</h2>
<div class="content">
<p>{% trans %}Then sign right up, it only takes a minute.{% endtrans %}</p>
<p class="action">
<a class="btn" href="{{ h.url_for(controller='user', action='register') }}">{{ _('Create an Account') }}</a>
</p>
</div>
</section>

<section class="module info">
<h2 class="heading">{{ _('Forgotten your details?') }}</h2>
<div class="content">
<p>{% trans %}No problem, use our password recovery form to reset it.{% endtrans %}</p>
<p class="action">
<a class="btn" href="{{ h.url_for(controller='user', action='request_reset') }}">{{ _('Forgot your password?') }}</a>
</p>
</div>
</section>
{% endblock %}
10 changes: 10 additions & 0 deletions ckan/templates/user/partials/login_form.html
@@ -0,0 +1,10 @@
{% import 'macros/form.html' as form %}

<form action="{{ c.login_handler }}" method="post" class="form-horizontal">
{{ form.input('login', label="Username", id='field-login', value="", error="", classes=["control-full"]) }}
{{ form.input('password', label="Password", id='field-password', type="password", value="", error="", classes=["control-full"]) }}
{{ form.checkbox('remember', label="Remember me", id='field-remember', checked=true, value="63072000") }}
<div class="form-actions">
<button class="btn btn-primary" type="submit">{{ _('Log in') }}</button>
</div>
</form>

0 comments on commit 92cb94f

Please sign in to comment.