We have a requirement to change the default text of the comment box that shows up on certifications. Currently the text box says “Type your comments here”. We would like to change that wording to give additional instructions.
We can’t figure out which item needs to be modified in the configuration files. Does anyone have any guidance on this?
This text is part of the iiqMessages.properties file from IdentityIQ and can be overwritten.
There are 4 labels in the iiqMessages file with a similar text:
ui_comment_textarea_placeholder=Type your comment here
ui_access_request_comments_placeholder_text=Type your comment here...
ui_violation_comment_placeholder_text=Type your comment here...
ui_certification_schedule_timeline_closing_comments_descr=Type your comment here
I think the one you are searching for is the first one: ui_comment_textarea_placeholder
You can add that label to the iiqCustom.properties properties files located in the \WEB-INF\classes\sailpoint\web\messages\ folder. It will override the default value.
If I am correct there is no need to restart the application server (Tomcat), but the browser cache must be cleared to see the change.
This is the one I want: ui_comment_textarea_placeholder
I updated that item to have my custom text. I then launched a cert and looked at the comment box and it DID have my custom text. So, I have a fix for my issue.
However, that same text is now showing up on access request approval comments.
It is common to have the same placeholder in multiple places when it is assumed to hold the same text.
If you just want to change one single text on a specific page, you should look outside of the options provided by OOTB IdentityIQ. This might be using a simple jQuery or recompilling/overwritting IIQ classes or something else.
I’m just getting back to this. We have never done any JS mods on our end, so I’m looking for a little help in getting started.
Is there a doc that I can reference that would show how to find where the content lives that I want to modify? Has anyone else written JS to customize a comment box?
There is no single documentation on how to get the references from the pages other than the OOTB localization white paper which contains the basics already answered in this thread.
For the more advanced stuff you need to user other tooling.
I normally use Chrome with the Developer Tools and jQuery to do the selection.
A quick search on something nice for the developer tools (ctrl-shift-i): The Web Platform Course
And for jQuery: jQuery Tutorial
As this file is included in all IIQ pages, I am using the location.href to see on which page to ‘include’ the jQuery-statement. For you this should be:
Thanks for the reply. Your code works great I the developer console, but when I add it to custom.js and restart tomcat, it doesn’t seem to execute when I navigate to the certification.jsf page and click on the Revoke button (like it does in the dev console).
Do I need to activate something to start using custom.js?
$(document).ready(function(){
if(window.location.href.indexOf("certification.jsf") > -1) {
$('label[for="commentTextArea"]').text('New text for comment');
}
});
The Comment Box is only created when the menu option ‘Comment’ is used, so the label[for="commentTextArea"]' is not available when the page is loaded, therefor the jQuery doesn’t do anything.
The simplest solution is to check on a regular interval if the element exists and when it appears directly change the text.
Untested code:
$(document).ready(function(){
if(window.location.href.indexOf("certification.jsf") > -1) {
var CONTROL_INTERVAL = setInterval(function(){
// Check if element exist
if($('label[for="commentTextArea"]').length > 0){
// Since element is created, no need to check anymore
clearInterval(CONTROL_INTERVAL);
//change text
$('label[for="commentTextArea"]').text('New text for comment');
}
}, 100); // check for every 100ms
}
});
I hope this works
There is another way to adjust it, but not advisable!
It is tricky and gets overwritten during patches and upgrades.
The code to create the comment-box is In the file ui/js/bundles/SailPointBundleLibrary.js :
Thanks a bunch for all of your help on this. I actually went down a different path since I was a little concerned about running the JS every 100ms (which is what was needed, since running it only once would only work for the first button click).
Here is what I ended up with (assisted by Claude and ChatGPT ):
// only run on the Certifications page
if(window.location.href.indexOf("certification.jsf") > -1) {
// check to see if the Revoke button is loaded before trying to change the Comment text value on it
function checkButtonLoaded() {
let $button = $('button.btn.btn-white.btn-sm.icon-btn.m-r-xs.cert-action-Remediated');
if ($button.length > 0) {
$("button.btn.btn-white.btn-sm.icon-btn.m-r-xs.cert-action-Remediated").click(function() {
let $label = $('label[for="commentTextArea"]');
// instruct the revoker what is required for revocations
$label.text('Enter a reason for this revocation');
});
} else {
// button not yet loaded, check again after 1 second
setTimeout(checkButtonLoaded, 1000);
}
}
checkButtonLoaded();
}
});
This is working as expected. Thanks again for your guidance getting to this point!