Skip to content

Commit

Permalink
Dev: Correct colours for 'Can edit'
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Sep 21, 2016
1 parent 2ec53a9 commit 1711a7c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion application/models/ParticipantShare.php
Expand Up @@ -103,11 +103,14 @@ public function getSharedByList($selected){

}

/**
* @return string HTML
*/
public function getCanEditHtml(){
$loggedInUser = yii::app()->user->getId();
if($this->participant->owner_uid == $loggedInUser)
{
$inputHtml = "<input type='checkbox' data-size='small' data-off-color='danger' data-off-text='".gT('No')."' data-on-text='".gT('Yes')."' class='action_changeEditableStatus' "
$inputHtml = "<input type='checkbox' data-size='small' data-off-color='warning' data-on-color='primary' data-off-text='".gT('No')."' data-on-text='".gT('Yes')."' class='action_changeEditableStatus' "
. ($this->can_edit ? "checked" : "")
. "/>";
return $inputHtml;
Expand All @@ -118,6 +121,9 @@ public function getCanEditHtml(){
}
}

/**
* @return string HTML
*/
public function getButtons(){
$loggedInUser = yii::app()->user->getId();
if($this->participant->owner_uid == $loggedInUser)
Expand Down

0 comments on commit 1711a7c

Please sign in to comment.