Skip to content

Commit

Permalink
[2456] Add password reset templates
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jun 6, 2012
1 parent c98aada commit 3baf87c
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
36 changes: 36 additions & 0 deletions ckan/templates/user/perform_reset.html
@@ -0,0 +1,36 @@
{% extends "page.jinja.html" %}

{% block title %}{{ _('Reset Your Password') }} - {{ super() }}{% endblock %}

{% block breadcrumb %}
<ol class="breadcrumb">
<li class="current">{{ _('Password Reset') }}</li>
</ol>
{% endblock %}

{% block primary_content %}
<article class="module">
<h1 class="heading">{{ _('Reset Your Password') }}</h1>
<div class="content">
{% block form %}
<form class="form-horizontal" action="" method="post">
{{ form.errors(error_summary) }}
{{ form.input("password1", id="field-password", label=_("Password"), type="password", placeholder="••••••••", value=data.password1, error=errors.password1, classes=["control-medium"]) }}
{{ form.input("password2", id="field-confirm-password", label=_("Confirm"), type="password", placeholder="••••••••", value=data.password2, error=errors.password1, classes=["control-medium"]) }}
<div class="form-actions">
<button class="btn btn-primary" type="submit" name="save">{{ _("Update Password") }}</button>
</div>
</form>
{% endblock %}
</div>
</article>
{% endblock %}

{% block secondary_content %}
<section class="module info">
<h2 class="heading">{{ _('How does this work?') }}</h2>
<div class="content">
<p>{% trans %}Simply enter a new password and we'll update your account{% endtrans %}</p>
</div>
</section>
{% endblock %}
34 changes: 34 additions & 0 deletions ckan/templates/user/request_reset.html
@@ -0,0 +1,34 @@
{% extends "page.jinja.html" %}

{% block title %}{{ _('Reset Your Password') }} - {{ super() }}{% endblock %}

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

{% block primary_content %}
<article class="module">
<h1 class="heading">{{ _('Reset Your Password') }}</h1>
<div class="content">
{% block form %}
<form action="" method="post" class="form-inline control-medium">
<label for="field-username">Username</label>
<input id="field-username" name="user" value="" />
<button type="submit" name="reset" class="btn btn-primary">{{ _("Request Reset") }}</button>
</form>
{% endblock %}
</div>
</article>
{% endblock %}

{% block secondary_content %}
<section class="module info">
<h2 class="heading">{{ _('How does this work?') }}</h2>
<div class="content">
<p>{% trans %}Enter your username into the box and we will send you
an email with a link to enter a new password.{% endtrans %}</p>
</div>
</section>
{% endblock %}

0 comments on commit 3baf87c

Please sign in to comment.