Commit 6fc6797baa76da34e25e67e1f6bd7c82db32876d

Authored by Daniela Feitosa
2 parents 1b7ba1f1 dd76838c

Merge branch 'fix_create_institution' into 'master'

Fix create institution

@daniela e @joenio

Erro na criação de instituição pelo painel de admin "/plugin/gov_user/create_institution_admin"

ISSUE: https://softwarepublico.gov.br/gitlab/softwarepublico/softwarepublico/issues/424

See merge request !163
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 %>