Commits

Andriy Kornatskyy committed 2c6805b

Fixed few missprints in core.js in public demo.

Comments (0)

Files changed (1)

demos/public/content/static/js/core.js

                     value.pop()))
         }
         else {
+            key = key.replace(/_/g, '-');
             $('label[for="{0}"]'.format(key), form).addClass('error')
-            var field = $('#' + key.replace(/_/g, '-'), form);
+            var field = $('#' + key, form);
             field.addClass('error');
             field.after('<span class="error">{0}</span>'.format(
                 value.pop()));
                 if (jqXHR.status == 207) {
                     window.location.replace(jqXHR.getResponseHeader('Location'));
                 } else if (data.see_other) {
-                    window.location.replace(d.see_other);
+                    window.location.replace(data.see_other);
                 } else if (dataType == 'json'){
                     submit.removeAttr('disabled');
                     JSONForm(data, form);