{"size": 420, "ext": "js", "max_stars_repo_path": "src/das/javascript/_forms.js", "max_stars_repo_name": "SkillsFundingAgency/das-shared-content", "max_stars_repo_stars_event_min_datetime": "2019-02-06T11:10:53.000Z", "max_stars_repo_stars_event_max_datetime": "2019-03-27T10:26:21.000Z", "max_issues_repo_path": "src/das/javascript/_forms.js", "max_issues_repo_name": "SkillsFundingAgency/das-shared-content", "max_issues_repo_issues_event_min_datetime": "2019-04-11T14:06:18.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T10:07:44.000Z", "max_forks_repo_path": "src/das/javascript/_forms.js", "max_forks_repo_name": "SkillsFundingAgency/das-shared-content", "max_forks_repo_forks_event_min_datetime": "2018-12-04T11:06:12.000Z", "max_forks_repo_forks_event_max_datetime": "2021-04-11T08:35:17.000Z"}
{"max_stars_count": 2, "max_issues_count": 14, "max_forks_count": 3, "avg_line_length": 23.3333333333, "max_line_length": 49, "alphanum_fraction": 0.5571428571}
var dasJs = dasJs || {};

dasJs.forms = {
  init: function () {
    this.preventDoubleSubmit();
  },
  preventDoubleSubmit: function () {
    var forms = $('form').not('.das-ajax-form');
    forms.on('submit', function (e) {
      var button = $(this).find('.govuk-button');
      button.attr('disabled', 'disabled');
      setTimeout(function () {
        button.removeAttr('disabled');
      }, 20000);
    });
  }
};
