diff --git a/themes/bootprint/css/style.css b/themes/bootprint/css/style.css index 958c8e1b7349933218727ef9c7bb0ed0beacad65..66588ba559aea7d88e98126408b4eba1fca24439 100644 --- a/themes/bootprint/css/style.css +++ b/themes/bootprint/css/style.css @@ -155,4 +155,23 @@ select, .btn:not(.btn-link){vertical-align:top} #download-button:active {background:linear-gradient(to bottom, #508033 0%,#72A255 100%)} .inspector_container {margin-top:6px} .siblings-form {margin:3px auto} -.table.details {font-size:10px;border-bottom:1px solid #DDD} \ No newline at end of file +.table.details {font-size:10px;border-bottom:1px solid #DDD} + +/* --- ChoiceAuth --- */ +.authmethod0 { + width:47%; + float:left; + padding:1%; + border-right:1px solid rgb(204, 204, 204); +} +.authmethod1 { + width:47%; + float:left; + padding:1%; + border-left:1px solid rgb(204, 204, 204); + margin:-1px; /* keep the borders on top of one another; longest one will win */ +} +#authcontainer { + float:left; + width:100%; +} diff --git a/themes/bootstrap/css/styles.css b/themes/bootstrap/css/styles.css new file mode 100644 index 0000000000000000000000000000000000000000..60c1dfbd52baf7fcd1214ef06058509a0126da91 --- /dev/null +++ b/themes/bootstrap/css/styles.css @@ -0,0 +1 @@ +body {margin-top:1em} \ No newline at end of file diff --git a/themes/bootstrap/templates/Auth/AbstractBase/login.phtml b/themes/bootstrap/templates/Auth/AbstractBase/login.phtml index ef6f561fcf74a69f8b0e14dddb89d68ed5660d09..5b4bfeaa72a048c599236c153aa792061da640e1 100644 --- a/themes/bootstrap/templates/Auth/AbstractBase/login.phtml +++ b/themes/bootstrap/templates/Auth/AbstractBase/login.phtml @@ -1,12 +1,18 @@ -<div class="control-group"> - <label class="control-label" for="login_username"><?=$this->transEsc('Username')?>:</label> - <div class="controls"> - <input id="login_username" type="text" name="username" value="<?=$this->escapeHtml($this->request->get('username'))?>"/> - </div> -</div> -<div class="control-group"> - <label class="control-label" for="login_password"><?=$this->transEsc('Password')?>:</label> - <div class="controls"> - <input id="login_password" type="password" name="password"/> - </div> -</div> \ No newline at end of file +<? $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" class="form-horizontal" action="<?=$this->url('myresearch-home')?>" name="loginForm" id="loginForm"> + <?=$this->auth()->getLoginFields()?> + <input type="hidden" name="auth_method" value="<?=$this->auth()->getActiveAuthMethod()?>"> + <div class="control-group"> + <div class="controls"> + <input class="btn btn-primary" type="submit" name="processLogin" value="Login"> + <? if ($account->supportsCreation()): ?> + <a class="btn btn-link" href="/digitaldev/MyResearch/Account">Create New Account</a> + <? endif; ?> + </div> + </div> + </form> +<? else: ?> + <a href="<?=$this->escapeHtml($sessionInitiator)?>"><?=$this->transEsc("Institutional Login")?></a> +<? endif; ?> diff --git a/themes/bootstrap/templates/Auth/AbstractBase/loginfields.phtml b/themes/bootstrap/templates/Auth/AbstractBase/loginfields.phtml new file mode 100644 index 0000000000000000000000000000000000000000..ef6f561fcf74a69f8b0e14dddb89d68ed5660d09 --- /dev/null +++ b/themes/bootstrap/templates/Auth/AbstractBase/loginfields.phtml @@ -0,0 +1,12 @@ +<div class="control-group"> + <label class="control-label" for="login_username"><?=$this->transEsc('Username')?>:</label> + <div class="controls"> + <input id="login_username" type="text" name="username" value="<?=$this->escapeHtml($this->request->get('username'))?>"/> + </div> +</div> +<div class="control-group"> + <label class="control-label" for="login_password"><?=$this->transEsc('Password')?>:</label> + <div class="controls"> + <input id="login_password" type="password" name="password"/> + </div> +</div> \ No newline at end of file diff --git a/themes/bootstrap/templates/Auth/ChoiceAuth/login.phtml b/themes/bootstrap/templates/Auth/ChoiceAuth/login.phtml new file mode 100644 index 0000000000000000000000000000000000000000..36740f43f2118f8da1bf6ef9c7af60fd87c1c088 --- /dev/null +++ b/themes/bootstrap/templates/Auth/ChoiceAuth/login.phtml @@ -0,0 +1,11 @@ +<p>Please choose a login method:</p> +<div id="authcontainer"> +<? foreach ($this->auth()->getManager()->getAuthClasses() as $loop=>$class):?> + <div class="authmethod<?=$loop?>"> + <? $this->auth()->setActiveAuthClass($class) ?> + <?=$this->auth()->getLoginDesc($method) ?> + <?=$this->auth()->getLogin($method) ?> + <? $this->auth()->setActiveAuthClass('ChoiceAuth') ?> + </div> +<? endforeach ?> +</div> \ No newline at end of file diff --git a/themes/bootstrap/templates/Auth/Database/logindesc.phtml b/themes/bootstrap/templates/Auth/Database/logindesc.phtml new file mode 100644 index 0000000000000000000000000000000000000000..edb066d19678e6eb76adac37edda5c182b1df471 --- /dev/null +++ b/themes/bootstrap/templates/Auth/Database/logindesc.phtml @@ -0,0 +1,2 @@ +<h3>Local login</h3> +<p>Enter the username and password you created for this site.</p> diff --git a/themes/bootstrap/templates/Auth/Shibboleth/login.phtml b/themes/bootstrap/templates/Auth/Shibboleth/login.phtml new file mode 100644 index 0000000000000000000000000000000000000000..94f44ef3d93574b3e3bcc672e4abbf1042b762f4 --- /dev/null +++ b/themes/bootstrap/templates/Auth/Shibboleth/login.phtml @@ -0,0 +1,3 @@ +<? $account = $this->auth()->getManager(); ?> +<? $sessionInitiator = $account->getSessionInitiator($this->serverUrl($this->url('myresearch-home'))); ?> +<a href="<?=$this->escapeHtml($sessionInitiator)?>"><?=$this->transEsc("Institutional Login")?></a> diff --git a/themes/bootstrap/templates/Auth/Shibboleth/logindesc.phtml b/themes/bootstrap/templates/Auth/Shibboleth/logindesc.phtml new file mode 100644 index 0000000000000000000000000000000000000000..6f36b6298d3e69da457844fe9ab2242954c61829 --- /dev/null +++ b/themes/bootstrap/templates/Auth/Shibboleth/logindesc.phtml @@ -0,0 +1,2 @@ +<h3>Institutional login</h3> +<p>Enter your campus-wide username and password.</p> diff --git a/themes/bootstrap/templates/myresearch/login.phtml b/themes/bootstrap/templates/myresearch/login.phtml index b9299dcc5028e6525522161ed3180fa699d49282..70a305930a5864a24d8b6121ef68232fa61149c5 100644 --- a/themes/bootstrap/templates/myresearch/login.phtml +++ b/themes/bootstrap/templates/myresearch/login.phtml @@ -28,20 +28,5 @@ <? if ($hideLogin): ?> <div class="alert alert-error"><?=$this->transEsc('login_disabled')?></div> <? else: ?> - <? $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" class="form-horizontal"> - <?=$this->auth()->getLoginFields()?> - <div class="control-group"> - <div class="controls"> - <input class="btn btn-primary" type="submit" name="processLogin" value="<?=$this->transEsc('Login')?>"/> - <? if ($account->supportsCreation()): ?> - <a class="btn btn-link" href="<?=$this->url('myresearch-account')?>"><?=$this->transEsc('Create New Account')?></a> - <? endif; ?> - </div> - </div> - </form> - <? else: ?> - <a href="<?=$this->escapeHtml($sessionInitiator)?>"><?=$this->transEsc("Institutional Login")?></a> - <? endif; ?> + <?=$this->auth()->getLogin()?> <? endif; ?>