Skip to content

Commit

Permalink
Bug: readonly issue message always visible
Browse files Browse the repository at this point in the history
Issue #39
  • Loading branch information
satrun77 committed Jul 10, 2016
1 parent 136b9ce commit 0902551
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions app/Form/Issue.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,19 @@ protected function issueModifyFields()
*/
protected function readOnlyMessage()
{
return [
'readonly' => [
'type' => 'plaintext',
'label' => ' ',
'value' => '<div class="alert alert-warning">' . trans('tinyissue.readonly_issue_message') . '</div>',
],
];
$field = [];

if ($this->readOnly) {
$field = [
'readonly' => [
'type' => 'plaintext',
'label' => ' ',
'value' => '<div class="alert alert-warning">' . trans('tinyissue.readonly_issue_message') . '</div>',
],
];
}

return $field;
}

/**
Expand Down

0 comments on commit 0902551

Please sign in to comment.