Skip to content

Commit

Permalink
fix display button for template - see #3338 (#3339)
Browse files Browse the repository at this point in the history
  • Loading branch information
yllen authored and orthagh committed Dec 22, 2017
1 parent 49b70b0 commit a458faf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions inc/commondbtm.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4586,9 +4586,11 @@ static function listTemplates($itemtype, $target, $add = 0) {
echo "<td class='tab_bg_1 center'>$entity</td>";
}
echo "<td class='tab_bg_2 center b'>";
Html::showSimpleForm($target, 'purge', _x('button', 'Delete permanently'),
['withtemplate' => 1,
'id' => $data['id']]);
if ($item->can($data['id'], PURGE)) {
Html::showSimpleForm($target, 'purge', _x('button', 'Delete permanently'),
['withtemplate' => 1,
'id' => $data['id']]);
}
echo "</td>";
} else {
$add_params =
Expand Down

0 comments on commit a458faf

Please sign in to comment.