diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-04-04 21:25:38 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-04-04 21:37:07 -0400 |
commit | 7a2370f74060b2f065e3602700fe1b33fda4685c (patch) | |
tree | 0c23a588515e857598d5e389cd55aa816d3cfe35 /app/views/profiles/keys | |
parent | 2ed6cd9e469ffcdb60f21d1738de1eff8c258432 (diff) | |
download | gitlab-ce-7a2370f74060b2f065e3602700fe1b33fda4685c.tar.gz |
Standardize the way we check for and display form errorsrs-form_errors
- Some views had a "Close" button. We've removed this, because we don't
want users accidentally hiding the validation errors and not knowing
what needs to be fixed.
- Some views used `li`, some used `p`, some used `span`. We've
standardized on `li`.
- Some views only showed the first error. We've standardized on showing
all of them.
- Some views added an `#error_explanation` div, which we've made
standard.
Diffstat (limited to 'app/views/profiles/keys')
-rw-r--r-- | app/views/profiles/keys/_form.html.haml | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/views/profiles/keys/_form.html.haml b/app/views/profiles/keys/_form.html.haml index 4d78215ed3c..b3ed59a1a4a 100644 --- a/app/views/profiles/keys/_form.html.haml +++ b/app/views/profiles/keys/_form.html.haml @@ -1,10 +1,6 @@ %div = form_for [:profile, @key], html: { class: 'js-requires-input' } do |f| - - if @key.errors.any? - .alert.alert-danger - %ul - - @key.errors.full_messages.each do |msg| - %li= msg + = form_errors(@key) .form-group = f.label :key, class: 'label-light' |