(function() {
  "use strict";
  App.LegislationAdmin = {
    initialize: function() {
      $(".legislation-process-form").find("[name$='enabled]'],[name$='[published]']").on({
        change: function() {
          var checkbox;
          checkbox = $(this);

          checkbox.closest("fieldset").find("input[type='date']").each(function() {
            if (checkbox.is(":checked")) {
              $(this).removeAttr("disabled");
            } else {
              $(this).prop("disabled", true);
            }
          });
        }
      }).trigger("change");

      $("#nested_question_options").on("cocoon:after-insert", function() {
        App.Globalize.refresh_visible_translations();
      });
    }
  };
}).call(this);

(function() {
  "use strict";
  App.LegislationAdmin = {
    initialize: function() {
      $(".legislation-process-form").find("[name$='enabled]'],[name$='[published]']").on({
        change: function() {
          var checkbox;
          checkbox = $(this);

          checkbox.closest("fieldset").find("input[type='date']").each(function() {
            $(this).prop("disabled", !checkbox.is(":checked"));
          });
        }
      }).trigger("change");

      $("#nested_question_options").on("cocoon:after-insert", function() {
        App.Globalize.refresh_visible_translations();
      });
    }
  };
}).call(this);

Use prop() instead of removeAttr()
Use prop() instead of removeAttr()

According to the jQuery upgrade guide:

> It is almost always a mistake to use .removeAttr("checked") on a DOM
> element. The only time it might be useful is if the DOM is later going
> to be serialized back to an HTML string. In all other cases,
> .prop("checked", false) should be used instead.
