Skip to content

Commit

Permalink
Fix issue 165 on showing modal to authenticated users
Browse files Browse the repository at this point in the history
  • Loading branch information
vmesel committed Nov 3, 2019
1 parent 81951e9 commit 49f22f7
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions pyjobs/core/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,18 @@ <h5>{{WEBSITE_NAME}}</h5>
<script src="{% static 'assets/js/jquery.min.js' %}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
<script src="{% static 'assets/bootstrap/js/bootstrap.min.js' %}"></script>
{% include 'modal_donate.html'%}
<script>
$(document).ready(function(){
if (document.cookie.indexOf("visitado=") >= 0) {}
else {
document.cookie = "visitado=yes; expires=Fri, 31 Dec 9999 23:59:59 GMT";
$("#modal-donate").modal();
}
});
</script>
{% if not user.is_authenticated %}
{% include 'modal_donate.html'%}
<script>
$(document).ready(function(){
if (document.cookie.indexOf("visitado=") >= 0) {}
else {
document.cookie = "visitado=yes; expires=Fri, 31 Dec 9999 23:59:59 GMT";
$("#modal-donate").modal();
}
});
</script>
{% endif %}
<script src="{% static 'assets/js/theme.js' %}"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
Expand Down

0 comments on commit 49f22f7

Please sign in to comment.