Sha256: afb0d89cc47491d74d8f003d0322da7724ec1d9d64f22465f1a582262bb0f2fa

Contents?: true

Size: 400 Bytes

Versions: 2

Compression:

Stored size: 400 Bytes

Contents

$(fucntion(){
  $('form.no-enter-submit').bind("keypress", function(e) {
    if (e.keyCode == 13) {
      e.preventDefault();
      return false;
    }
  });

  $('form.disable-on-submit').on('submit', function(e){
    $(this).find(".btn").addClass('disabled')
  })

  ClientSideValidations.callbacks.form.fail = (form, eventData){
    $("form.disable-on-submit .btn").removeClass('disabled')
  }
})

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
minimum_viable_product-0.0.40 app/assets/javascripts/minimum_viable_product/init/forms.js
minimum_viable_product-0.0.39 app/assets/javascripts/minimum_viable_product/init/forms.js