<article class="col-lg-12">
	<div class="card forms">
		<div class="card-header d-flex align-items-center justify-content-between">
			<h3>编辑店内分类</h3>
		</div>
		<div class="card-body">
			<form action="{url:/seller/category_save}" method="post" class="form-horizontal">
				<input name="id" value="" type="hidden" />

				<div class="form-group row">
					<label class="col-sm-2 col-form-label">店内分类名称</label>
					<div class="col-sm-10">
						<input name="name" type="text" value="" class="form-control" pattern="required" alt="分类名称不能为空" />
					</div>
				</div>

				<div class="form-group row">
					<label class="col-sm-2 col-form-label">上级分类</label>
					<div class="col-sm-10">
						<!--分类数据显示-->
						<span id="__categoryBox" style="margin-bottom:8px"></span>
						<button class="btn btn-primary" type="button" name="_goodsCategoryButton"><span class="add">设置分类</span></button>
						{set:plugin::trigger('goodsCategoryWidget',array("seller_id" => $this->seller['seller_id'],"name" => "parent_id","table" => "category_seller","value" => isset($this->categoryRow['parent_id']) ? $this->categoryRow['parent_id'] : IReq::get('pid')))}
						<small class="help-block-none">如果不选择上级分类，默认为顶级分类</small>
					</div>
				</div>

				<div class="form-group row">
					<label class="col-sm-2 col-form-label">排序</label>
					<div class="col-sm-3">
						<input name="sort" pattern='int' class="form-control" empty alt='排序必须是一个数字' type="text" value="" />
						<small class="help-block-none">设置排序，数字越小越靠前</small>
					</div>
				</div>

				<div class="form-group row">
					<label class="col-sm-2 col-form-label">SEO标题</label>
					<div class="col-sm-10">
						<input name="title" class="form-control" type="text" value="" />
					</div>
				</div>

				<div class="form-group row">
					<label class="col-sm-2 col-form-label">SEO关键词</label>
					<div class="col-sm-10">
						<input name="keywords" class="form-control" type="text" value="" />
					</div>
				</div>

				<div class="form-group row">
					<label class="col-sm-2 col-form-label">SEO描述</label>
					<div class="col-sm-10">
						<textarea name="descript" class="form-control" cols="" rows="3"></textarea>
					</div>
				</div>

				<div class="form-group row">
					<div class="col-sm-4 offset-sm-2">
						<input type="submit" class="btn btn-primary" value="保 存" />
						<input type="reset" class="btn btn-secondary" value="重 置" />
					</div>
				</div>
			</form>
		</div>
	</div>
</article>

<script type="text/javascript">
$(function()
{
	var formObj = new Form();
	formObj.init({echo:JSON::encode($this->categoryRow)});
})
</script>