|
@@ -29,12 +29,28 @@
|
|
|
<label for="input-user_email" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('ROLE')}</label>
|
|
<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">
|
|
<div class="col-md-6 col-sm-10">
|
|
|
<foreach name="roles" item="vo">
|
|
<foreach name="roles" item="vo">
|
|
|
|
|
+ <label class="checkbox-inline" id="role_id">
|
|
|
|
|
+
|
|
|
|
|
+ <input value="{$vo.id}" type="checkbox" name="role_id[]" <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">
|
|
|
|
|
+
|
|
|
|
|
+ <foreach name="catelist" item="vo" key="k">
|
|
|
<label class="checkbox-inline">
|
|
<label class="checkbox-inline">
|
|
|
- <input value="{$vo.id}" type="checkbox" name="role_id[]" <if condition="cmf_get_current_admin_id() neq 1 && $vo['id'] eq 1">disabled="true"</if>>{$vo.name}
|
|
|
|
|
|
|
+ <input value="{$k}" type="checkbox" name="role_id[]" <if condition="cmf_get_current_admin_id() neq 1 && $vo['id'] eq 1">disabled="true"</if>>{$vo}
|
|
|
</label>
|
|
</label>
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<div class="col-sm-offset-2 col-sm-10">
|
|
<div class="col-sm-offset-2 col-sm-10">
|
|
|
<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
|
|
<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
|
|
@@ -43,5 +59,31 @@
|
|
|
</form>
|
|
</form>
|
|
|
</div>
|
|
</div>
|
|
|
<script src="__STATIC__/js/admin.js"></script>
|
|
<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>
|
|
</body>
|
|
|
</html>
|
|
</html>
|