<form action="news.manage.php" id="form_add" name="form_add" method="post">
	<input type="hidden" name="action" value="update_class" />
	<input type="hidden" name="id" id="id" value="<tpl> $class_array.news_c_id </tpl>" />
<table border="0" cellpadding="0" cellspacing="0" class="from_table">
	<tr>
		<th><tpl> $langSysNName </tpl></th>
	  <td width="480" class="td rowform"><input name="txttitle" type="text" id="txttitle" maxlength="50" value="<tpl> $class_array.news_c_name </tpl>" class="txtinput" /></td>
		<td class="vtop tips2"><label style="display:none" for="txttitle" class="wrong" metaDone="true" generated="true"></label></td>

</table>
<div class="table-5-bottom">
<div class="btn_marginleft_1">
<div style="float:left; padding-left:20px">
		<span class="btn_left">
			<input type="submit" class="btn_submit" name="Submit" value="<tpl> $langSysNSubmit </tpl>" />
		  </span>
			<span class="btn_left">
	  <input type="button" class="btn_submit" name="return_list" id="return_list" value="<tpl> $langSysNReturn </tpl>" /></span>		</div>	
	  </div>
	  </div>
</form>

<script>
$(document).ready(function() {
	//添加
	var options = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(msg){
							hideLoading();
							showMessage(msg.message,msg.type);
							if(msg.type == '1'){
								ST(2,2);
								ShowDiv	= 'result_content';
								getPageContent("news.manage.php?action=ajax_class_list&curpage=<tpl>$curpage</tpl>");
							}
						},
		type:      'post',
		dataType:  'json'
	};
	
	//对添加表单做的验证定义
	$("#form_add").validate({
		errorClass: "wrong",
		rules: {
			txttitle: {required: true}
		},
		messages: {
			txttitle: {required: "<tpl> $errSysNClassIsEmpty </tpl>"}
		},
		submitHandler: function() {
			$('#form_add').ajaxSubmit(options);
		}
	});
	
	$("#return_list").click(function(){
		ST(2,2);
		ShowDiv	= 'result_content';
		getPageContent("news.manage.php?action=ajax_class_list&curpage=<tpl>$curpage</tpl>");
	});
});
</script>