<%= _("Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria.") % { :environment => environment.name }%>
<%end %>
<% unless flash[:errors].blank? %>
<%= labelled_form_for :community,:html => { :multipart => true, :id=>"institution_form" } do |f| %>
<%= hidden_field_tag "edit_institution_page", true %>
<%= fields_for :institutions do |inst| %>
<%= _("Public Institution") %>
<%= radio_button_tag("institutions[type]", "PublicInstitution", (@institution.type == "PublicInstitution" ? true : false)) %>
<%= _("Private Institution") %>
<%= radio_button_tag("institutions[type]" ,"PrivateInstitution", (@institution.type == "PrivateInstitution" ? true : false))%>
<%= required f.text_field(:name, :value => @institution.community.name) %>
<%= content_tag :span, _("Institution name already exists"), :id=>"already_exists_text", :class=>"errorExplanation hide-field" %>
<%= inst.label "corporate_name", _("Corporate Name"), :class=>"formlabel" %>
<%= required inst.text_field(:corporate_name, :value => @institution.corporate_name) %>
<%= required select_country(_('Country'), 'community', 'country', {:class => 'type-select', :id => "community_country"}, :selected => @institution.community.country) %>
<%= _("State") %>
<%= f.select(:state, @state_list.collect {|state| [state.name, state.name]}, :selected => @institution.community.state) %>
<%= required f.text_field(:city, :value => @institution.community.city) %>
<%= inst.label("cnpj" ,_("CNPJ"), :class=>"formlabel") %>
<%= required inst.text_field(:cnpj, :placeholder=>"99.999.999/9999-99", :class=>"intitution_cnpj_field", :value => @institution.cnpj) %>
<%= hidden_field_tag "acronym_translate", _("Acronym") %>
<%= hidden_field_tag "fantasy_name_translate", _("Fantasy name") %>
<%= inst.label("acronym" ,_("Acronym"), :class=>"formlabel") %>
<%= inst.text_field(:acronym, :value => @institution.acronym) %>
<%= inst.label("governmental_sphere_id" ,_("Governmental Sphere:"), :class=>"formlabel") %>
<%= inst.select(:governmental_sphere, [[_("Select a Governmental Sphere"), 0]]|GovernmentalSphere.all.map {|s| [s.name, s.id]}, {:selected=>@institution.governmental_power_id})%>
<%= inst.label("governmental_power_id" ,_("Governmental Power:"), :class=>"formlabel") %>
<%= inst.select(:governmental_power, [[_("Select a Governmental Power"), 0]]|GovernmentalPower.all.map {|g| [g.name, g.id]}, {:selected=> @institution.governmental_sphere_id})%>
<%= inst.label("juridical_nature_id" ,_("Juridical Nature:"), :class=>"formlabel") %>
<%= inst.select(:juridical_nature, [[_("Select a Juridical Nature"), 0]]|JuridicalNature.all.map {|j| [j.name, j.id]}, {:selected=> @institution.juridical_nature_id})%>
<%= _("SISP?") %>
<% if @show_sisp_field %>
<%= inst.label("sisp" ,_("Yes")) %>
<%= inst.radio_button(:sisp, true, :checked=>(@institution.sisp ? true : false)) %>
<%= inst.label("sisp" ,_("No")) %>
<%= inst.radio_button(:sisp, false, :checked=>(@institution.sisp ? false : true)) %>
<% else %>
<%= inst.label("sisp", _("No")) %>
<% end %>
<%= submit_button :save, _('Save') %>
<% end %>
<% end %>