<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title><!--{$UUDEV_PAGE_TITLE}--></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--{include file=elements/header.css.html}-->
<!--{include file=elements/header.js.html type=common}-->
<!--{include file=elements/header.js.html type=ubb}-->
<!--{include file=elements/header.js.html type=valid}-->
</head>
<body>
<div id="outside">
	<!--{include file=frame/top.html}-->
	<div id="mainareaContent">
		<!--{include file=frame/left.html}-->
		<div id="rightContent">
			<div id="topContent">
				<div class="sitmap">
					<span class="r"><!--{include file="elements/uuadvad.html"}--></span>网站管理&nbsp;&gt;&nbsp;自定义标签&nbsp;&gt;&nbsp;修改标签
				</div>
			</div>
			<div id="secrightContent">
				<div class="tableContent">
					<form id="editForm" action="index.php?r=Tags.edit" method="post">
						<input type="hidden" name="returnParams" value="<!--{$returnParams}-->"/>
						<input type="hidden" name="data[UbbTags][id]" value="<!--{$tags.id}-->"/>
						<table class="tbl_edit" width="100%">
							<tr>
								<td class="td_name">标签说明<span class="red">*</span></td>
								<td class="td_content"><input type="text" class="text" id="title" name="data[UbbTags][title]" value="<!--{$tags.title}-->"/><span id="span_title"></span></td>
							</tr>
							<tr>
								<td class="td_name">标签内容<span class="red">*</span></td>
								<td class="td_content"><textarea id="content" name="data[UbbTags][content]"><!--{$tags.content}--></textarea><span id="span_content"></span></td>
							</tr>
							<tr>
								<td class="noborder"></td>
								<td class="noborder"><button type="submit" class="butsubmit">提交</button>&nbsp;&nbsp;<button type="button" class="but2font" onClick="window.location.href='index.php?<!--{$returnParams}-->'">返回</button></td>
							</tr>
						</table>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<script>
$(document).ready(function(){
	$("#content").addClass("cleditorTextarea").cleditor({
		width: "80%",
		height: 120,
		controls: "bold italic underline break | undo redo | " +
			" image link file | basic-function advertising-system access-statistics"
	});
	
	$("#editForm").validate({
		rules: {
			"data[UbbTags][title]": {
				required: true,
				maxlength: 100
			},
			"data[UbbTags][content]": "required"
		},
		messages: {
			"data[UbbTags][title]": {
				required: "请输入标题",
				maxlength: "不能超过100个字符"
			},
			"data[UbbTags][content]": "内容不能为空"
		},
		errorPlacement: function(error, element){
			$("#span_" + element.attr("id")).html(error).attr("class", "error");
		},
		submitHandler: function(form){
			form.submit();
		},
		errorClass: "invalid",
		success: function(label){
			label.parent().html("&nbsp;").attr("class", "valid");
		}
	});
});
</script>
</html>