prep login script
This commit is contained in:
parent
b9ca8585ea
commit
fcf8d96acb
@ -37,9 +37,35 @@
|
||||
</div>
|
||||
<div class="lifecraft" style="float: right; padding-right: 10px;">
|
||||
<h3>Login</h3>
|
||||
<input type="text" class="form-control input-lg" id="username" placeholder="${user_name}"></br>
|
||||
<input type="password" class="form-control input-lg" id="password" placeholder="${password}"></br>
|
||||
<input type="submit" class="form-control input-lg" id="login" value="Login">
|
||||
<form class="textbox" style="padding:10px" id="login_form">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="text"
|
||||
size="30"
|
||||
style="margin-bottom: 15px;"
|
||||
id="bt_login_user"
|
||||
placeholder="${login_username}"
|
||||
minlength="3" data-validation-minlength-message="${login_username_too_short}"
|
||||
maxlength="16" data-validation-maxlength-message="${login_username_too_long}"
|
||||
required data-validation-required-message="${login_username_required}"/>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input type="password"
|
||||
size="30"
|
||||
style="margin-bottom: 15px;"
|
||||
id="bt_login_password"
|
||||
placeholder="${login_password}"
|
||||
minlength="5" data-validation-minlength-message="${login_password_too_short}"
|
||||
maxlength="16" data-validation-maxlength-message="${login_password_too_long}"
|
||||
required data-validation-required-message="${login_password_required}"/>
|
||||
</div>
|
||||
<div class="help-block"></div>
|
||||
<input type="hidden" />
|
||||
<button class="btn" style="clear: left; height: 32px; font-size: 13px;"
|
||||
type="submit"
|
||||
id="login_submit">${login_login}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
@ -14,6 +14,22 @@ var wizard_state = '';
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#login_form input").not("[type=submit]").jqBootstrapValidation({
|
||||
preventSubmit: true,
|
||||
submitError: function($form, event, errors) {},
|
||||
submitSuccess: function($form, event){
|
||||
$.get('./api.php?call=account&action=login&username='+$('#bt_login_user').val()+'&password_sha='+$.sha1($('#bt_login_password').val())+'&password_md5='+$.md5($('#bt_login_password').val()), function (data) {
|
||||
if(data == 1){
|
||||
$('.help-block').html("Login successfull.</br>");
|
||||
location.reload(true);
|
||||
} else {
|
||||
$('.help-block').html("Login not successfull.</br> User & Password combination wrong.")
|
||||
}
|
||||
});
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
register_menu ();
|
||||
|
||||
$('#back a').click(function() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user