// from govuk_frontend_toolkit
//= require vendor/polyfills/bind

// from govuk_elements
//= require details.polyfill

//= require jquery
//= require jquery.validate
//= require govuk/selection-buttons
//= require_tree .
//= require piwik

window.GOVUK.validation.init();
window.GOVUK.selectDocuments.init();
window.GOVUK.selectPhone.init();
window.GOVUK.willItWorkForMe.init();
window.GOVUK.feedback.init();

$(function () {
  // Use GOV.UK selection-buttons.js to set selected and focused states for block labels
  var $blockLabelInput = $(".block-label").find("input[type='radio'],input[type='checkbox']");
  new GOVUK.SelectionButtons($blockLabelInput);

  window.GOVUK.validation.attach();
  window.GOVUK.signin.attach();
  window.GOVUK.autoSubmitForm.attach();
});

// from govuk_frontend_toolkit
//= require vendor/polyfills/bind

// from govuk_elements
//= require details.polyfill

//= require jquery
//= require jquery_ujs
//= require jquery.validate
//= require govuk/selection-buttons
//= require_tree .
//= require piwik

window.GOVUK.validation.init();
window.GOVUK.selectDocuments.init();
window.GOVUK.selectPhone.init();
window.GOVUK.willItWorkForMe.init();
window.GOVUK.feedback.init();

$(function () {
  // Use GOV.UK selection-buttons.js to set selected and focused states for block labels
  var $blockLabelInput = $(".block-label").find("input[type='radio'],input[type='checkbox']");
  new GOVUK.SelectionButtons($blockLabelInput);

  window.GOVUK.validation.attach();
  window.GOVUK.signin.attach();
  window.GOVUK.autoSubmitForm.attach();
});

Revert "BAU: remove unused jQuery UJS library"
Revert "BAU: remove unused jQuery UJS library"

This reverts commit b965059cefcca710e2fe232629f06cd9b87e7e07.

We didn't realise UJS automatically adds the CSRF token into the request
headers - so we started seeing Rails "missing CSRF token" errors in
response to AJAX requests.

Authors: 3708ce2d6828520f8dfb5991b9e0ba4fbc232136@leoshaw
