/**
 * 修改密码
 */
$(function(){

	$("#bocjavaForm").validate({
		rules:{
			userPwd:{
				required	: true,
                minlength	: 6,
                maxlength	: 16
			},
			password:{
				required	: true,
                minlength	: 6,
                maxlength	: 16
			},
			passwordconfirm:{
				required	: true,
                minlength	: 6,
                maxlength	: 16,
                equalTo		: "#password"
			}
		},
		onkeyup:false,
		focusCleanup:true,
		submitHandler:function(form){
			//保存
			var userPwd = hex_md5($('#userPwd').val());
			var password = hex_md5($('#password').val());
			App.Ajax.request({
				url 		: Config.ROOT + '/sys/user/updatePwd',
				params		: {
					'userPwd'	: userPwd,
					'password'	: password
				},
				isAutoTip	: false,
				success: function(result){
					MsgBox.alert('修改成功', function(){
						parent.App.Window.shut(window.name);
					});
				}
			});
		}
	});
	
});