Hide/Disable Post button in Portal

ican
Tera Contributor

I would like to disable/hide "Post" button in Portal Form Activity logs:

ican_0-1765984566700.png

Also make the text field read-only as well without touching the ACL.

 

Is this possible?

 

Thanks.

6 REPLIES 6

prajaktajga
Tera Expert

1.Possible in Service Portal, and you can do it without touching ACLs, but not via UI Policies. It requires widget-level customization.

2.Don't modify OOTB widgets directly.

Go to Service Portal → Widgets

Find: Activity Stream

Clone it


3.Widget Server Script

data.readOnly = true;

Or conditionally:

data.readOnly = !gs.hasRole('itil');


4.Widget HTML


<textarea ng-disabled="data.readOnly"></textarea>

<button class="btn btn-primary"
ng-disabled="data.readOnly">
Post
</button>

When i clone the Activity Stream widget, how do i point the Form widget to the Activity Stream cloned widget instead of the OOB one?

 

Thanks