Add user control panel and ability to change own password
This commit is contained in:
@@ -8,6 +8,32 @@ var sb = {
|
||||
|
||||
init: function() {
|
||||
$('.alert-data').alert();
|
||||
},
|
||||
|
||||
usercp: {
|
||||
|
||||
init: function() {
|
||||
$('#usercp_newpassword,#usercp_confirmpassword').bind('keyup', sb.usercp.checkPassword);
|
||||
|
||||
},
|
||||
|
||||
checkPassword: function() {
|
||||
password = $('#usercp_newpassword');
|
||||
confirm = $('#usercp_confirmpassword');
|
||||
|
||||
confirm_container = confirm.parent().parent();
|
||||
|
||||
if (password.val() == confirm.val()) {
|
||||
console.log("passwords match");
|
||||
confirm_container.removeClass('error').addClass('success');
|
||||
$('#usercp_confirmpassword_help').hide();
|
||||
} else {
|
||||
console.log("passwords do not match");
|
||||
confirm_container.addClass('error').removeClass('success');
|
||||
$('#usercp_confirmpassword_help').show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user