Commit d52a3281 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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
parents 2e8f4bf3 1a4c9118
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
= form_for [:admin, @user], html: { class: 'form-horizontal' } do |f| = form_for [:admin, @user], html: { class: 'form-horizontal' } do |f|
-if @user.errors.any? -if @user.errors.any?
#error_explanation #error_explanation
%ul.unstyled.alert.alert-danger .alert.alert-danger
- @user.errors.full_messages.each do |msg| - @user.errors.full_messages.each do |msg|
%li= msg %p= msg
%fieldset %fieldset
%legend Account %legend Account
......
= form_for [@project, @page], method: @page.persisted? ? :put : :post, html: { class: 'form-horizontal' } do |f| = form_for [@project, @page], method: @page.persisted? ? :put : :post, html: { class: 'form-horizontal' } do |f|
-if @page.errors.any? -if @page.errors.any?
#error_explanation #error_explanation
%h2= "#{pluralize(@page.errors.count, "error")} prohibited this wiki from being saved:" .alert.alert-danger
%ul
- @page.errors.full_messages.each do |msg| - @page.errors.full_messages.each do |msg|
%li= msg %p= msg
= f.hidden_field :title, value: @page.title = f.hidden_field :title, value: @page.title
.form-group .form-group
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment