MOM.modal.openSessionModal(options);
title: 'Your session is about to expire',
message: 'You will be logged out in <strong>{time}</strong> seconds. Do you want to stay logged in?',
confirm_action: 'javascript:fnConfirmSessionExtend()',
cancel_action: 'javascript:void(0)',
confirm_button_title: 'Yes, keep me signed in',
cancel_button_title: 'No, Sign me out'
MOM.modal.closeSessionModal()
MOM.modal.updateSessionModal(time)
MOM.modal.openSessionModal({
title: 'Hey session expiring',
message: 'Expiring in {time}'
confirm_action: 'javascript:fnConfirmSessionExtend()',
cancel_action: 'javascript:void(0)',
confirm_button_title: 'Yes continue session',
cancel_button_title: 'Cancel'
})
MOM.modal.updateSessionModal(60)
// You have to use setInterval and call this function to update the time
var sessionInterval = setInterval( function(){
MOM.modal.updateSessionModal(30)
}, 1000)
// Clear the interval and close the modal once done
clearInterval(sessionInterval)
MOM.modal.closeSessionModal();