diff --git a/app/assets/javascripts/sitewide/form_errors.js b/app/assets/javascripts/sitewide/form_errors.js index 8a11b5723..789ce42bc 100644 --- a/app/assets/javascripts/sitewide/form_errors.js +++ b/app/assets/javascripts/sitewide/form_errors.js @@ -42,8 +42,9 @@ var renderFormError = function(ev, input, errMsgs, clearErr, errAttributes) { } var $errSpan = "' + errorText + ''; + errAttributes + '>' + errorText + '.' + ''; $(input).after($errSpan); + $(input).closest('.modal').modal('handleUpdate'); } var $parent; diff --git a/app/assets/stylesheets/shared/form_errors.scss b/app/assets/stylesheets/shared/form_errors.scss index d0ec643f0..52a441c8a 100644 --- a/app/assets/stylesheets/shared/form_errors.scss +++ b/app/assets/stylesheets/shared/form_errors.scss @@ -4,3 +4,10 @@ color: $brand-danger; } } + +.form-group.has-error { + margin-bottom: 0; + div.form-control { + height: auto; + } +} diff --git a/app/controllers/experiments_controller.rb b/app/controllers/experiments_controller.rb index 13eb02177..795df0279 100644 --- a/app/controllers/experiments_controller.rb +++ b/app/controllers/experiments_controller.rb @@ -310,7 +310,7 @@ class ExperimentsController < ApplicationController view_type = view_state.state['my_modules']['view_type'] || 'canvas' path = view_mode_redirect_url(view_type) else - message = service.errors.values.join(', ') + message = "#{service.errors.values.join('. ')}." status = :unprocessable_entity end