Skip to content

Commit

Permalink
Minor refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com>
  • Loading branch information
sampoyigi committed Oct 21, 2022
1 parent 80a8ba3 commit b780b42
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions app/system/controllers/Extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,12 @@ public function listOverrideColumnValue($record, $column, $alias = null)
if ($column->type != 'button')
return null;

$attributes = $column->attributes;
if (($column->columnName == 'delete' && $record->status) || ($column->columnName != 'delete' && !$record->class)) {
$attributes = $column->attributes;
$attributes['class'] .= ' disabled';

if ($column->columnName == 'delete' && $record->status)
$attributes['class'] = $attributes['class'].' disabled';

if ($column->columnName != 'delete' && !$record->class)
$attributes['class'] = $attributes['class'].' disabled';

return $attributes;
return $attributes;
}
}

protected function initFormWidget($model, $context = null)
Expand Down

0 comments on commit b780b42

Please sign in to comment.