- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2020 07:36 AM
Experts,
I have a requirement to change the confirm default button text from (ok/Cancel) to (Submit/Attach) when submitting a record producer from Portal.
For Spmodal.open, we have the option to pass buttons parameter to show on the dialog, but I am not sure how we can pass it for spmodal.confirm.
Please let me know if you have any solution/workaround for this.
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2020 10:21 PM
Hi,
Please use below code and check if it works for you.
Having your own widget to show as a popup gives you flexibility on what goes inside it.
Call g_user.showModalDialog - as per your requirement.
--> Write this in onLoad catalog client script
g_user.submitClicked = false;
g_user.showModalDialog = function(msg) {
if(NOW.window) { //Service portal
var shared = {};
shared.message = msg;
var popupOptions = {
title: 'title_name',
widget: 'id_of_the_widget_that_contains_what_should_be_there_in_popup',
widgetInput: 'any inputs that need to be passed to the widget',
shared: shared,
footerStyle: {display:'none'}
};
if(! g_user.submitClicked) {
g_user.submitClicked = true;
var modalInstance = spModal.open(popupOptions).then(function() {
g_form.submit();
}, function() {
g_user.submitClicked = false;
});
}
} else {
//Code to open popup in platform (you can use glide_confirm_standard)
}
};
--> Write this in onSubmit catalog client script
if(g_user.submitClicked)
return true;
return false;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2020 12:02 PM
Please note, I am trying this in catalog client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2020 10:21 PM
Hi,
Please use below code and check if it works for you.
Having your own widget to show as a popup gives you flexibility on what goes inside it.
Call g_user.showModalDialog - as per your requirement.
--> Write this in onLoad catalog client script
g_user.submitClicked = false;
g_user.showModalDialog = function(msg) {
if(NOW.window) { //Service portal
var shared = {};
shared.message = msg;
var popupOptions = {
title: 'title_name',
widget: 'id_of_the_widget_that_contains_what_should_be_there_in_popup',
widgetInput: 'any inputs that need to be passed to the widget',
shared: shared,
footerStyle: {display:'none'}
};
if(! g_user.submitClicked) {
g_user.submitClicked = true;
var modalInstance = spModal.open(popupOptions).then(function() {
g_form.submit();
}, function() {
g_user.submitClicked = false;
});
}
} else {
//Code to open popup in platform (you can use glide_confirm_standard)
}
};
--> Write this in onSubmit catalog client script
if(g_user.submitClicked)
return true;
return false;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2020 02:57 AM
Hi,
I posted an article on how to show custom popup when submitting a catalog in service portal. Please refer to it.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2020 10:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2020 11:10 AM
Hi,
In the widget for the div with class="modal-footer", also add a style attribute as given below:
style="border-top: none"
<div class="modal-footer" style="border-top: none">
Thanks