<form id="formAdd" method="post" action="?action=add">
<input type="hidden" name="dosubmit" value="1">
<table width="100%" class="grid">
	<tr>
		<td class="tdleft" width="80">选择语言：</td>
		<td>
			<select name="lang" id="lang">
				<option value="">选择语言</option>{?section name=i loop=$lang?}<option value="{?$i['key']?}">{?$lang[i].name?}</option>{?/section?}
			</select>
		</td>
	</tr>
	<tr>
		<td class="tdleft">应用栏目：</td>
		<td>
			<select name="catid">
				<option value="0">所有栏目</option>{?section name=i loop=$column?}<option value="{?$i['key']?}">{?$column[i].catname?}</option>{?/section?}
			</select>
		</td>
	</tr>
	<tr>
		<td class="tdleft">属性名称：</td>
		<td><textarea class="textarea" cols="30" rows="9" name="names" id="names"></textarea></td>
	</tr>
</table>
<div><input type="submit" name="submit" id="submit" class="button dodialog" value="提 交"/></div>
</form>
<script type="text/javascript">
$(function(){
	$.formValidator.initConfig({formid:"formAdd",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'250',height:'50'}, function(){this.close();$(obj).focus();})}});
	$("#lang").formValidator({onshow:"请选择语言",onfocus:"请选择语言",oncorrect:"输入正确"}).inputValidator({min:1,onerror:"请选择语言"});
	$("#names").formValidator({onshow:"请输入属性名称",onfocus:"请输入属性名称",oncorrect:"输入正确"}).inputValidator({min:1,onerror:"请输入属性名称"});
	$("#formAdd").ajaxForm({
        dataType: "json",
        success : function(data){
			if(data.flag == 0){
				doTip(data.msg);
			}else{
				window.top.mainframe.location.reload();
				doDialogClose();
			}
        }
    });
})
</script>