mirror of
https://github.com/shouptech/tempgopher.git
synced 2026-02-03 16:49:42 +00:00
Make enter on the login page do things
This commit is contained in:
parent
5fd5acc0cc
commit
595751d5d4
2 changed files with 14 additions and 19 deletions
|
|
@ -6,12 +6,5 @@ function processLogin() {
|
||||||
window.location.replace(jsconfig.baseurl + "/app/");
|
window.location.replace(jsconfig.baseurl + "/app/");
|
||||||
};
|
};
|
||||||
|
|
||||||
function addClickToLogin() {
|
|
||||||
$("#loginButton").click(processLogin);
|
|
||||||
};
|
|
||||||
|
|
||||||
// If the login page is displayed, we need to remvoe any existing auth tokens
|
// If the login page is displayed, we need to remvoe any existing auth tokens
|
||||||
window.localStorage.removeItem("authtoken");
|
window.localStorage.removeItem("authtoken");
|
||||||
|
|
||||||
// Set the click function for the login button
|
|
||||||
$(document).ready(addClickToLogin);
|
|
||||||
|
|
|
||||||
|
|
@ -18,18 +18,20 @@
|
||||||
<div class="four columns offset-by-four"><h3 style="text-align: center">Login</h3></div>
|
<div class="four columns offset-by-four"><h3 style="text-align: center">Login</h3></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<form onsubmit="processLogin(); return false;">
|
||||||
<div class="row">
|
<div class="container">
|
||||||
<div class="two columns offset-by-two" style="text-align: right">Username:</div>
|
<div class="row">
|
||||||
<div class="four columns"><input type="text" style="width: 100%" id="loginName" /></div>
|
<div class="two columns offset-by-two" style="text-align: right">Username:</div>
|
||||||
|
<div class="four columns"><input type="text" style="width: 100%" id="loginName" /></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="two columns offset-by-two" style="text-align: right">Password:</div>
|
||||||
|
<div class="four columns"><input type="password" style="width: 100%" id="loginPassword" /></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="four columns offset-by-four"><button type="submit" id="loginButton" style="width: 100%" class="button button-primary">Login</button></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
</form>
|
||||||
<div class="two columns offset-by-two" style="text-align: right">Password:</div>
|
|
||||||
<div class="four columns"><input type="password" style="width: 100%" id="loginPassword" /></div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="four columns offset-by-four"><button type="submit" id="loginButton" style="width: 100%" class="button button-primary">Login</button></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue