[opw-web] Make the login form reflect enabled providers



commit 40f8fb224333ac40d4d0bee828f5aa882bc37c02
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Mar 10 11:10:54 2014 -0400

    Make the login form reflect enabled providers

 modules/mod_login.php                  |    3 +++
 skins/easterngreen/html/tpl_login.html |   14 +++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/modules/mod_login.php b/modules/mod_login.php
index 0ec4d01..79b0a86 100644
--- a/modules/mod_login.php
+++ b/modules/mod_login.php
@@ -86,6 +86,9 @@ if ($login_openid) {
 $skin->assign(array(
     'error_message'         => isset($error_message) ? $error_message : '',
     'error_visibility'      => $skin->visibility(isset($error_message)),
+    'openid_visibility'     => $skin->visibility($config->auth_openid_enabled),
+    'facebook_visibility'   => $skin->visibility($config->auth_facebook_enabled),
+    'google_visibility'     => $skin->visibility($config->auth_google_enabled)
 ));
 
 // Assign the module data and title
diff --git a/skins/easterngreen/html/tpl_login.html b/skins/easterngreen/html/tpl_login.html
index e7de0bc..8ee501e 100644
--- a/skins/easterngreen/html/tpl_login.html
+++ b/skins/easterngreen/html/tpl_login.html
@@ -6,10 +6,10 @@
     [[error_message]]
 </div>
 
-<h4>{{login_with_openid}}</h4>
+<h4 class="[[openid_visibility]]">{{login_with_openid}}</h4>
 <br />
 
-<div class="control-group">
+<div class="control-group [[openid_visibility]]">
     <label class="control-label">{{openid}}</label>
     <div class="controls">
         <input type="text" name="username" class="input-xlarge" />
@@ -25,22 +25,22 @@
 </div>
 -->
 
-<div class="form-actions">
+<div class="form-actions [[openid_visibility]]">
     <button type="submit" name="login_openid" class="btn btn-primary">{{log_in}}</button>
     <button type="reset" class="btn">{{reset}}</button>
 </div>
 
-<h4>{{login_with_google}}</h4>
+<h4 class="[[google_visibility]]">{{login_with_google}}</h4>
 <br />
 
-<div class="form-actions">
+<div class="form-actions [[google_visibility]]">
     <button type="submit" name="login_google" class="btn btn-primary">{{log_in}}</button>
 </div>
 
-<h4>{{login_with_facebook}}</h4>
+<h4 class="[[facebook_visibility]]">{{login_with_facebook}}</h4>
 <br />
 
-<div class="form-actions">
+<div class="form-actions [[facebook_visibility]]">
     <button type="submit" name="login_facebook" class="btn btn-primary">{{log_in}}</button>
 </div>
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]