From 040c13adb75c9c546a1624773a607c74747fbec2 Mon Sep 17 00:00:00 2001 From: Gregory Koberger Date: Tue, 25 Oct 2011 11:45:26 -0700 Subject: [PATCH] BrowserID for mobile. I have no reason to believe this works. --- apps/users/templates/users/mobile/login.html | 23 +++++++++++++++++- media/css/zamboni/mobile.css | 25 ++++++++++++++++++++ media/js/zamboni/browserid_support.js | 2 +- 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/apps/users/templates/users/mobile/login.html b/apps/users/templates/users/mobile/login.html index bd9387db11..e61276bb3e 100644 --- a/apps/users/templates/users/mobile/login.html +++ b/apps/users/templates/users/mobile/login.html @@ -1,7 +1,16 @@ {% extends "mobile/base.html" %} {% block title %}{{ page_title(_('User Login')) }}{% endblock %} -{% block js %}{% if form.recaptcha %}{% include("amo/recaptcha_js.html") %}{% endif %}{% endblock %} + +{% block js %} + {% if waffle.switch('browserid-login') %} + + {% endif %} + {% if form.recaptcha %} + {% include("amo/recaptcha_js.html") %} + {% endif %} + {{ js('zamboni/login') }} +{% endblock %} {% block page %} @@ -49,6 +58,18 @@ + + {% if waffle.switch('browserid-login') %} +
+
+ {{ _('or') }} +
+ +
+ {% endif %}
diff --git a/media/css/zamboni/mobile.css b/media/css/zamboni/mobile.css index e0a3911ac9..dec2b5ccd0 100644 --- a/media/css/zamboni/mobile.css +++ b/media/css/zamboni/mobile.css @@ -1670,6 +1670,31 @@ li.persona-previewer { -webkit-box-shadow: 0 0 4px rgba(0,0,0,.2); } +/************************************/ +/* LOGIN */ +/************************************/ + +.browserid-divider { + text-align: center; + margin: 0em 1em 2em; + border-bottom: 1px dashed rgb(204, 204, 204); +} + +.browserid-divider span { + background-color: #FFFFFF; + font-style: italic; + padding: 0 15px; + position: relative; + top: 0.4em; +} + +#browserid { + margin-bottom: 2em; +} +#browserid .button { + margin: auto; +} + /************************************/ /* EXPANDO */ /************************************/ diff --git a/media/js/zamboni/browserid_support.js b/media/js/zamboni/browserid_support.js index c879f04efc..07c514a419 100644 --- a/media/js/zamboni/browserid_support.js +++ b/media/js/zamboni/browserid_support.js @@ -59,4 +59,4 @@ $(document).ready(function(){ gotVerifiedEmail(assertion, to); }); });}); -}); \ No newline at end of file +});