Login page imporvement

This commit is contained in:
Sebastien 2018-11-22 16:05:43 +02:00
parent 0d03c72a1e
commit 95a16610ff
3 changed files with 11 additions and 4 deletions

View File

@ -403,7 +403,7 @@ function search() {
let list = $("#search_result");
let load = $("#search_load");
disableBtn($('#btn_search'));
disableBtn(input_search);
input_search.attr('disabled', 'disabled');
list.removeClass("scale-in");
load.removeClass("hide");
load.addClass("scale-in");
@ -434,7 +434,8 @@ function search() {
load.addClass("hide");
list.addClass("scale-in");
enableBtn($('#btn_search'));
enableBtn(input_search);
input_search.removeAttr("disabled");
input_search.focus();
}).fail( (data)=>{

View File

@ -100,6 +100,7 @@ function disconnected() {
function tryConnection() {
var request = { name: input_name.val(), password: input_psw.val()};
$.ajax({
type: "POST",
@ -175,7 +176,12 @@ function navListeners() {
$('.nav-change-guild').click(function () {
Cookies.remove('guild');
window.location.reload(true);
})
});
$("#login_form").submit(function(e){
e.preventDefault();
tryConnection();
});
}
function getGuild(){

View File

@ -123,7 +123,7 @@
</div>
</div>
<div class="row center" style="margin-bottom: 0px">
<form name="login_form" id="login_form" action="javascript:void(0);" onsubmit="tryConnection()">
<form name="login_form" id="login_form">
<div class="row" style="margin-bottom: 0px">
<div class="input-field col l6 offset-l3 m10 offset-m1 s10 offset-s1">
<i class="material-icons prefix">account_box</i>