2017-01-19 22:48:07 +01:00
|
|
|
# Timer for confirmation page
|
|
|
|
|
|
|
|
i = 5
|
2017-06-22 11:04:52 +02:00
|
|
|
timerIsEnabled = 0
|
2017-01-19 22:48:07 +01:00
|
|
|
|
|
|
|
go = () ->
|
2017-06-22 11:04:52 +02:00
|
|
|
$("#form").submit() if timerIsEnabled
|
2017-01-19 22:48:07 +01:00
|
|
|
|
|
|
|
timer = () ->
|
|
|
|
h = $('#timer').html()
|
2017-06-22 11:04:52 +02:00
|
|
|
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")
|