Skip to content

Commit

Permalink
select fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shirne committed Jul 13, 2024
1 parent b1c404b commit 7bc7f98
Show file tree
Hide file tree
Showing 15 changed files with 1,991 additions and 1,809 deletions.
136 changes: 71 additions & 65 deletions src/application/admin/view/article/category/edit.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,54 @@

{block name="body"}

{assign name="page_title" value=":lang($id>0?'Edit':'Add').lang('Category')" /}
{include file="public/bread" menu="category_index" title="$page_title"/}
{assign name="page_title" value=":lang($id>0?'Edit':'Add').lang('Category')" /}
{include file="public/bread" menu="category_index" title="$page_title"/}

<div id="page-wrapper">
<div class="page-header">{$page_title}</div>
<div class="page-content">
<form method="post" class="page-form" action="" enctype="multipart/form-data">
<div class="form-row">
<div class="form-group col">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">{:lang('Category Title')}</span>
</div>
<input type="text" name="title" class="form-control" value="{$model.title|default=''}" placeholder="输入分类名称"/>
<div id="page-wrapper">
<div class="page-header">{$page_title}</div>
<div class="page-content">
<form method="post" class="page-form" action="" enctype="multipart/form-data">
<div class="form-row">
<div class="form-group col">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">{:lang('Category Title')}</span>
</div>
<input type="text" name="title" class="form-control" value="{$model.title|default=''}"
placeholder="输入分类名称" />
</div>
<div class="form-group col">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">简称</span>
</div>
<input type="text" name="short" class="form-control" value="{$model.short|default=''}"/>
</div>
<div class="form-group col">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">简称</span>
</div>
<input type="text" name="short" class="form-control" value="{$model.short|default=''}" />
</div>
</div>
<div class="form-row">
</div>
<div class="form-row">
<div class="form-group col">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">父分类</span>
</div>
<select name="pid" class="form-control">
<option value="">顶级分类</option>
{foreach $cate as $key => $v}
<option value="{$v.id}"
<?php if($model['pid'] == $v['id']) {echo 'selected="selected"' ;}?>
>{$v.html} {$v.title}</option>
{/foreach}
</select>
<select name="pid" class="form-control">
<option value="">顶级分类</option>
{foreach $cate as $key => $v}
<option value="{$v.id}" {$model['pid']==$v['id']? 'selected' :''}?>
>{$v.html} {$v.title}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group col">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">分类别名</span>
</div>
<input type="text" name="name" class="form-control" {$model['is_lock']?'readonly="readonly"':''} value="{$model.name|default=''}" placeholder="输入分类别名,不能和其他分类别名重复">
<input type="text" name="name" class="form-control"
{$model['is_lock']?'readonly="readonly"':''} value="{$model.name|default=''}" placeholder="输入分类别名,不能和其他分类别名重复">
</div>
</div>
</div>
Expand All @@ -63,48 +64,49 @@
<label class="custom-file-label" for="upload_icon">选择文件</label>
</div>
</div>
{if !empty($model['icon'])}
<figure class="figure">
<img src="{$model.icon}" class="figure-img img-fluid rounded" alt="icon">
<figcaption class="figure-caption text-center">{$model.icon}</figcaption>
{if !empty($model[' icon'])} <figure class="figure">
<img src="{$model.icon}" class="figure-img img-fluid rounded" alt="icon">
<figcaption class="figure-caption text-center">{$model.icon}</figcaption>
</figure>
<input type="hidden" name="delete_icon" value="{$model.icon}"/>
{/if}
</div>
<div class="form-group col">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">分类图片</span>
</div>
<div class="custom-file">
<input type="file" class="custom-file-input" name="upload_image"/>
<label class="custom-file-label" for="upload_image">选择文件</label>
</div>
<input type="hidden" name="delete_icon" value="{$model.icon}" />
{/if}
</div>
{if !empty($model['image'])}
<div class="form-group col">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">分类图片</span>
</div>
<div class="custom-file">
<input type="file" class="custom-file-input" name="upload_image" />
<label class="custom-file-label" for="upload_image">选择文件</label>
</div>
</div>
{if !empty($model['image'])}
<figure class="figure">
<img src="{$model.image}" class="figure-img img-fluid rounded" alt="image">
<figcaption class="figure-caption text-center">{$model.image}</figcaption>
</figure>
<input type="hidden" name="delete_image" value="{$model.image}"/>
{/if}
</div>
<input type="hidden" name="delete_image" value="{$model.image}" />
{/if}
</div>
</div>
<div class="form-row">
<div class="form-group col">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">排序</span>
</div>
<input type="text" name="sort" class="form-control" value="{$model.sort|default=''}" placeholder="排序按从小到大">
<input type="text" name="sort" class="form-control" value="{$model.sort|default=''}"
placeholder="排序按从小到大">
</div>
</div>
<div class="form-group col">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">分页</span>
</div>
<input type="text" name="pagesize" class="form-control" value="{$model.pagesize|default=''}" placeholder="列表页分页数量">
<input type="text" name="pagesize" class="form-control" value="{$model.pagesize|default=''}"
placeholder="列表页分页数量">
</div>
</div>
</div>
Expand All @@ -113,49 +115,53 @@
<div class="form-group col-md-2">
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-outline-secondary{$model['use_template']==1?' active':''}">
<input type="radio" name="use_template" value="1" autocomplete="off" {$model['use_template']==1?' checked':''}> 是
<input type="radio" name="use_template" value="1" autocomplete="off"
{$model['use_template']==1?' checked':''}> 是
</label>
<label class="btn btn-outline-secondary{$model['use_template']==0?' active':''}">
<input type="radio" name="use_template" value="0" autocomplete="off"{$model['use_template']==0?' checked':''}> 否
<input type="radio" name="use_template" value="0" autocomplete="off"
{$model['use_template']==0?' checked':''}> 否
</label>
</div>
</div>
<div class="col">
<div class="form-text text-muted">独立模板编写index.tpl及view.tpl放在“分类别名”目录下,参考article/index.tpl及view.tpl</div>
<div class="form-text text-muted">
独立模板编写index.tpl及view.tpl放在“分类别名”目录下,参考article/index.tpl及view.tpl</div>
</div>
</div>
<div class="form-group">
<label for="description">默认属性</label>
<div class="form-control">
<input type="text" class="taginput" value="{$model.props|default=''|implode_cmp}" placeholder="填写多个值以,分割" />
<input type="text" class="taginput" value="{$model.props|default=''|implode_cmp}"
placeholder="填写多个值以,分割" />
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">关键词</span>
</div>
<input type="text" name="keywords" class="form-control" value="{$model.keywords|default=''}"
placeholder="请输入SEO关键词(选填)">
<input type="text" name="keywords" class="form-control" value="{$model.keywords|default=''}"
placeholder="请输入SEO关键词(选填)">
</div>
</div>
<div class="form-group">
<label for="description">描述信息</label>
<textarea name="description" cols="30" rows="10" class="form-control"
placeholder="请输入分类描述(选填)">{$model.description|default=''}</textarea>
placeholder="请输入分类描述(选填)">{$model.description|default=''}</textarea>
</div>
<div class="form-group submit-btn">
<input type="hidden" name="id" value="{$model.id|default=''}">
<button type="submit" class="btn btn-primary">{$id>0?'保存':'添加'}</button>
</div>
</form>
</div>
</form>
</div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
jQuery(function($){
$('.taginput').tags('props[]');
})
</script>
<script type="text/javascript">
jQuery(function ($) {
$('.taginput').tags('props[]');
})
</script>
{/block}
Loading

0 comments on commit 7bc7f98

Please sign in to comment.