lib/public/javascripts/edifice/edifice_form.js in edifice-0.6.4 vs lib/public/javascripts/edifice/edifice_form.js in edifice-0.6.5
- old
+ new
@@ -87,11 +87,12 @@
add_error: function($field, error) {
var id = $field.attr('id');
$field.wrap('<div class="field_with_errors">');
this.find('label[for=' + id + ']')
- .wrap('<div class="field_with_errors">')
- .after('<div class="formError">' + error + '</div>');
+ .after('<div class="formError">' + error + '</div>')
+ .wrap('<div class="field_with_errors">');
+
},
set_errors: function(errors) {
for (var name in errors) {
this.add_error(this.fields().filter('[name*=' + name + ']'), errors[name][0]);
\ No newline at end of file