<script type="text/javascript">
	$(window).load(function () {
		$("#messformsave").espcms_formvalidation();
	});
</script>
<div class="panel-body">
	{%if $upbid>0%}
	<div class="section-divider mb40"><span>Respond to voicemail</span></div>
	{%else%}
	<div class="section-divider mb40"><span>Submit Message</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">Title</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="Please fill in the title" title="Please fill in the title" data-validation-msg="Sorry: the title was entered incorrectly, please go back and re-enter"/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">Name</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="Please enter your name" title="Please enter your name" data-validation-msg="Sorry, the name was entered incorrectly, please re-enter"/>
			</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="Please enter E-mail" title="Please enter E-mail" data-validation-msg="Sorry: E-mail input is incorrect, please re-enter!"/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">Moblie</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="Please enter 11 mobile phone number" title="Please enter 11 mobile phone number" data-validation-msg="Sorry: The phone number was entered incorrectly, please re-enter!" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">Content</label>
			<div class="col-sm-9">
				<textarea name="content" class="form-control" style="width:100%;height:250px" id="content" title="Please fill in the message" placeholder="Please fill in the message" data-validation-minlength="10"  data-validation-maxlength="5000" data-validation-msg="Sorry, the message cannot be empty, please re-enter"></textarea>
			</div>
		</div>
		{%if $type_read.isseccode==1%}
		<div class="form-group">
			<label class="col-sm-2 control-label">Verification</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="Please enter a verification code of 4 English characters." title="Please enter a verification code of 4 English characters." maxlength="4" data-validation-msg="Error: Verification code input errors">
				</div>
				<div class="col-sm-6 col-md-6 col-mm-6 pl0">
					<img title="Click to replace the verification code" id="messagecode" onclick="sessionimg('messagecode', '{%$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="Reply"/>
				{%else%}
				<input type="submit" class="btn btn-success btn-lg" formmethod="POST" value="Submit"/>
				{%/if%}
			</div>
		</div>
	</form>
</div>