<include file="Public/header" title="添加分类" />
<div id="page-wrapper">
    <form method="post" action="{:U('category/update')}">
        <div class="form-group">
            <label for="aa">分类标题</label>
            <input type="text" name="title" class="form-control" id="aa" value="{$model.title}" placeholder="输入分类标题">
        </div>
        <div class="form-group">
            <label for="bb">父分类</label>
            <select name="pid" id="bb" class="form-control">
                <option value="">顶级分类</option>
                <foreach name="cate" item="v">
                    <option value="{$v.id}" <?php if($model['pid'] == $v['id']) {echo 'selected="selected"' ;}?> >{$v.html} {$v.title}</option>
                </foreach>
            </select>
        </div>
        <div class="form-group">
            <label for="ee">分类别名</label>
            <input type="text" name="name" class="form-control" id="cc" value="{$model.name}" placeholder="输入分类别名,不能和其他分类别名重复">
        </div>
        <div class="form-group">
            <label for="dd">关键词</label>
            <input type="text" name="keywords" class="form-control" id="dd" value="{$model.keywords}" placeholder="请输入SEO关键词(选填)">
        </div>
        <div class="form-group">
            <label for="ee">描述信息</label>
            <textarea name="description" id="ee" cols="30" rows="10" class="form-control" placeholder="请输入分类描述(选填)">{$model.description}</textarea>
        </div>
        <input type="hidden" name="id" value="{$model.id}">
        <button type="submit" class="btn btn-default">更新</button>
    </form>
</div>
<include file="Public/footer" />