<script type="text/javascript">
<!--
function openDialog(value) {
	$('#Label_name').val(value);
	$("#dialog").dialog("open");
}

function check(checker, module)
{
    $('#' + module + ' input').each(function()
    {
        $(this).attr("checked", checker.checked);
    });
}

function checkall(checker)
{
    $('input').each(function()
    {
        $(this).attr("checked", checker.checked)
    });
}

function submitDone(){
    alert("设置成功");
    //window.location.reload();
}
//-->
</script>
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'author-form',
    'enableAjaxValidation'=>false,
));
?>

<fieldset>
<legend><?php echo $title;?></legend>
<!--头部信息 开始//-->
<div>
<label>
<?php echo CHtml::hiddenField('rolename', $rolename);?>
<?php echo '角色名:'.$rolename ?>
</label>
</div>
<!--头部信息 结束//-->
<br>
<!--操作权限 开始//-->
<div id="operation" class="grid-view">
<?php $this->renderPartial('_form', array(
    'modules'=>$modules,
    'hasoperations'=>$hasoperations,
)); ?>
</div>

<!--部门权限 开始//-->
<?php $this->renderPartial('_departform', array(
    'tasks'=>$tasks,
    'hasoperations'=>$hasoperations,
)); ?>
<!--部门权限 结束//-->

<br>

<input type='checkbox' onclick='checkall(this)' />全选  
<?php echo CHtml::ajaxSubmitButton('提交',array('author/roleaddchild'),array('success'=>'submitDone()'));?>
 </fieldset>
 <?php $this->endWidget();?>
</div>

