|
|
@@ -30,13 +30,26 @@
|
|
|
<label for="input-user_email" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('ROLE')}</label>
|
|
|
<div class="col-md-6 col-sm-10">
|
|
|
<foreach name="roles" item="vo">
|
|
|
- <label class="checkbox-inline">
|
|
|
+ <label class="checkbox-inline" id="role_id">
|
|
|
<php>$role_id_checked=in_array($vo['id'],$role_ids)?"checked":"";</php>
|
|
|
<input value="{$vo.id}" type="checkbox" name="role_id[]" {$role_id_checked} <if condition="cmf_get_current_admin_id() neq 1 && $vo['id'] eq 1">disabled="true"</if>>{$vo.name}
|
|
|
</label>
|
|
|
</foreach>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div class="form-group" id="showcategory" style="display: none;">
|
|
|
+ <label for="input-user_email" class="col-sm-2 control-label"><span class="form-required"></span>类目</label>
|
|
|
+ <div class="col-md-6 col-sm-10">
|
|
|
+ <?php $categorys = unserialize($category);?>
|
|
|
+ <foreach name="catelist" item="vo" key="k">
|
|
|
+ <label class="checkbox-inline">
|
|
|
+ <input value="{$k}" type="checkbox" name="category[]" <?php if(in_array($k,$categorys)){ echo "checked";}?> >{$vo}
|
|
|
+ </label>
|
|
|
+ </foreach>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div class="form-group">
|
|
|
<div class="col-sm-offset-2 col-sm-10">
|
|
|
<input type="hidden" name="id" value="{$id}" />
|
|
|
@@ -47,5 +60,30 @@
|
|
|
</form>
|
|
|
</div>
|
|
|
<script src="__STATIC__/js/admin.js"></script>
|
|
|
+
|
|
|
+ <script>
|
|
|
+
|
|
|
+ $('#role_id input').each(function(index,element){
|
|
|
+
|
|
|
+ //通过判断是否是最好的一个节点,并且等于编辑人员“3”,就默认显示,否则隐藏
|
|
|
+
|
|
|
+ if(index==0 && $(this).attr('value')==3){
|
|
|
+ $('#showcategory').show();
|
|
|
+ };
|
|
|
+
|
|
|
+ $(this).click(function(){
|
|
|
+ if($(this).attr('value')==3){
|
|
|
+ $('#showcategory').show();
|
|
|
+ }else{
|
|
|
+ $('#showcategory').hide();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </script>
|
|
|
</body>
|
|
|
</html>
|