Document Preview: restrict edit button on the HR agent Workspace configurable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 10:51 PM
I want to hide the EDIT button on the Preview Document pop up in the HR agent Workspace [configurable].
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 11:04 PM
Hide the Button Using CSS (in Client Script or Style):
- If you find the EDIT button, you can either remove it directly from the markup or apply CSS to hide it.
- Use the CSS class or ID assigned to the EDIT button and apply a display: none; style to it.
Example:
.edit-button-class { /* Replace with the actual class or ID */
display: none;
}
If the button doesn’t have a class, you can inspect the DOM to find an element identifier or manually add one to hide it.
Use a Client Script for Conditional Display: You can also use client scripts to hide the button programmatically. For example, if the button is part of a form or page in the workspace, you can hide it conditionally:
document.querySelector('.edit-button-class').style.display = 'none'; // Replace with actual selector
This script can be added within the Workspace Page Definition to control when and where the button is hidden.
✔️ If this solves your issue, please mark it as Correct.
✔️ If you found it helpful, please mark it as Helpful.
—
Shubham Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
Hi @AnkitS954229730 ,
This is the functionality available in Preview Document Ui action which is having ui pages.
You need to go to Ui pages then search for 'preview_html_document_dialog'.
now open and in HTML code check for 'edit_button' in line no 139 then replace that line of code with below one:
<button id="edit_button" class="btn btn-primary" onClick="return clickEdit();" >
and save then you can see edit button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
Thank you Rajender, This was very helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
@AnkitS954229730 did you able to solve this?
