From d7b8c821412f5673dcc0f29ac4044071d94a3f4a Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 1 Nov 2010 17:13:42 +0000 Subject: [PATCH] this wraps the input elements used for opac login in an actual form element, with the goal of allowing browsers to save credentials for the site. So far this appears to work for Firefox 3.6.12, but not for Chrome 7.0.517.41, Opera 10.63, nor Safari 5.0.2. IE 8.0.6001.18702 will prompt for saving credentials, but won't actually populate the form on a revisit. Some of this may be due to me using an invalid/expired SSL-cert on my dev box, but I suspect it's really because another page is not being loaded after form submission. Any ideas/suggestions? git-svn-id: svn://svn.open-ils.org/ILS/trunk@18548 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/skin/default/js/sidebar.js | 12 ++-- .../web/opac/skin/default/xml/common/login.xml | 69 +++++++++++----------- 2 files changed, 42 insertions(+), 39 deletions(-) diff --git a/Open-ILS/web/opac/skin/default/js/sidebar.js b/Open-ILS/web/opac/skin/default/js/sidebar.js index 30a2ffe271..80a5f9e41f 100644 --- a/Open-ILS/web/opac/skin/default/js/sidebar.js +++ b/Open-ILS/web/opac/skin/default/js/sidebar.js @@ -157,12 +157,12 @@ function strongPassword(pass, alrt) { function initLogin() { - G.ui.login.button.onclick = loginDance; + G.ui.login.button.onclick = function(evt) { G.ui.login.form.setAttribute('action','javascript:loginDance();'); }; G.ui.login.username.onkeydown = - function(evt) {if(userPressedEnter(evt)) loginDance();}; + function(evt) {if(userPressedEnter(evt)) G.ui.login.form.setAttribute('action','javascript:loginDance();');}; G.ui.login.password.onkeydown = - function(evt) {if(userPressedEnter(evt)) loginDance();}; - + function(evt) {if(userPressedEnter(evt)) G.ui.login.form.setAttribute('action','javascript:loginDance();');}; + // if(loginBoxVisible) { // showCanvas(); // } else { @@ -171,9 +171,9 @@ function initLogin() { // } // loginBoxVisible = !loginBoxVisible; - G.ui.login.cancel.onclick = showCanvas; + G.ui.login.cancel.onclick = function(evt) { G.ui.login.form.setAttribute('action','javascript:showCanvas();'); }; if(findCurrentPage() == MYOPAC) - G.ui.login.cancel.onclick = goHome; + G.ui.login.cancel.onclick = function(evt) { G.ui.login.form.setAttribute('action','javascript:goHome();'); }; } function setSidebarLinks() { diff --git a/Open-ILS/web/opac/skin/default/xml/common/login.xml b/Open-ILS/web/opac/skin/default/xml/common/login.xml index a875410c1d..3199e07800 100644 --- a/Open-ILS/web/opac/skin/default/xml/common/login.xml +++ b/Open-ILS/web/opac/skin/default/xml/common/login.xml @@ -4,6 +4,7 @@