From a53485d08f01025a6b8924be98f94663838414f4 Mon Sep 17 00:00:00 2001 From: Stephen Abello Date: Mon, 15 Feb 2021 15:26:07 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B03670=20Replace=20attachment=20"delete"?= =?UTF-8?q?=20button=20with=20an=20icon=20button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../itop-attachments/renderers.itop-attachments.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/datamodels/2.x/itop-attachments/renderers.itop-attachments.php b/datamodels/2.x/itop-attachments/renderers.itop-attachments.php index aff7a4c01e..1c0d74c1df 100644 --- a/datamodels/2.x/itop-attachments/renderers.itop-attachments.php +++ b/datamodels/2.x/itop-attachments/renderers.itop-attachments.php @@ -348,12 +348,14 @@ CSS protected function GetDeleteAttachmentButton($iAttId) { - $oButton = ButtonUIBlockFactory::MakeForAlternativeDestructiveAction(Dict::S('Attachments:DeleteBtn'), + $oButton = ButtonUIBlockFactory::MakeDestructiveIconLink('fas fa-trash', Dict::S('Attachments:DeleteBtn'), + '', Dict::S('Attachments:DeleteBtn'), - Dict::S('Attachments:DeleteBtn'), - false, + null, "btn_remove_".$iAttId); - $oButton->AddCSSClass('btn_hidden')->SetOnClickJsCode("RemoveAttachment('.$iAttId.');"); + $oButton->AddCSSClass('btn_hidden') + ->SetOnClickJsCode("RemoveAttachment('.$iAttId.');"); + return BlockRenderer::RenderBlockTemplates($oButton); }