$ ->
  if ($('#plate-authorization-page').length > 0)

    $('#gate-filter').selectpicker()

    startMoment = moment.unix($('#startDate').val())
    $("#startDate").datepicker("setDate", startMoment.toDate())

    endMoment = moment.unix($('#endDate').val())
    $("#endDate").datepicker("setDate", endMoment.toDate())

    $('[data-form-action]').each ->
      $this = $(@)
      $form = $($this.data('target'))
      $this.nuclear
        alertText: $this.data('confirm-text')
        onClick: ->
          $form.attr('action', $this.data('form-action')).submit()
        delay: 0
