6e27659c51
This reverts commit b77d45eca9
25 lines
476 B
CoffeeScript
25 lines
476 B
CoffeeScript
# Timer for confirmation page
|
|
|
|
i = 5
|
|
timerIsEnabled = 0
|
|
|
|
go = () ->
|
|
$("#form").submit() if timerIsEnabled
|
|
|
|
timer = () ->
|
|
h = $('#timer').html()
|
|
if h
|
|
timerIsEnabled = 1
|
|
i-- if i>0
|
|
h = h.replace /\d+/, i
|
|
$('#timer').html h
|
|
setTimeout timer, 1000
|
|
|
|
$(document).ready ->
|
|
setTimeout go, 30000
|
|
setTimeout timer, 1000
|
|
$(".idploop").on 'click', () ->
|
|
$("#idp").val $(this).attr("val")
|
|
$("#refuse").on 'click', () ->
|
|
$("#confirm").attr "value", $(this).attr("val")
|