Skip to content

Commit

Permalink
[2456] Add logout first templates
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jun 6, 2012
1 parent 21b2404 commit c98aada
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions ckan/templates/user/logout_first.html
@@ -0,0 +1,28 @@
{% import 'macros/form.html' as form %}
{% extends "user/login.html" %}

{% set logout_url = h.url_for(controller='user',action='logout') %}

{% block actions %}{% endblock %}

{% block form %}
<div class="alert alert-error">{{ _("You're already logged in as {user}.").format(user=c.user) }} <a href="{{ logout_url }}">{{ _('Logout') }}</a>?</div>
<div class="form-horizontal">
{{ form.input('login', label="Username", id='field-login', value="", error="", classes=["control-full"], attrs={"disabled": "disabled"}) }}
{{ form.input('password', label="Password", id='field-password', type="password", value="", error="", classes=["control-full"], attrs={"disabled": "disabled"}) }}
{{ form.checkbox('remember', label="Remember me", id='field-remember', checked=true, attrs={"disabled": "disabled"}) }}
<div class="form-actions">
<button class="btn btn-primary disabled" type="submit" disabled>{{ _('Log in') }}</button>
</div>
</div>
{% endblock %}

{% block secondary_content %}
<section class="module info">
<h2 class="heading">{{ _("You're already logged in") }}</h2>
<div class="content">
<p>{{ _("You need to log out before you can log in with another account.") }}</p>
<p class="action"><a class="btn" href="{{ logout_url }}">{{ _("Log out now") }}</a></p>
</div>
</section>
{% endblock %}

0 comments on commit c98aada

Please sign in to comment.