lemonldap-ng/lemonldap-ng-portal/site/coffee/confirm.coffee

23 lines
407 B
CoffeeScript
Raw Normal View History

2017-01-19 22:48:07 +01:00
# Timer for confirmation page
i = 5
timerIsEnabled = 0
2017-01-19 22:48:07 +01:00
go = () ->
$("#form").submit() if timerIsEnabled
2017-01-19 22:48:07 +01:00
timer = () ->
h = $('#timer').html()
if h
timerIsEnabled = 1
i-- if i>0
h = h.replace /\d+/, i
$('#timer').html h
setTimeout timer, 1000
2017-01-19 22:48:07 +01:00
$(document).ready ->
2017-03-16 21:48:25 +01:00
setTimeout go, 30000
2017-01-19 22:48:07 +01:00
setTimeout timer, 1000
$("#refuse").on 'click', () ->
$("#confirm").attr "value", $(this).attr("val")