<script type="text/javascript">
	$(window).load(function () {
		//验证表单
		$("#messformsave").espcms_formvalidation();
	});
</script>
<div class="panel-body">
	{%if $upbid>0%}
	<div class="section-divider mb40"><span>回复留言</span></div>
	{%else%}
	<div class="section-divider mb40"><span>提交留言</span></div>
	{%/if%}
	<form name="messformsave" id="messformsave" method="post" class="form-horizontal admin-form" action="{%$formlink.save%}">
		<input type="hidden" name="tokenname" value="{%$tokenkey.token_name%}"/>
		<input type="hidden" name="tokenkey" value="{%$tokenkey.token_key%}"/>
		<input type="hidden" name="btid" value="{%$type_read.btid%}"/>
		{%if $upbid>0%}
		<input type="hidden" name="upbid" value="{%$upbid%}"/>
		<input type="hidden" name="addtype" value="readdsave"/>
		{%/if%}
		<div class="form-group">
			<label class="col-sm-2 control-label">标题</label>
			<div class="col-sm-9">
				<input type="text" class="form-control" name="title" id="title" value="{%$retitle%}" data-validation-minlength="2" data-validation-maxlength="100" placeholder="请填写不大于100个字符的中英文字符" title="请填写不大于100个字符的中英文字符" data-validation-msg="抱歉：标题输入错误，请返回重新输入"/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">姓名</label>
			<div class="col-sm-9">
				<input type="text" class="form-control" name="addname" id="addname" value="{%$member.username%}" data-validation-minlength="2" data-validation-maxlength="60" placeholder="请输入您的姓名，长度：2-50个字符" title="请输入您的姓名，长度：2-50个字符" data-validation-msg="抱歉，姓名输入错误，长度：2-50个字符"/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">E-mail</label>
			<div class="col-sm-9">
				<input type="text" name="email" id="email" class="form-control" value="{%$member.email%}" data-validation="^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$"  placeholder="请输入E-mail" title="请输入E-mail" data-validation-msg="抱歉：E-mail输入错误，请重新输入！"/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">手机</label>
			<div class="col-sm-9">
				<input type="text" name="mobile" id="mobile" value="{%$member.mobile%}" class="form-control" data-validation="^1[\d]{10}$"  placeholder="请输入11位手机号" title="请输入11位手机号" data-validation-msg="抱歉：手机号输入错误，请重新输入！" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">内容</label>
			<div class="col-sm-9">
				<textarea name="content" class="form-control" style="width:100%;height:250px" id="content" title="请详细填写留言内容" placeholder="请详细填写留言内容" data-validation-minlength="10"  data-validation-maxlength="5000" data-validation-msg="抱歉，留言内容不能为空，请返回重新输入"></textarea>
			</div>
		</div>
		{%if $type_read.isseccode==1%}
		<div class="form-group">
			<label class="col-sm-2 control-label">验证码</label>
			<div class="col-sm-9">
				<div class="col-sm-6 col-md-6 col-mm-6 p0">
					<input type="text" name="seccode" class="form-control" style="text-transform: uppercase;" id="seccode" data-validation="^[A-Za-z]{4}$" placeholder="请输入4位英文字符的验证码" title="请输入4位英文字符的验证码" maxlength="4" data-validation-msg="错误：验证码输入错误，请输入4位英文字符的验证码">
				</div>
				<div class="col-sm-6 col-md-6 col-mm-6 pl0">
					<img title="点击更换验证码" id="memberseccodesrc" onclick="sessionimg('memberseccodesrc', '{%$rootdir%}')" src="{%$seccodelink%}" class="img-rounded" style="cursor: pointer;height:33px;" align="absmiddle"/>
				</div>
			</div>
		</div>
		{%/if%}
		<div class="form-group">
			<label class="col-sm-2 control-label"></label>
			<div class="col-sm-9">
				{%if $upbid>0%}
				<input type="submit" class="btn btn-success btn-lg" formmethod="POST" value="确认回复"/>
				{%else%}
				<input type="submit" class="btn btn-success btn-lg" formmethod="POST" value="确认提交"/>
				{%/if%}
			</div>
		</div>
	</form>
</div>