From 9cf94eec5ae98f750f9babc0c37373df87e3981c Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 2 Jul 2017 15:30:30 -0400 Subject: Styled flash and errors in admin panel --- app/views/admin/blogs/_form.html.haml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'app/views/admin/blogs') diff --git a/app/views/admin/blogs/_form.html.haml b/app/views/admin/blogs/_form.html.haml index 55a297a..4a1c410 100644 --- a/app/views/admin/blogs/_form.html.haml +++ b/app/views/admin/blogs/_form.html.haml @@ -1,7 +1,3 @@ -- if f.object.errors.any? - %ul#errors - - f.object.errors.full_messages.each do |error| - %li= error %fieldset#content .title-field = f.label :title @@ -13,6 +9,12 @@ = f.label :body = f.cktext_area :body %fieldset#details + - if f.object.errors.any? + #errors.details-module + %h3 Error! + %ul + - f.object.errors.full_messages.each do |error| + %li= error .details-module = f.fields_for :records, Record.new do |builder| .should-create-record-field -- cgit 1.4.1