Data Certification-Make "Optional comment for checked elements" mandatory for failed elements
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2014 06:10 AM
Hi,
I know it may not be a good idea to play around with OOTB functionality.However , would to know if there is a way where I can alert user to fill in "comments" without fail for the failed certification elements.Looked at the different UI Macros and UI Pages but not able to see from it gets controlled.
Any thoughts or other means of implementation?
--Mahesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 02:17 AM
Hi @Arpan6 ,
I tried this method but no luck, just checking if this solution has worked for you.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 06:55 AM
Hi @Arpan6 ,
I tried this method, for some reason the function is not getting called in the UI script. Did you made any other changes aprt from the changes in the UI script?
Thanks,
Shantanu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2022 11:16 AM
I have similar requirement. If checked element is empty then alert should be popup that "user cannot certify empty elements" and for those empty elemets certification should be aborted.
can someone help me for the same?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 05:35 AM
Hello,
all you have to do is to change UI Macro "cert_task_data_button_row".
In the <script> part add this code:
// Function to validate the certification comment
function validateCertComment() {
var mandatoryComment = "${gs.getMessage('Please fill in the mandatory comment before failing to certify.')}";
var commentInput = document.getElementById('cert_comment');
if (commentInput.value == '' || commentInput.value == commentInput.alt) {
alert(mandatoryComment);
return false;
}
return true;
}
Change in the script the button slightly:
<span>
<image class="pointerhand" src="images/certification_fail.png" id="fail_checked_elements" onclick="if (validateCertComment()) { failCheckedElements() };" title="${JS:gs.getMessage('Fail certification for checked elements')}"/>
</span>
Also the default text for cert_comment element could be changed. Do not forget then to change UI Messages:
<span id="cert_comment_span">
<input id="cert_comment" class="comment_out" size="40"
onkeypress="$('info_2').setStyle({visibility:''});if (event.keyCode == 13) Event.stop(event);"
onfocus="commentFocus(this);"
onblur="commentBlur(this);"
alt="${JS:gs.getMessage('Mandatory comment for checked elements')}"
value="${JS:gs.getMessage('Mandatory comment for checked elements')}"
default_value="${JS:gs.getMessage('Mandatory comment for checked elements')}"/>
</span>
Please mark my answer as Correct if you find it useful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 02:18 AM