- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2019 05:11 AM
Hi,
we have a client script which opens a new window for some terms and conditions acknowledgement which is not working for the Service Portal.
Ihave found other references which relate to a widget but the ts&cs only need to appear under certain circumstances (which is controlled by a - working - UI script).
here is our script (which runs on all UIs) - can anyone suggest what we need to change please so that it will run on all UIs?
thanks in advance!
function onChange(control, oldValue, newValue, isLoading) {
if( newValue == 'agree'){
var dialog = new GlideDialogWindow('terms_and_conditions_dialog'); //Render the dialog containing the UI Page 'terms_and_conditions_dialog'
dialog.setTitle('Terms and Conditions'); //Set the dialog title
dialog.setSize(600,600); //Set the dialog size
dialog.removeCloseDecoration(); //Remove the dialog close icon
dialog.setPreference('cancel_url', 'catalog_home.do?sysparm_view=catalog_default'); //Set optional cancel redirect URL
dialog.render(); //Open the dialog
}
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2019 04:01 AM
In the end we put the ts&cs into a macro with label variable and embedded them into a widget for the Service Portal with a variable width specified for the display. Not perfect, but the ts&cs are at least visible now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2019 01:37 AM
Alas, we ended up dropping the pop up window completely - we now just have a macro variable within the catalog item and have the html in the widget, so not really the equivalent, but sufficient for what we needed to do (which was display the ts&cs).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2020 04:30 PM