Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2022 05:36 PM
No matter how I format my message string, this is not the modal is displayed:
(image attached)
Code from UI Action: (tried formatting the message these 3 ways)
var message = '\<p\>\<span style=\"color: #ff0000;\"\>WARNING:\</span\> The actual start date/time is before the CAB approved start date/time. If this is not an error, the change implementer or manager must call the Command Center etc etc\</p\>';
var message1 = '<p><span style="color: #ff0000;">WARNING:</span> The actual start date/time is before the CAB approved start date/time. If this is not an error, the change implementer or manager must call the Command Center foo barr</p>';
var message2 = '<p><span style="color: #ff0000;">WARNING:</span> The actual start date/time is before the CAB approved start date/time. If this is not an error, the change implementer or manager must call the Command Center yata yata </p>'
var dialog = new GlideModal("glide_confirm_standard", true, 450);
dialog.setTitle(new GwtMessage().getMessage('Confirmation'));
dialog.setPreference("title", message);
dialog.setPreference("warning", "true");
dialog.setPreference("onPromptComplete", doComplete);
dialog.setPreference("onPromptCancel", doCancel);
dialog.render();
UI Page: glide_confirm_standard
<g:ui_form onsubmit="return invokePromptCallBack('ok');">
<g2:evaluate>
var title = "${RP.getWindowProperties().get('title')}";
title = new GlideStringUtil().unEscapeHTML(title);
var warning = "${RP.getWindowProperties().get('warning')}";
warning = new GlideStringUtil().unEscapeHTML(warning);
</g2:evaluate>
<table border="0" width="100%">
<tr>
<td nowrap="true" style="vertical-align:top;">
<j2:switch on="$[warning]">
<j2:case value="true">
<i id="image_dialog" class="dialog_left_icon dialog_left_icon_warn icon-alert-triangle"/>
</j2:case>
<j2:default>
<i id="image_dialog" class="dialog_left_icon dialog_left_icon_confirm icon-check-circle"/>
</j2:default>
</j2:switch>
</td>
<td>
<table border="0" width="100%">
<tr>
<td class="dialog_content">$[title]</td>
</tr>
<tr class="dialog_buttons_row">
<td class="dialog_buttons">
<g:dialog_buttons_ok_cancel ok="invokePromptCallBack('ok');" ok_type="button" cancel="invokePromptCallBack('cancel')" cancel_type="button"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</g:ui_form>
Solved! Go to Solution.
Labels:
- Labels:
-
Scripting and Coding
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2022 10:10 PM
Please refer to the link below
https://community.servicenow.com/community?id=community_blog&sys_id=211361f8dbac5d505205e6be13961929
Thanks & Regards,
Vasanth
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2022 10:10 PM
Please refer to the link below
https://community.servicenow.com/community?id=community_blog&sys_id=211361f8dbac5d505205e6be13961929
Thanks & Regards,
Vasanth