<script type="text/javascript" src="{%$rootdir%}js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_dialog.js"></script>
<script type="text/javascript" src="{%$rootdir%}espcms_includes/js/espcms_formvalidation.js"></script>
<script type="text/javascript">
	$(window).load(function () {
		$("#{%$type_read.formcode%}").espcms_formvalidation();
		$('.dialog_link').espcms_dig();
		$("#{%$type_read.formcode%}").espcms_token_js({url: '{%$formlink.token%}'});
	});
</script>
<form name="{%$type_read.formcode%}" id="{%$type_read.formcode%}" method="post" action="{%$formlink.save%}">
	<input type="hidden" name="tokenname" id="tokenname" value="{%$tokenkey.token_name%}"/>
	<input type="hidden" name="tokenkey" id="tokenkey" value="{%$tokenkey.token_key%}"/>
	<input type="hidden" name="fgid" id="fgid" value="{%$type_read.fgid%}"/>
	<input type="hidden" name="formcode" id="formcode" value="{%$type_read.formcode%}"/>
	{%if count($att_array) > 0%}
	<div class="espcms_bbs_form pt20">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<div class="title"><div class="messageicon"></div><div class="messtitle">{%$type_read.formgroupname%}</div>{%$type_read.content%}</div>
		<div class="content">
			{%forlist from=$att_array key=i%}
			{%if $att_array[i].inputtype=='string' || $att_array[i].inputtype=='int' || $att_array[i].inputtype=='float' || $att_array[i].inputtype=='decimal'%}
			<div class="espcms_form_group {%$att_array[i].attrname%}">
				<label class="control_label16">{%$att_array[i].typename%}</label>
				<div class="control_required20">
					<input type="text" name="{%$att_array[i].attrname%}" class="infoInput" id="{%$att_array[i].attrname%}" placeholder="{%$att_array[i].typeremark%}" title="{%$att_array[i].typeremark%}" {%if $att_array[i].isvalidate==1%} data-validation="{%$att_array[i].validatetext%}"{%/if%} data-validation-msg="{%$att_array[i].validate_str%}" />
				</div>
			</div>
			{%/if%}
			{%if $att_array[i].inputtype=='text' || $att_array[i].inputtype=='htmltext'%}
			<div class="espcms_form_group {%$att_array[i].attrname%}">
				<label class="control_label16">{%$att_array[i].typename%}</label>
				<div class="control_required20">
					<textarea name="{%$att_array[i].attrname%}" class="infoInput" style="width:100%;height:{%$att_array[i].attrrow%}px" id="{%$att_array[i].attrname%}" placeholder="{%$att_array[i].typeremark%}" title="{%$att_array[i].typeremark%}" {%if $att_array[i].isvalidate==1%} data-validation="{%$att_array[i].validatetext%}"{%/if%} data-validation-msg="{%$att_array[i].validate_str%}"></textarea>
				</div>
			</div>
			{%/if%}
			{%if $att_array[i].inputtype=='addon' || $att_array[i].inputtype=='img'%}
			<div class="espcms_form_group {%$att_array[i].attrname%}">
				<label class="control_label16">{%$att_array[i].typename%}</label>
				<div class="control_required20">
					<div class="input-group">
						<input type="text" name="{%$att_array[i].attrname%}" class="infoInput" id="{%$att_array[i].attrname%}" placeholder="{%$att_array[i].typeremark%}" title="{%$att_array[i].typeremark%}" data-display-type="top" {%if $att_array[i].isvalidate==1%} data-validation="{%$att_array[i].validatetext%}"{%/if%} data-validation-msg="{%$att_array[i].validate_str%}" />
						       <span class="input-group-btn">
							<a data-w="500px" data-h="300px" data-url="{%$att_array[i].uploadlink%}" data-title="上传文件" class="btn btn-green dialog_link">上传文件</a>
						</span>
					</div>
				</div>
			</div>
			{%/if%}
			{%if $att_array[i].inputtype=='datetime' || $att_array[i].inputtype=='date'%}
			<div class="espcms_form_group {%$att_array[i].attrname%}">
				<label class="control_label16">{%$att_array[i].typename%}</label>
				<div class="control_required20">
					<input type="text" name="{%$att_array[i].attrname%}" class="infoInput {%$att_array[i].inputtype%}" id="{%$att_array[i].attrname%}" placeholder="{%$att_array[i].typeremark%}" title="{%$att_array[i].typeremark%}" {%if $att_array[i].isvalidate==1%} data-validation="{%$att_array[i].validatetext%}"{%/if%} data-validation-msg="{%$att_array[i].validate_str%}"/>
				</div>
			</div>
			{%/if%}
			{%if $att_array[i].inputtype=='select'%}
			<div class="espcms_form_group {%$att_array[i].attrname%}">
				<label class="control_label16">{%$att_array[i].typename%}</label>
				<div class="control_required20">
					<select class="selectpicker infoInput" name="{%$att_array[i].attrname%}" id="{%$att_array[i].attrname%}" data-size="8" {%if $att_array[i].isvalidate==1%}data-validation="{%$att_array[i].validatetext%}"{%/if%} data-validation-msg="{%$att_array[i].validate_str%}" title="{%pack:public_pack-espcms_select_title%}{%$att_array[i].typename%}">
						{%forlist from=$att_array[i].attrvalue key=ii%}
						<option value="{%$att_array[i].attrvalue[ii].name%}" {%$att_array[i].attrvalue[ii].selected%}>{%$att_array[i].attrvalue[ii].name%}</option>
						{%/forlist%}
					</select>
				</div>
			</div>
			{%/if%}
			{%if $att_array[i].inputtype=='radio'%}
			<div class="espcms_form_group {%$att_array[i].attrname%}">
				<label class="control_label16">{%$att_array[i].typename%}</label>
				<div class="control_required20 pt6">
					{%forlist from=$att_array[i].attrvalue key=ii%}
					<input type="radio" name="{%$att_array[i].attrname%}" value="{%$att_array[i].attrvalue[ii].name%}" {%if $att_array[i].attrvalue[ii].selected=='selected'%}checked{%/if%}/><span class="pr10">{%$att_array[i].attrvalue[ii].name%}</span>
					{%/forlist%}
				</div>
			</div>
			{%/if%}
			{%if $att_array[i].inputtype=='checkbox'%}
			<div class="espcms_form_group {%$att_array[i].attrname%}">
				<label class="control_label16">{%$att_array[i].typename%}</label>
				<div class="control_required20 pt6">
					{%forlist from=$att_array[i].attrvalue key=ii%}
					<input type="checkbox" name="{%$att_array[i].attrname%}[]" value="{%$att_array[i].attrvalue[ii].name%}" {%if $att_array[i].attrvalue[ii].selected=='selected'%}checked{%/if%}/><span class="pr10">{%$att_array[i].attrvalue[ii].name%}</span>
					{%/forlist%}
				</div>
			</div>
			{%/if%}
			{%/forlist%}
			{%if $type_read.isseccode%}
			<div class="espcms_form_group">
				<label for="username" class="control_label16">验证码</label>
				<div class="control_required20">
					<input type="text" id="seccode" name="seccode" class="infoInput" maxlength="4" size="5" style="text-transform: uppercase;"/>
					<img title="点击更换验证码" id="memberseccodesrc" onclick="sessionimg('memberseccodesrc', '{%$rootdir%}')" src="{%$seccodelink%}" style="cursor: pointer;height:28px;margin-left:5px;" align="absmiddle"/>
				</div>
			</div>
			{%/if%}
			<div class="espcms_form_group">
				<label class="control_label16"> </label>
				<div class="control_required20"><input type="submit" id="{%$type_read.formcode%}botton" class="button blue2" value="确认提交"> </div>
			</div>
		</div>
		<b class="b5"></b><b class="b6"></b><b class="b7"></b><b class="b8"></b>
	</div>
	{%/if%}
</form>
