app/views/iugu/shared/_notices.html.haml in iugusdk-1.0.4 vs app/views/iugu/shared/_notices.html.haml in iugusdk-1.0.5

- old
+ new

@@ -1,27 +1,21 @@ -%div{ :style => "position:relative;height:1px;width:1px;display:inline"} - %a{ name: group, :style => "display: block; position: absolute; top: -80px; width: 2px; height: 2px" } +- flash[:group] = :general if flash[:group].blank? - if flash[:group] == group - [:notice, :warning, :error, :info].each do |flash_type| - color = nil - - color = "green" if flash_type == :notice - - color = "red" if flash_type == :error - - color = "blue" if flash_type == :info + - color = "success" if flash_type == :notice + - color = "danger" if flash_type == :error + - color = "info" if flash_type == :info + - color = "warning" if flash_type == :warning - if flash[flash_type] - %div{ class: (color ? "notice notice-#{color}" : "notice") } - %button.close{ :'data-dismiss' => "notice" } - × - %h4.notice-heading - = flash[flash_type] + %div{ class: (color ? "alert alert-#{color}" : "alert") } + = flash[flash_type] - resource = nil unless resource - if resource && resource.errors.any? - .notice.notice-red - %h4.notice-heading - = I18n.t "simple_form.error_notification.default_message" - + .alert.alert-danger - if resource.errors.any? %ul - resource.errors.full_messages.each do |msg| %li = msg