app/assets/javascripts/ajax_forms.js.erb in alchemy-ajax-form-1.2.0 vs app/assets/javascripts/ajax_forms.js.erb in alchemy-ajax-form-1.2.1

- old
+ new

@@ -27,11 +27,11 @@ var add_errors = function (form, errors) { $.each(errors, function (name, value) { - var input = $(form).find("*:not([type='hidden'])[name*='" + name + "']") + var input = $(form).find("*:not([type='hidden'])[name*='[" + name + "]']") $(input).addClass("invalid"); if ($(input).parent().children('.error-message').length == 0) { @@ -137,10 +137,10 @@ var container_div = $('<div class="invisible_recaptcha_container"></div>'); $(submit_button).before(container_div); var widget_id = grecaptcha.render(container_div[0], { 'sitekey': '<%= Recaptcha.configuration.site_key! %>', - 'badge': 'inline', + 'badge': '<%= Alchemy::Ajax::Form.recaptcha_badge %>', 'size': 'invisible', 'callback': function () { submit_function(form, method, action); } });