Skip to content

Commit

Permalink
Simplify login page (bug 702728)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkoberger committed Nov 17, 2011
1 parent b844fa3 commit 608b9d3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
2 changes: 2 additions & 0 deletions apps/users/templates/users/login.html
Expand Up @@ -17,6 +17,7 @@
{% block content %}

<div class="primary">
{% if not settings.APP_PREVIEW: %}
<div class="secondary">
<div id="login-help" class="article">
<h2>{{ _('Login Problems?') }}</h2>
Expand All @@ -26,6 +27,7 @@ <h2>{{ _('Login Problems?') }}</h2>
</ul>
</div>
</div>
{% endif %}
<section class="island hero primary grid {{ 'browserid' if waffle.switch('browserid-login') else 'prettyform' }}">
<h1>{{ _('Log In') }}</h1>
{% if waffle.switch('browserid-login') %}
Expand Down
26 changes: 15 additions & 11 deletions apps/users/templates/users/mobile/login.html
Expand Up @@ -27,6 +27,18 @@ <h2>{{ error }}</h2>
{% endif %}
<h2>{{ _('Log In') }}</h2>
<section id="content">
{% if waffle.switch('browserid-login') %}
<section id="browserid">
<button class="browserid-login button" type="submit"
data-url="{{ url('users.browserid_login') }}">
{{ _('Log in with BrowserID') }}
</button>
<div class="browserid-divider">
<span>{{ _('or') }}</span>
</div>
</section>
{% endif %}

<form method="post" action="" class="form-mobile featured-inner object-lead user-input">
{{ csrf() }}
<fieldset>
Expand Down Expand Up @@ -59,26 +71,18 @@ <h2>{{ _('Log In') }}</h2>
</div>
</form>

{% if waffle.switch('browserid-login') %}
<section id="browserid">
<div class="browserid-divider">
<span>{{ _('or') }}</span>
</div>
<button class="browserid-login button" type="submit"
data-url="{{ url('users.browserid_login') }}">
{{ _('Log in with BrowserID') }}
</button>
</section>
{% endif %}
</section>

{# TODO(gkoberger): This is a temp change; fix properly #}
{% if not settings.APP_PREVIEW %}
<div id="login-help" class="article">
<h2>{{ _('Login Problems?') }}</h2>
<ul class="listview">
{% if not settings.APP_PREVIEW %}<li><a href="{{ url('users.register') }}">{{ _("I don't have an account.") }} </a></li>{% endif %}
<li><a href="{{ url('users.pwreset') }}">{{ _("I forgot my password.") }}</a></li>
</ul>
</div>
{% endif %}

</div>{# .primary #}

Expand Down
2 changes: 1 addition & 1 deletion media/css/zamboni/mobile.css
Expand Up @@ -1603,7 +1603,7 @@ li.persona-previewer {

.browserid-divider {
text-align: center;
margin: 0em 1em 2em;
margin: 2em 1em 0;
border-bottom: 1px dashed rgb(204, 204, 204);
}

Expand Down
9 changes: 7 additions & 2 deletions templates/mobile/base_addons.html
Expand Up @@ -50,7 +50,12 @@ <h1 class="site-title">
<a href="{{ url('home') }}"
title="{{ _('Return to the {0} Add-ons homepage')|f(request.APP.pretty) }}">
<img alt="{{ request.APP.pretty }}" src="{{ media('img/zamboni/app_icons/' + appicon + '.png') }}">
{{ _('Mobile Add-ons') }}
{# TODO(gkoberger): This is a temp change; fix properly #}

This comment has been minimized.

Copy link
@cvan

cvan Nov 17, 2011

is this necessary for login or something?

{% if settings.APP_PREVIEW %}
Mobile Apps

This comment has been minimized.

Copy link
@cvan

cvan Nov 17, 2011

does this need to go in mobile/base_apps.html as well?

This comment has been minimized.

Copy link
@gkoberger

gkoberger Nov 17, 2011

Author Owner

This is just for the demo. There's no way of knowing, when a user is logging in, if they're looking at Apps or Add-ons. We need a real solution; this is just a stopgap so the developer preview doesn't say Add-ons.

{% else %}
{{ _('Mobile Add-ons') }}
{% endif %}
</a>
</h1>
</hgroup>
Expand All @@ -60,7 +65,7 @@ <h1 class="site-title">
{% block back_link %}
<a href="{{ url('home') }}" id="home">
<svg width="18" height="16"><polygon fill="#447BC4" points="9,0 18,9 15,9 15,16 11,16 11,11 7,11 7,18 3,16 3,9 0,9"/></svg>
{{ _('Mobile Add-ons Home') }}</a>
{{ _('Mobile Home') }}</a>
{% endblock %}
</header>
{% endblock %}
Expand Down

0 comments on commit 608b9d3

Please sign in to comment.