Skip to content

Commit

Permalink
[2455] Add registration page
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jun 6, 2012
1 parent 999551d commit 1dbe4df
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
27 changes: 27 additions & 0 deletions ckan/templates/user/new.html
@@ -0,0 +1,27 @@
{% extends "page.jinja.html" %}

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

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

{% block primary_content %}
<article class="module">
<div class="content">
<h1 class="page-heading">{{ _('Register for an Account') }}</h1>
{{ c.form | safe }}
</div>
</article>
{% endblock %}

{% block secondary_content %}
<section class="module info">
<h2 class="heading">{{ _('Why Sign Up?') }}</h2>
<div class="content">
<p>{% trans %}Create datasets, groups and other exciting things{% endtrans %}</p>
</div>
</section>
{% endblock %}
13 changes: 13 additions & 0 deletions ckan/templates/user/new_user_form.html
@@ -0,0 +1,13 @@
{% import "macros/form.html" as form %}

<form class="form-horizontal" action="" method="post">
{{ form.errors(error_summary) }}
{{ form.input("name", id="field-username", label=_("Username"), placeholder="username", value=data.name, error=errors.name, classes=["control-medium"]) }}
{{ form.input("fullname", id="field-fullname", label=_("Full Name"), placeholder="Joe Bloggs", value=data.fullname, error=errors.fullname, classes=["control-medium"]) }}
{{ form.input("email", id="field-email", label=_("Email"), type="email", placeholder="joe@example.com", value=data.email, error=errors.email, classes=["control-medium"]) }}
{{ 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">{{ _("Create Account") }}</button>
</div>
</form>

0 comments on commit 1dbe4df

Please sign in to comment.