예제 #1
0
?>

  <div class="simple">
    <?php 
echo SHtml::activeLabelEx($model, 'name');
?>
    <?php 
echo SHtml::activeTextField($model, 'name', $model->name == Helper::findModule('srbac')->superUser ? array('size' => 20, 'disabled' => "disabled") : array('size' => 20));
?>
  </div>
  <div class="simple">
    <?php 
echo SHtml::activeLabelEx($model, 'type');
?>
    <?php 
echo SHtml::activeDropDownList($model, 'type', AuthItem::$TYPES, $model->name == Helper::findModule('srbac')->superUser || $update ? array('disabled' => "disabled") : array());
?>
  </div>
  <div class="simple">
    <?php 
echo SHtml::activeLabelEx($model, 'description');
?>
    <?php 
echo SHtml::activeTextArea($model, 'description', array('rows' => 3, 'cols' => 20));
?>
  </div>
  <?php 
if (Yii::app()->user->hasFlash('updateSuccess')) {
    ?>
  <div id="message"
       style="color:red;font-weight:bold;font-size:14px;text-align:center
예제 #2
0
    </td>
    <td width="10%" align="center">
      <?php 
$ajax = array('type' => 'POST', 'update' => '#tasks', 'beforeSend' => 'function(){
                      $("#loadMessRole").addClass("srbacLoading");
                  }', 'complete' => 'function(){
                      $("#loadMessRole").removeClass("srbacLoading");
                  }');
echo SHtml::ajaxSubmitButton('<<', array('assign', 'assignTasks' => 1), $ajax, $data['assign']);
?>
      <?php 
$ajax = array('type' => 'POST', 'update' => '#tasks', 'beforeSend' => 'function(){
                      $("#loadMessRole").addClass("srbacLoading");
                  }', 'complete' => 'function(){
                      $("#loadMessRole").removeClass("srbacLoading");
                  }');
echo SHtml::ajaxSubmitButton('>>', array('assign', 'revokeTasks' => 1), $ajax, $data['revoke']);
?>
    </td>
    <td width="45%">
      <?php 
echo SHtml::activeDropDownList($model, 'name[assign]', SHtml::listData($data["roleNotAssignedTasks"], 'name', 'name'), array('size' => $this->module->listBoxNumberOfLines, 'multiple' => 'multiple', 'class' => 'dropdown'));
?>
    </td></tr>
</table>
<div id="loadMessRole" class="message">
  <?php 
echo "&nbsp;" . $message;
?>
</div>
예제 #3
0
      <?php 
echo SHtml::label(Helper::translate('srbac', "User"), 'user');
?>
</th>
      <td width="50%" rowspan="2">
        <div id="roles">
          <?php 
$this->renderPartial('tabViews/userAjax', array('model' => $model, 'userid' => $userid, 'data' => $data, 'message' => $message));
?>
        </div>
      </td>
    </tr>
    <tr valign="top">
      <td><?php 
$criteria = new CDbCriteria();
$criteria->order = $this->module->username;
echo SHtml::activeDropDownList($this->module->getUserModel(), $this->module->userid, SHtml::listData($this->module->getUserModel()->findAll($criteria), $this->module->userid, $this->module->username), array('size' => $this->module->listBoxNumberOfLines, 'class' => 'dropdown', 'ajax' => array('type' => 'POST', 'url' => array('getRoles'), 'update' => '#roles', 'beforeSend' => 'function(){
                      $("#loadMess").addClass("srbacLoading");
                  }', 'complete' => 'function(){
                      $("#loadMess").removeClass("srbacLoading");
                  }')));
?>
      </td>
    </tr>
  </table>
  <br/>
  <?php 
echo SHtml::endForm();
?>
</div>
예제 #4
0
if (!$id) {
    if ($this->module->getShowHeader()) {
        $this->renderPartial($this->module->header);
    }
    ?>
<div class="simple">
    <?php 
    $this->renderPartial("frontpage");
    ?>
    <?php 
    echo SHtml::beginForm();
    ?>
    <?php 
    echo SHtml::activeDropDownList($this->module->getUserModel(), $this->module->userid, SHtml::listData($this->module->getUserModel()->findAll(), $this->module->userid, $this->module->username), array('size' => 1, 'class' => 'dropdown', 'ajax' => array('type' => 'POST', 'url' => array('showAssignments'), 'update' => '#assignments', 'beforeSend' => 'function(){
                      $("#assignments").addClass("srbacLoading");
                  }', 'complete' => 'function(){
                      $("#assignments").removeClass("srbacLoading");
                  }'), 'prompt' => Helper::translate('srbac', 'select user')));
    ?>
    <?php 
    echo SHtml::endForm();
    ?>
</div>
<?php 
} else {
    ?>
  <?php 
    $url = Yii::app()->urlManager->createUrl("srbac/authitem/showAssignments", array("id" => $id));
    ?>
  <?php 
    Yii::import("srbac.components.Helper");
예제 #5
0
echo SHtml::label(Helper::translate('srbac', "Task"), 'task');
?>
</th>
      <td width="50%" rowspan="2">
        <div id="operations">
          <?php 
$this->renderPartial('tabViews/taskAjax', array('model' => $model, 'userid' => $userid, 'data' => $data, 'message' => $message));
?>
        </div>
      </td>
    </tr>
    <tr valign="top">
      <td><?php 
echo SHtml::activeDropDownList(Assignments::model(), 'itemname', SHtml::listData(AuthItem::model()->findAll($criteria), 'name', 'name'), array('size' => $this->module->listBoxNumberOfLines, 'class' => 'dropdown', 'ajax' => array('type' => 'POST', 'url' => array('getOpers'), 'update' => '#operations', 'beforeSend' => 'function(){
                      $("#loadMessTask").addClass("srbacLoading");
                  }', 'complete' => 'function(){
                      $("#loadMessTask").removeClass("srbacLoading");
                  }')));
?>
        <div>
          <?php 
echo Helper::translate("srbac", "Clever Assigning");
?>
:
          <?php 
echo SHtml::checkBox("clever", Yii::app()->getGlobalState("cleverAssigning"));
?>
        </div>
      </td>
    </tr>
  </table>
예제 #6
0
<div id="role_list">
		<b>Un Assigned Roles</b><br/>
                <?php 
echo SHtml::activeDropDownList($user, 'role', SHtml::listData($user->getUnassignedRoles(), 'name', 'name'), array('size' => 5, 'class' => 'dropdown'));
?>
                <br/>
                <input class="assign" type="button" 
			onClick="assign('<?php 
echo Yii::app()->controller->createUrl("/user/assignRole", array("id" => $user->id));
?>
','<?php 
echo Yii::app()->controller->createUrl("/user/reloadRoles", array("id" => $user->id));
?>
')"
                        value="Add"/>
</div>