Remove the follow button

marskh111
Giga Contributor

I am trying to remove the follow button from the task table. I have inactivated the UI and it did not remove from the task form. I also have added a condition so it only shows for admins and it still didn't remove from the form. Any suggestions on how to remove this UI ACtion.

22 REPLIES 22

great, please mark my post as correct so this thread will get marked as answered.



//Göran


Hi harsh vardhan,


                                                    I have similar situation. we recently upgrade our instance. when the ticket is closed we need to take off the follow button. i tried this script but it is looks like this. is there any other solution for take off the follow button completely for only closed tickets.follow1.JPGFollow.JPG



Thanks


Hi Ram,



Please correct me if i am wrong.



you want to hide the follow button only when your ticket will close.


you have already hide the follow button and now you want to hide the "drop down". if yes check the below script.



function onCondition() {


var thePostButton = document.getElementsByClassName('btn btn-default dropdown-toggle');


        for (var i = 0; i < thePostButton.length; i++) {


                  thePostButton[i].style.color = 'transparent';


                  thePostButton[i].style.background = 'transparent';


                  thePostButton[i].style.border = 'none';


                  thePostButton[i].style.visibility = 'hidden';


        }


}



Or



you can also follow the goranlundqvist solution. but according to your requirement you want to hide only when your ticket will closed.



In this scenario you can write server side code to get the properties value and call it in your client script through Glide Ajax.



check the below thread. hope it will help you.


Access property from client script





Thanks,


Harshvardhan


I would consider if it's worth this. Doing this kind of customization is likly to break at upgrades when SN changes classes etc. Is it really worth this in the long run to hide a button when a ticket is closed?



//Göran


Hi Harsh vardan,



                        Hide the follow button when state is closed works fine. In the same way i have one similar question, when users are already following the the ticket then how can we hide the following button and when we do that how can we take off the chat from the que?latest following.PNG



Thanks!