<div class="opwindow">
	<form name="theform2" id="theform2" method="post" action="{echo \befen\get_url()}">
	<div class="layui-form-item">
		<label class="layui-form-label">原密码</label>
		<input type="password" name="password" id="password" class="layui-input layui-input-inline">
		<div class="layui-form-mid red">* 输入原密码</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">新密码</label>
		<input type="password" name="new_password" id="new_password" class="layui-input layui-input-inline">
		<div class="layui-form-mid red">* 输入新密码</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">确认新密码</label>
		<input type="password" name="renew_password" id="renew_password" class="layui-input layui-input-inline">
		<div class="layui-form-mid red">* 确认新密码</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label"></label>
		<button type="submit" name="submit2" value="submit2" id="submit2" class="layui-btn">修改密码</button>
	</div>
	</form>
</div>
<script type="text/javascript">
$("#submit2").click(function(){
	if($("#password").val() == "") {
		showAlert("请输入原密码!", function(){
			$("#password").focus();
		});
		return false;
	}
	if($("#new_password").val() == "") {
		showAlert("请输入新密码!", function(){
			$("#new_password").focus();
		});
		return false;
	}
	if($("#new_password").val() != $("#renew_password").val()) {
		showAlert("两次密码输入不一致!");
		return false;
	}
	ajaxSubmit(this, "", "#theform2", function(){
		gotourl('{echo url('login/index')}');
	});
});
</script>
