Skip to content

Commit

Permalink
Added missing parameter readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandritsch91 committed Feb 9, 2022
1 parent 232a685 commit 1f7e669
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions src/controllers/TaskController.php
Original file line number Diff line number Diff line change
Expand Up @@ -896,11 +896,12 @@ public function actionSetDates($id)
*
* @param integer $id Tasks id
* @param integer|string $userId Users id
* @param boolean $readonly In read only mode?
*
* @return string
* @throws NotFoundHttpException|Exception|ForbiddenHttpException
*/
public function actionAssignUser($id, $userId)
public function actionAssignUser($id, $userId, $readonly)
{
$model = $this->findModel($id);

Expand All @@ -920,7 +921,8 @@ public function actionAssignUser($id, $userId)
'model' => $model,
'statuses' => $this->module->statuses,
'users' => $this->module->users,
'closeModal' => false
'closeModal' => false,
'readonly' => $readonly
]);
}

Expand All @@ -929,11 +931,12 @@ public function actionAssignUser($id, $userId)
*
* @param integer $id Tasks id
* @param integer|string $userId Users id
* @param boolean $readonly In read only mode?
*
* @return string
* @throws NotFoundHttpException|Exception|ForbiddenHttpException
*/
public function actionExpelUser($id, $userId)
public function actionExpelUser($id, $userId, $readonly)
{
$model = $this->findModel($id);

Expand All @@ -957,7 +960,8 @@ public function actionExpelUser($id, $userId)
'model' => $model,
'statuses' => $this->module->statuses,
'users' => $this->module->users,
'closeModal' => false
'closeModal' => false,
'readonly' => $readonly
]);
}

Expand Down
4 changes: 2 additions & 2 deletions src/views/task/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ class="dropdown-toggle text-decoration-none text-reset d-flex flex-row">
]
],
'disabled' => $model->created_by != Yii::$app->user->id,
'url' => ['task/expel-user', 'id' => $model->id, 'userId' => $assignee->getId()]
'url' => ['task/expel-user', 'id' => $model->id, 'userId' => $assignee->getId(), 'readonly' => $readonly]
];
}

Expand All @@ -527,7 +527,7 @@ class="dropdown-toggle text-decoration-none text-reset d-flex flex-row">
]
],
// 'disabled' => $model->created_by != Yii::$app->user->id,
'url' => ['task/assign-user', 'id' => $model->id, 'userId' => $user->getId()]
'url' => ['task/assign-user', 'id' => $model->id, 'userId' => $user->getId(), 'readonly' => $readonly]
];
}

Expand Down

0 comments on commit 1f7e669

Please sign in to comment.