Skip to content
Snippets Groups Projects
Commit 3e1e6cb3 authored by Tyler R Lemburg's avatar Tyler R Lemburg
Browse files

Added auto-logout if user and kiosk mode after 10 minutes

parent 2ee6251c
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,6 @@ EIGHT_PM_MINUTES = 1200 # end time of calendar
</h1>
</div>
<% if kiosk_mode %>
<div class="kiosk-buttons">
<% if @user %>
......@@ -48,7 +47,7 @@ EIGHT_PM_MINUTES = 1200 # end time of calendar
<div class="time-chart">
<% (12..39).each do |j| %>
<div class="calendar-half-hour">
<label><%= "#{(j / 2) % 12 + (j==24?12:0)} #{j>=24?'PM':'AM'}" if j % 2 == 0 %></label>
<label><%= "#{(j / 2) % 12 + (j==24?12:0)} #{j>=24? 'PM':'AM'}" if j % 2 == 0 %></label>
</div>
<% end %>
</div>
......@@ -274,4 +273,12 @@ require(['jquery', '/js/functions.js', '/js/jquery.mousewheel.min.js', '/js/jque
setInterval(tick, 60000);
});
});
</script>
\ No newline at end of file
</script>
<% if @user && kiosk_mode # auto logout after 10 minutes! %>
<script type="text/javascript">
window.setTimeout(function() {
window.location = '/kiosk-logout/?url_redirect=' + encodeURIComponent(window.location);
}, 10*60*1000);
</script>
<% end %>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment