aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-04-08 17:01:55 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-04-08 17:01:55 +0100
commitbbbcc4565830e48e42af95c4e112587e8b5fda4b (patch)
tree8145f8d9abd7d9ed09be434f74141f8791fac6af /templates/web/base
parentd04f0f466f74e2fb6caab2da259664f5eb02079e (diff)
Add Twitter social login.
Diffstat (limited to 'templates/web/base')
-rw-r--r--templates/web/base/auth/general.html14
-rw-r--r--templates/web/base/report/new/form_user_loggedout.html14
-rw-r--r--templates/web/base/report/update/form_user_loggedout.html14
3 files changed, 36 insertions, 6 deletions
diff --git a/templates/web/base/auth/general.html b/templates/web/base/auth/general.html
index d856dc19a..253dc26a1 100644
--- a/templates/web/base/auth/general.html
+++ b/templates/web/base/auth/general.html
@@ -14,13 +14,23 @@
<input type="hidden" name="r" value="[% c.req.params.r | html %]">
-[% IF NOT oauth_need_email AND c.config.FACEBOOK_APP_ID %]
+[% IF NOT oauth_need_email AND (c.config.FACEBOOK_APP_ID OR c.config.TWITTER_KEY) %]
+ [% IF c.config.FACEBOOK_APP_ID %]
<div class="form-box">
<button name="facebook_sign_in" id="facebook_sign_in" value="facebook_sign_in" class="btn btn--block btn--social btn--facebook">
<img alt="" src="/i/facebook-icon-32.png" width="17" height="32">
Log in with Facebook
</button>
</div>
+ [% END %]
+ [% IF c.config.TWITTER_KEY %]
+ <div class="form-box">
+ <button name="twitter_sign_in" id="twitter_sign_in" value="twitter_sign_in" class="btn btn--block btn--social btn--twitter">
+ <img alt="" src="/i/twitter-icon-32.png" width="17" height="32">
+ Log in with Twitter
+ </button>
+ </div>
+ [% END %]
<div id="js-social-email-hide">
[% END %]
@@ -56,7 +66,7 @@
[% END %]
</div>
-[% IF NOT oauth_need_email AND c.config.FACEBOOK_APP_ID %]
+[% IF NOT oauth_need_email AND (c.config.FACEBOOK_APP_ID OR c.config.TWITTER_KEY) %]
</div>
[% END %]
diff --git a/templates/web/base/report/new/form_user_loggedout.html b/templates/web/base/report/new/form_user_loggedout.html
index 6657c87a1..889834580 100644
--- a/templates/web/base/report/new/form_user_loggedout.html
+++ b/templates/web/base/report/new/form_user_loggedout.html
@@ -1,12 +1,22 @@
-[% IF c.config.FACEBOOK_APP_ID %]
+[% IF c.config.FACEBOOK_APP_ID OR c.config.TWITTER_KEY %]
<h3>[% loc("Now to submit your report&hellip;") %]</h3>
+ [% IF c.config.FACEBOOK_APP_ID %]
<div class="form-box">
<button name="facebook_sign_in" id="facebook_sign_in" value="facebook_sign_in" class="btn btn--block btn--social btn--facebook">
<img alt="" src="/i/facebook-icon-32.png" width="17" height="32">
Log in with Facebook
</button>
</div>
+ [% END %]
+ [% IF c.config.TWITTER_KEY %]
+ <div class="form-box">
+ <button name="twitter_sign_in" id="twitter_sign_in" value="twitter_sign_in" class="btn btn--block btn--social btn--twitter">
+ <img alt="" src="/i/twitter-icon-32.png" width="17" height="32">
+ Log in with Twitter
+ </button>
+ </div>
+ [% END %]
<div id="js-social-email-hide">
[% PROCESS 'report/new/form_user_loggedout_email.html' required = 0 %]
[% ELSE %]
@@ -20,6 +30,6 @@
[% PROCESS 'report/new/form_user_loggedout_by_email.html' %]
</div>
-[% IF c.config.FACEBOOK_APP_ID %]
+[% IF c.config.FACEBOOK_APP_ID OR c.config.TWITTER_KEY %]
</div>
[% END %]
diff --git a/templates/web/base/report/update/form_user_loggedout.html b/templates/web/base/report/update/form_user_loggedout.html
index 4176633f1..fa26eb8f4 100644
--- a/templates/web/base/report/update/form_user_loggedout.html
+++ b/templates/web/base/report/update/form_user_loggedout.html
@@ -1,11 +1,21 @@
-[% IF c.config.FACEBOOK_APP_ID %]
+[% IF c.config.FACEBOOK_APP_ID OR c.config.TWITTER_KEY %]
<h3>[% loc("Now to submit your update&hellip;") %]</h3>
+ [% IF c.config.FACEBOOK_APP_ID %]
<div class="form-box">
<button name="facebook_sign_in" id="facebook_sign_in" value="facebook_sign_in" class="btn btn--block btn--social btn--facebook">
<img alt="" src="/i/facebook-icon-32.png" width="17" height="32">
Log in with Facebook
</button>
</div>
+ [% END %]
+ [% IF c.config.TWITTER_KEY %]
+ <div class="form-box">
+ <button name="twitter_sign_in" id="twitter_sign_in" value="twitter_sign_in" class="btn btn--block btn--social btn--twitter">
+ <img alt="" src="/i/twitter-icon-32.png" width="17" height="32">
+ Log in with Twitter
+ </button>
+ </div>
+ [% END %]
<div id="js-social-email-hide">
[% INCLUDE 'report/update/form_user_loggedout_email.html' required=0 %]
[% ELSE %]
@@ -19,6 +29,6 @@
[% INCLUDE 'report/update/form_user_loggedout_by_email.html' %]
</div>
-[% IF c.config.FACEBOOK_APP_ID %]
+[% IF c.config.FACEBOOK_APP_ID OR c.config.TWITTER_KEY %]
</div>
[% END %]