N°3670 Replace attachment "delete" button with an icon button

This commit is contained in:
Stephen Abello
2021-02-15 15:26:07 +01:00
parent 7e46054f8b
commit a53485d08f

View File

@@ -348,12 +348,14 @@ CSS
protected function GetDeleteAttachmentButton($iAttId) 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'),
Dict::S('Attachments:DeleteBtn'), null,
false,
"btn_remove_".$iAttId); "btn_remove_".$iAttId);
$oButton->AddCSSClass('btn_hidden')->SetOnClickJsCode("RemoveAttachment('.$iAttId.');"); $oButton->AddCSSClass('btn_hidden')
->SetOnClickJsCode("RemoveAttachment('.$iAttId.');");
return BlockRenderer::RenderBlockTemplates($oButton); return BlockRenderer::RenderBlockTemplates($oButton);
} }