Skip to content

Commit f16d27e

Browse files
authored
Confirm box using glide modal (#819)
* Create style.css * Create readme.md * Delete Styles/Add Background Color directory * Create glide_confirm.js Script to pop up a confirm box in your UI to make the UI rich and easy with the help of GlideModal. * Create readme.md * Update glide_confirm.js
1 parent 0775165 commit f16d27e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var gm = new GlideModal("glide_confirm", false, 600); // glide_confirm is the OOB prebuilt UI page.
2+
gm.setTitle("Conform box title"); // The title for your confirm message box
3+
gm.setPreference("title", "confirm box body"); // this will be the body for your confirm message
4+
gm.setPreference("warning", "false"); // put it true if you want to display a warning sign on your confirm box
5+
gm.setPreference("onPromptSave", function() {alert("You clicked on 'Save'")});
6+
gm.setPreference("onPromptDiscard", function() {alert("You clicked on 'Don't save'")});
7+
gm.setPreference("onPromptCancel", function() {alert("You clicked on 'Cancel'")});
8+
gm.render();

GlideModal/Confirm Message/readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This script will be helpful to get a confirm box with the help of GlideModal, this can be leveraged in your clint side scripts or UI actions. Confirm and alerts, which we get by
2+
using standard Javascript window methods can be easily blocked by user's browser, but GlideModal confirm will still display and this enhances the User exeprince.
3+
4+
With the help of this script we can get a confirmation pop-up with "Don't save", "Cancel", and "Save" buttons.

0 commit comments

Comments
 (0)