knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmc...@apache.org
Subject [2/3] knox git commit: KNOX-707 - Enter Key within KnoxSSO Default IDP Form does not Submit
Date Mon, 04 Apr 2016 18:43:31 GMT
KNOX-707 - Enter Key within KnoxSSO Default IDP Form does not Submit


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/69fac2b6
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/69fac2b6
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/69fac2b6

Branch: refs/heads/v0.9.0
Commit: 69fac2b6d41193678fb33f611f2ed96ca86db050
Parents: 53e5163
Author: Larry McCay <lmccay@hortonworks.com>
Authored: Mon Apr 4 14:32:57 2016 -0400
Committer: Larry McCay <lmccay@hortonworks.com>
Committed: Mon Apr 4 14:42:45 2016 -0400

----------------------------------------------------------------------
 .../resources/applications/knoxauth/app/js/knoxauth.js  |  6 ++++++
 .../main/resources/applications/knoxauth/app/login.html | 12 +++---------
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/69fac2b6/gateway-applications/src/main/resources/applications/knoxauth/app/js/knoxauth.js
----------------------------------------------------------------------
diff --git a/gateway-applications/src/main/resources/applications/knoxauth/app/js/knoxauth.js
b/gateway-applications/src/main/resources/applications/knoxauth/app/js/knoxauth.js
index 7197894..6f91420 100644
--- a/gateway-applications/src/main/resources/applications/knoxauth/app/js/knoxauth.js
+++ b/gateway-applications/src/main/resources/applications/knoxauth/app/js/knoxauth.js
@@ -38,6 +38,12 @@ function redirect(redirectUrl) {
   catch(e) { window.location = redirectUrl; }
 }
 
+var keypressed = function(event) {
+    if (event.keyCode == 13) {
+        login();
+    }
+}
+
 var login = function() {
     var form = document.forms[0];
     var username = form.username.value;

http://git-wip-us.apache.org/repos/asf/knox/blob/69fac2b6/gateway-applications/src/main/resources/applications/knoxauth/app/login.html
----------------------------------------------------------------------
diff --git a/gateway-applications/src/main/resources/applications/knoxauth/app/login.html
b/gateway-applications/src/main/resources/applications/knoxauth/app/login.html
index 08e4d67..dd486e1 100644
--- a/gateway-applications/src/main/resources/applications/knoxauth/app/login.html
+++ b/gateway-applications/src/main/resources/applications/knoxauth/app/login.html
@@ -47,9 +47,6 @@
 
 	</head>
 	<body class="login" style="">
-		<!--%
-			response.setHeader("X-Frame-Options", "DENY");
-		%-->
 		<!-- Page content
 		================================================== -->
 		<section id="signin-container" style="margin-top: 4.5px;">
@@ -60,17 +57,14 @@
 				<fieldset>
 					<div class="fields">
 						<label><i class="icon-user"></i> Username:</label>
-						<input type="text" name="username" id="username" tabindex="1" autofocus>
+						<input type="text" name="username" id="username" tabindex="1" onkeypress=keypressed(event)
autofocus>
 						<label><i class="icon-lock"></i> Password:</label>	
-						<input type="password" name="password" id="password" tabindex="2" autocomplete="off">
+						<input type="password" name="password" id="password" tabindex="2" autocomplete="off"
onkeypress=keypressed(event)>
 					</div>
 					<span id="errorBox" class="help-inline" style="color:white;display:none;"><span
class="errorMsg"></span>
 						<i class="icon-warning-sign" style="color:#ae2817;"></i>
 					</span>
-					<span id="errorBoxUnsynced" class="help-inline" style="color:white;display:none;">User
is not available in HDP Admin Tool. Please contact your Administrator.
-						<i class="icon-warning-sign" style="color:#ae2817;"></i>
-					</span>
-					<button type="button" class="btn btn-primary btn-block" id="signIn" tabindex="4"
onkeypress="return login()" onclick="login();">
+					<button type="button" class="btn btn-primary btn-block" id="signIn" tabindex="4"
onkeypress="keypressed(event)" onclick="login();">
 						Sign In
 						<i id="signInLoading" class="icon-spinner icon-spin pull-right icon-sign-in"></i>
 					</button>


Mime
View raw message