diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-05-20 15:44:45 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-05-20 15:44:45 +0000 |
commit | d52a3281dccefa5fcb774b9f0314abba7edfc820 (patch) | |
tree | 3d2ccb959ef64fa19ae5e6f902335521569d3161 | |
parent | 2e8f4bf39203f4c24ab6fb053b1bd5f3c7a20b86 (diff) | |
parent | 1a4c9118aec5c25bf39cdc6db640569bf5c6d0e9 (diff) | |
download | gitlab-ce-d52a3281dccefa5fcb774b9f0314abba7edfc820.tar.gz |
Merge branch 'small-ui-improvements' into 'master'
Small ui improvements
* fix ugly errors block when admin save invalid user
* fix ugly errors when you tries to save invalid wiki page
-rw-r--r-- | app/views/admin/users/_form.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/wikis/_form.html.haml | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 881a043f36f..b9e6382ea88 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -2,9 +2,9 @@ = form_for [:admin, @user], html: { class: 'form-horizontal' } do |f| -if @user.errors.any? #error_explanation - %ul.unstyled.alert.alert-danger + .alert.alert-danger - @user.errors.full_messages.each do |msg| - %li= msg + %p= msg %fieldset %legend Account diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml index c77ed3433d1..0c2e33f2282 100644 --- a/app/views/projects/wikis/_form.html.haml +++ b/app/views/projects/wikis/_form.html.haml @@ -1,10 +1,9 @@ = form_for [@project, @page], method: @page.persisted? ? :put : :post, html: { class: 'form-horizontal' } do |f| -if @page.errors.any? #error_explanation - %h2= "#{pluralize(@page.errors.count, "error")} prohibited this wiki from being saved:" - %ul + .alert.alert-danger - @page.errors.full_messages.each do |msg| - %li= msg + %p= msg = f.hidden_field :title, value: @page.title .form-group |