<div class="control-group" id="group" style="display: none">
<label class="control-label">所属分组</label>
<div class="controls">
<select name="deptid" style="width:300px;">
<foreach name="list" item="vo">
<!--<php> $status_yes=$pid==$vo[deptcode]?"selected":"";</php>-->
<option value="{$vo['deptcode']}" {$status_yes}>{$vo['dept_name']}</option>
</foreach>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('ROLE')}</label>
<div class="controls">
<foreach name="roles" item="vo">
<label class="checkbox inline"><input value="{$vo.id}" type="checkbox" id="role_id" name="role_id[]" <if condition="sp_get_current_admin_id() neq 1 && $vo['id'] eq 1">disabled="true"</if>>{$vo.name}</label>
</foreach>
</div>
</div>
<script>
$("input[type=checkbox]").click(function() {
var id = $(this).val();
if(id == 24){
var node=$('#group');
if(node.is(':hidden')){ //如果node是隐藏的则显示node元素,否则隐藏
node.show();
}else{
node.hide();
}
}
});
</script>
网友评论