From e41ff0c360744e0d33417b31fdb5eec7d759826a Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Tue, 3 Dec 2013 12:33:49 -0500
Subject: [PATCH] Style fixes.

---
 .../Controller/MyResearchController.php       |  4 +-
 .../src/VuFind/View/Helper/Root/Auth.php      | 12 ++++--
 themes/blueprint/css/styles.css               |  4 +-
 .../templates/Auth/AbstractBase/login.phtml   | 38 +++++++++----------
 themes/bootstrap/css/styles.css               |  1 -
 5 files changed, 31 insertions(+), 28 deletions(-)
 delete mode 100644 themes/bootstrap/css/styles.css

diff --git a/module/VuFind/src/VuFind/Controller/MyResearchController.php b/module/VuFind/src/VuFind/Controller/MyResearchController.php
index 7b3d24ae04e..c0dcb7d37c4 100644
--- a/module/VuFind/src/VuFind/Controller/MyResearchController.php
+++ b/module/VuFind/src/VuFind/Controller/MyResearchController.php
@@ -117,7 +117,9 @@ class MyResearchController extends AbstractBase
         //   Force to post.
         $method = trim($this->params()->fromQuery('auth_method'));
         if ($method) {
-            $this->getRequest()->setPost($this->getRequest()->getPost()->set('auth_method', $method));
+            $this->getRequest()->setPost(
+                $this->getRequest()->getPost()->set('auth_method', $method)
+            );
         }
         // Process login request, if necessary (either because a form has been
         // submitted or because we're using an external login provider):
diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Auth.php b/module/VuFind/src/VuFind/View/Helper/Root/Auth.php
index 547b3859ca4..9c852d6632c 100644
--- a/module/VuFind/src/VuFind/View/Helper/Root/Auth.php
+++ b/module/VuFind/src/VuFind/View/Helper/Root/Auth.php
@@ -40,7 +40,8 @@ use Zend\View\Exception\RuntimeException;
 class Auth extends \Zend\View\Helper\AbstractHelper
 {
     /**
-     * Active auth class (used for auth methods that allow more than one type of authentication)
+     * Active auth class (used for auth methods that allow more than one type
+     * of authentication)
      *
      * @var string
      */
@@ -179,8 +180,11 @@ class Auth extends \Zend\View\Helper\AbstractHelper
      * Setter
      *
      * @param string $classname Class to use in rendering
+     *
+     * @return void
      */
-    public function setActiveAuthClass($classname) {
+    public function setActiveAuthClass($classname)
+    {
         $this->activeAuthClass = $classname;
         $this->getManager()->setActiveAuthClass($this->getBriefClass($classname));
     }
@@ -214,11 +218,11 @@ class Auth extends \Zend\View\Helper\AbstractHelper
     /**
      * Helper to grab the end of the class name
      *
-     * @param string $className
+     * @param string $className Class name to abbreviate
      *
      * @return string
      */
-    protected function getBriefClass($className) 
+    protected function getBriefClass($className)
     {
         $classParts = explode('\\', $className);
         return array_pop($classParts);
diff --git a/themes/blueprint/css/styles.css b/themes/blueprint/css/styles.css
index 6545163e2fa..8b44022e704 100644
--- a/themes/blueprint/css/styles.css
+++ b/themes/blueprint/css/styles.css
@@ -2251,7 +2251,6 @@ div.handle {
     border-top: 1px solid #eee;
 }
 
-
 .authmethod0 {
   width:47%;
   float:left;
@@ -2270,5 +2269,4 @@ div.handle {
 #authcontainer {
   float:left;
   width:100%;
-}
-
+}
\ No newline at end of file
diff --git a/themes/blueprint/templates/Auth/AbstractBase/login.phtml b/themes/blueprint/templates/Auth/AbstractBase/login.phtml
index de95c83fbaf..30df536ea06 100644
--- a/themes/blueprint/templates/Auth/AbstractBase/login.phtml
+++ b/themes/blueprint/templates/Auth/AbstractBase/login.phtml
@@ -1,20 +1,20 @@
-  <? $account = $this->auth()->getManager(); ?>
-  <? $sessionInitiator = $account->getSessionInitiator($this->serverUrl($this->url('myresearch-home'))); ?>
-  <? if (!$sessionInitiator): // display default login form if no login URL provided ?>
-    <form method="post" action="<?=$this->url('myresearch-home')?>" name="loginForm" id="loginForm">
-      <?=$this->auth()->getLoginFields()?>
-      <input type="hidden" name="auth_method" value="<?=$this->auth()->getActiveAuthMethod()?>">
-      <input class="push-2 button" type="submit" name="processLogin" value="<?=$this->transEsc('Login')?>"/>
-      <div class="clear"></div>
-    </form>
-    <?
-      // Set up form validation:
-      $initJs = '$(document).ready(function() { $(\'#loginForm\').validate(); });';
-      echo $this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $initJs, 'SET');
-    ?>
-    <? if ($account->supportsCreation()): ?>
-      <a class="new_account" href="<?=$this->url('myresearch-account')?>?auth_method=<?=$this->auth()->getActiveAuthMethod()?>"><?=$this->transEsc('Create New Account')?></a>
-    <? endif; ?>
-  <? else: ?>
-    <a href="<?=$this->escapeHtml($sessionInitiator)?>"><?=$this->transEsc("Institutional Login")?></a>
+<? $account = $this->auth()->getManager(); ?>
+<? $sessionInitiator = $account->getSessionInitiator($this->serverUrl($this->url('myresearch-home'))); ?>
+<? if (!$sessionInitiator): // display default login form if no login URL provided ?>
+  <form method="post" action="<?=$this->url('myresearch-home')?>" name="loginForm" id="loginForm">
+    <?=$this->auth()->getLoginFields()?>
+    <input type="hidden" name="auth_method" value="<?=$this->auth()->getActiveAuthMethod()?>">
+    <input class="push-2 button" type="submit" name="processLogin" value="<?=$this->transEsc('Login')?>"/>
+    <div class="clear"></div>
+  </form>
+  <?
+    // Set up form validation:
+    $initJs = '$(document).ready(function() { $(\'#loginForm\').validate(); });';
+    echo $this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $initJs, 'SET');
+  ?>
+  <? if ($account->supportsCreation()): ?>
+    <a class="new_account" href="<?=$this->url('myresearch-account')?>?auth_method=<?=$this->auth()->getActiveAuthMethod()?>"><?=$this->transEsc('Create New Account')?></a>
   <? endif; ?>
+<? else: ?>
+  <a href="<?=$this->escapeHtml($sessionInitiator)?>"><?=$this->transEsc("Institutional Login")?></a>
+<? endif; ?>
diff --git a/themes/bootstrap/css/styles.css b/themes/bootstrap/css/styles.css
deleted file mode 100644
index 60c1dfbd52b..00000000000
--- a/themes/bootstrap/css/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-body {margin-top:1em}
\ No newline at end of file
-- 
GitLab