Commit dd76838c65bba8b8c493d9cc1452d44a3fdb4b68

Authored by Luciano Prestes
Committed by Daniela Feitosa
1 parent 1b7ba1f1

Fix bug on create institution on admin panel

Signed-off-by: Luciano Prestes Cavalcanti <lucianopcbr@gmail.com>
src/noosfero-spb/gov_user/views/gov_user_plugin/_institution.html.erb
@@ -13,26 +13,18 @@ @@ -13,26 +13,18 @@
13 </div> 13 </div>
14 14
15 <div class="spb-row spb-col spb-col-12"> 15 <div class="spb-row spb-col spb-col-12">
16 - <% unless flash[:errors].nil? %>  
17 - <div class="errorExplanation" id="errorExplanation">  
18 - <h2> <%= _("Can`t create new Institution: #{flash[:errors].length} errors") %> </h2>  
19 - <ul>  
20 - <% flash[:errors].each do |key, value| %>  
21 - <% key_name = key.to_s.gsub("_", " ") %>  
22 - <% if value.length > 0 %>  
23 - <li> <%= _("<b>#{key_name.capitalize}</b> #{value.join()}") %> </li> 16 + <% unless flash[:errors].blank? %>
  17 + <div class="errorExplanation" id="errorExplanation">
  18 + <h2><%= _("Can`t create new Institution: #{flash[:errors].length} errors") %></h2>
  19 + <ul>
  20 + <% flash[:errors].each do |error| %>
  21 + <li><%= error %></li>
24 <% end %> 22 <% end %>
25 - <% end %>  
26 - </ul>  
27 - </div> 23 + </ul>
  24 + </div>
28 <% end %> 25 <% end %>
29 </div> 26 </div>
30 27
31 -<div class="spb-row">  
32 - <div id='create_institution_errors' class='spb-col spb-col-12 errorExplanation hide-field'></div>  
33 -</div>  
34 -  
35 -  
36 <%= form_for :community, :url => {:action=>"new_institution"}, :html => { :multipart => true, :id=>"institution_form" } do |f| %> 28 <%= form_for :community, :url => {:action=>"new_institution"}, :html => { :multipart => true, :id=>"institution_form" } do |f| %>
37 29
38 <%= hidden_field_tag "edit_institution_page", false %> 30 <%= hidden_field_tag "edit_institution_page", false %>