brian! Posted January 31, 2021 Share Posted January 31, 2021 1 hour ago, hoya8 said: You meant like this will remove "close" for all departments right? yeah - though you wouldn't need the global declaration at the beginning.... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { $footer = '<div><button class="btn btn-success btn-sm btn-block" onclick="jQuery(\'#ticketReply\').click()"><i class="fas fa-pencil-alt"></i> '.Lang::trans('supportticketsreply').'</button></div>'; if (!is_null($primarySidebar->getChild('Ticket Information'))) { $primarySidebar->getChild('Ticket Information')->setFooterHtml($footer); } }); of course, there are other ways for a client to close a ticket - but if you don't know them, then it's unlikely your customers will. 🤪 1 Quote Link to comment Share on other sites More sharing options...
hoya8 Posted January 31, 2021 Share Posted January 31, 2021 huge thanks again 🙂 🤜 0 Quote Link to comment Share on other sites More sharing options...
mazinhost Posted July 4, 2021 Share Posted July 4, 2021 <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { GLOBAL $smarty; $departmentid = $smarty->getVariable('departmentid'); $status = $smarty->getVariable('status'); $validdepts = "3"; $statuslabel = Lang::trans('supportticketsstatusopen'); if (strpos($departmentid, $validdepts) !== false){ if (strpos($status, $statuslabel) !== false) { $footer = '<div><button class="btn btn-success btn-sm btn-block" onclick="jQuery(\'#ticketReply\').click()"><i class="fas fa-pencil-alt"></i> '.Lang::trans('supportticketsreply').'</button></div>'; if (!is_null($primarySidebar->getChild('Ticket Information'))) { $primarySidebar->getChild('Ticket Information')->setFooterHtml($footer); } } } }); it will work with filter that way 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.