File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Client-Side Components/UI Scripts/User acknowledgement Using UI script and user preferences Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ < ?xml version = "1.0" encoding = "utf-8" ?>
2+ < j :jelly trim = "false" xmlns :j = "jelly:core" xmlns :g = "glide" xmlns :j2 = "null" xmlns :g2 = "null" >
3+ < g :ui_form >
4+ < div class = "modal-body" >
5+ < h1 class = "text-center" > Important Message</ h1 >
6+ < p > Please read and acknowledge this important message before proceeding.</ p >
7+ < p >
8+ Your access will be revoked if you don't log in for 30 days!
9+ </ p >
10+ < div class = "text-center" style = "margin-top: 20px;" >
11+ < button id = "acknowledge_btn" class = "btn btn-primary" onclick = "return closeDialog();" > Acknowledge</ button >
12+ </ div >
13+ </ div >
14+ </ g :ui_form >
15+ < script >
16+ (function() {
17+ function closeDialogAndRedirect ( ) {
18+ try {
19+ GlideDialogWindow . get ( ) . destroy ( ) ;
20+ } catch ( e ) { }
21+
22+ // Set user preference
23+ if ( typeof setPreference === 'function' ) {
24+ setPreference ( 'login.consent1' , 'true' ) ;
25+ }
26+ // Redirect to home.do
27+ window . top . location . href = 'home.do' ;
28+ }
29+ document . getElementById ( 'acknowledge_btn' ) . addEventListener ( 'click' , closeDialogAndRedirect ) ;
30+ } )();
31+ </ script >
32+
33+ </ j :jelly >
You can’t perform that action at this time.
0 commit comments