conecta6 Posted October 19, 2017 Share Posted October 19, 2017 Hi, I'm trying to hide the answer buttons in case the ticket is closed, to prevent the client from reopening it. I think it should be done by hook, but I'm not sure how this button would be hidden from there. Any guidance on how to do this without editing the tpl? Link to comment Share on other sites More sharing options...
brian! Posted October 19, 2017 Share Posted October 19, 2017 do you mean the "Reply" button? which version of WHMCS are you using, which template and give a screenshot of where this button is... depending on which version you're using, it could be in a number of different places! Link to comment Share on other sites More sharing options...
conecta6 Posted October 19, 2017 Author Share Posted October 19, 2017 Hi, i use 7.3.0. using six default. thanks Link to comment Share on other sites More sharing options...
brian! Posted October 19, 2017 Share Posted October 19, 2017 on Closed tickets, you could use the following hook to remove both Reply & Close buttons... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { global $status; if (strpos($status, Lang::trans('supportticketsstatusclosed')) !== false) { if (!is_null($primarySidebar->getChild('Ticket Information'))) { $primarySidebar->getChild('Ticket Information') ->setFooterHtml(''); } } }); to remove the Reply link on viewticket.tpl is easy if you wanted to edit the template... not so if you don't! you could almost remove it by adding some code to custom.css... #ticketReply { display: none; } but it would probably be easier to just edit the template. Link to comment Share on other sites More sharing options...
conecta6 Posted October 19, 2017 Author Share Posted October 19, 2017 Thanks Brian. Work perfectly Link to comment Share on other sites More sharing options...
Recommended Posts