diff --git a/themes/jquerymobile/templates/Auth/AbstractBase/login.phtml b/themes/jquerymobile/templates/Auth/AbstractBase/login.phtml index a979db8146b66db063d74e07c020105b3e4ec5e3..e41194cc5283f1008fca6071241475d93c82f683 100644 --- a/themes/jquerymobile/templates/Auth/AbstractBase/login.phtml +++ b/themes/jquerymobile/templates/Auth/AbstractBase/login.phtml @@ -1,4 +1,20 @@ -<label for="login_username"><?=$this->transEsc('Username')?>:</label> -<input id="login_username" type="text" name="username" value="<?=$this->escapeHtml($this->request->get('username'))?>"/> -<label for="login_password"><?=$this->transEsc('Password')?>:</label> -<input id="login_password" type="password" name="password"/> +<? $account = $this->auth()->getManager(); ?> +<h3><?=$this->transEsc('Login')?></h3> +<?=$this->flashmessages()?> +<? $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" data-ajax="false"> + <input type="hidden" name="auth_method" value="<?=$this->auth()->getActiveAuthMethod()?>" /> + <div data-role="fieldcontain"> + <?=$this->auth()->getLoginFields()?> + </div> + <div data-role="fieldcontain"> + <input type="submit" name="processLogin" value="<?=$this->transEsc('Login')?>"/> + </div> + </form> + <? if ($account->supportsCreation()): ?> + <a rel="external" data-role="button" class="new_account" href="<?=$this->url('myresearch-account')?>?auth_method=<?=$this->auth()->getActiveAuthMethod()?>"><?=$this->transEsc('Create New Account')?></a> + <? endif; ?> +<? else: ?> + <a rel="external" data-role="button" href="<?=$this->escapeHtml($sessionInitiator)?>"><?=$this->transEsc("Institutional Login")?></a> +<? endif; ?> diff --git a/themes/jquerymobile/templates/Auth/AbstractBase/logindesc.phtml b/themes/jquerymobile/templates/Auth/AbstractBase/logindesc.phtml new file mode 100644 index 0000000000000000000000000000000000000000..9f4088f8d270f09bc536fa26d8dd35282a49294a --- /dev/null +++ b/themes/jquerymobile/templates/Auth/AbstractBase/logindesc.phtml @@ -0,0 +1 @@ +<h3><?=$this->transEsc('Login')?></h3> \ No newline at end of file diff --git a/themes/jquerymobile/templates/Auth/AbstractBase/loginfields.phtml b/themes/jquerymobile/templates/Auth/AbstractBase/loginfields.phtml new file mode 100644 index 0000000000000000000000000000000000000000..a979db8146b66db063d74e07c020105b3e4ec5e3 --- /dev/null +++ b/themes/jquerymobile/templates/Auth/AbstractBase/loginfields.phtml @@ -0,0 +1,4 @@ +<label for="login_username"><?=$this->transEsc('Username')?>:</label> +<input id="login_username" type="text" name="username" value="<?=$this->escapeHtml($this->request->get('username'))?>"/> +<label for="login_password"><?=$this->transEsc('Password')?>:</label> +<input id="login_password" type="password" name="password"/> diff --git a/themes/jquerymobile/templates/Auth/CAS/logindesc.phtml b/themes/jquerymobile/templates/Auth/CAS/logindesc.phtml new file mode 100644 index 0000000000000000000000000000000000000000..fab51a92a722fa166127618844ea2ac4bdf3c765 --- /dev/null +++ b/themes/jquerymobile/templates/Auth/CAS/logindesc.phtml @@ -0,0 +1,2 @@ +<h3><?=$this->transEsc('Institutional Login')?></h3> +<p><?=$this->transEsc('institutional_login_desc')?></p> \ No newline at end of file diff --git a/themes/jquerymobile/templates/Auth/ChoiceAuth/login.phtml b/themes/jquerymobile/templates/Auth/ChoiceAuth/login.phtml new file mode 100644 index 0000000000000000000000000000000000000000..714c3dd7c5cf428c32c0ee811dcf6d19e9ee8c37 --- /dev/null +++ b/themes/jquerymobile/templates/Auth/ChoiceAuth/login.phtml @@ -0,0 +1,13 @@ +<p><?=$this->transEsc('choose_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() ?> + <?=$this->auth()->getLogin() ?> + <? $this->auth()->setActiveAuthClass('ChoiceAuth') ?> + </div> +<? endforeach ?> +</div> +<div class="clearer"></div> + diff --git a/themes/jquerymobile/templates/Auth/Database/logindesc.phtml b/themes/jquerymobile/templates/Auth/Database/logindesc.phtml new file mode 100644 index 0000000000000000000000000000000000000000..10d39c2498b61e3e4b59cd9f9283eb0b6e3d1b34 --- /dev/null +++ b/themes/jquerymobile/templates/Auth/Database/logindesc.phtml @@ -0,0 +1,2 @@ +<h3><?=$this->transEsc('Local Login')?></h3> +<p><?=$this->transEsc('local_login_desc')?></p> \ No newline at end of file diff --git a/themes/jquerymobile/templates/Auth/ILS/logindesc.phtml b/themes/jquerymobile/templates/Auth/ILS/logindesc.phtml new file mode 100644 index 0000000000000000000000000000000000000000..73ac1374e787e6fcedcf9ed95a8293f66808ea10 --- /dev/null +++ b/themes/jquerymobile/templates/Auth/ILS/logindesc.phtml @@ -0,0 +1,2 @@ +<h3><?=$this->transEsc('Catalog Login')?></h3> +<p><?=$this->transEsc('catalog_login_desc')?></p> \ No newline at end of file diff --git a/themes/jquerymobile/templates/Auth/LDAP/logindesc.phtml b/themes/jquerymobile/templates/Auth/LDAP/logindesc.phtml new file mode 100644 index 0000000000000000000000000000000000000000..fab51a92a722fa166127618844ea2ac4bdf3c765 --- /dev/null +++ b/themes/jquerymobile/templates/Auth/LDAP/logindesc.phtml @@ -0,0 +1,2 @@ +<h3><?=$this->transEsc('Institutional Login')?></h3> +<p><?=$this->transEsc('institutional_login_desc')?></p> \ No newline at end of file diff --git a/themes/jquerymobile/templates/Auth/Shibboleth/login.phtml b/themes/jquerymobile/templates/Auth/Shibboleth/login.phtml new file mode 100644 index 0000000000000000000000000000000000000000..94f44ef3d93574b3e3bcc672e4abbf1042b762f4 --- /dev/null +++ b/themes/jquerymobile/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/jquerymobile/templates/Auth/Shibboleth/logindesc.phtml b/themes/jquerymobile/templates/Auth/Shibboleth/logindesc.phtml new file mode 100644 index 0000000000000000000000000000000000000000..fab51a92a722fa166127618844ea2ac4bdf3c765 --- /dev/null +++ b/themes/jquerymobile/templates/Auth/Shibboleth/logindesc.phtml @@ -0,0 +1,2 @@ +<h3><?=$this->transEsc('Institutional Login')?></h3> +<p><?=$this->transEsc('institutional_login_desc')?></p> \ No newline at end of file diff --git a/themes/jquerymobile/templates/myresearch/login.phtml b/themes/jquerymobile/templates/myresearch/login.phtml index 9bfee6ec31001dfd8bde7eb8dd8149c67c0bbc11..405a0f78c72329ce2c40b69bfc5ee76e6796e62d 100644 --- a/themes/jquerymobile/templates/myresearch/login.phtml +++ b/themes/jquerymobile/templates/myresearch/login.phtml @@ -23,24 +23,7 @@ <? endif; ?> <? if (!$hideLogin): ?> - <h3><?=$this->transEsc('Login')?></h3> - <?=$this->flashmessages()?> - <? $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" data-ajax="false"> - <div data-role="fieldcontain"> - <?=$this->auth()->getLoginFields()?> - </div> - <div data-role="fieldcontain"> - <input type="submit" name="processLogin" value="<?=$this->transEsc('Login')?>"/> - </div> - </form> - <? if ($account->supportsCreation()): ?> - <a rel="external" data-role="button" class="new_account" href="<?=$this->url('myresearch-account')?>"><?=$this->transEsc('Create New Account')?></a> - <? endif; ?> - <? else: ?> - <a rel="external" data-role="button" href="<?=$this->escapeHtml($sessionInitiator)?>"><?=$this->transEsc("Institutional Login")?></a> - <? endif; ?> + <?=$this->auth()->getLogin()?> <? endif; ?> </div> <?=$this->mobileMenu()->footer()?>