From: Yoan Le Clanche Date: Tue, 9 Mar 2021 11:05:33 +0000 (+0100) Subject: Add popup message when user has not spent enough time on a seminar X-Git-Tag: 2.8.1-pro~167 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=927bf45addf851448122787b4f43a92789f9c1e3;p=teleforma.git Add popup message when user has not spent enough time on a seminar --- diff --git a/teleforma/templates/teleforma/seminar_detail.html b/teleforma/templates/teleforma/seminar_detail.html index 0a0f0297..859abf09 100644 --- a/teleforma/templates/teleforma/seminar_detail.html +++ b/teleforma/templates/teleforma/seminar_detail.html @@ -30,32 +30,51 @@ expandText: 'Lire plus', userCollapseText: 'Cacher le texte', }); + + + {% if popup_message %} + // show a warning popup and set a cookie to not display the popup each visit + if(getCookie('time-popup-view') != 1){ + $( "#warning-message" ).dialog({ + modal: true, + buttons: { + Ok: function() { + $( this ).dialog( "close" ); + var expirationDate=new Date(); + expirationDate.setDate(expirationDate.getDate() + 1); + setCookie('time-popup-view', 1 , 1); + } + } + }); + } + {% endif %} }); + +