<%= _('New Institution') %>

<% if environment.enabled?('admin_must_approve_new_communities') %>
<%= _("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 @errors.blank? %>

<%= _("Can`t create new Institution: #{@errors.length} errors") %>

<% end %>
<%= labelled_form_for :community, :html => { :multipart => true, :id=>"institution_form" } do |f| %> <%= required f.text_field(:name) %> <%= content_tag :span, _("Institution name already exists"), :id=>"already_exists_text", :class=>"errorExplanation hide-field" %> <%= fields_for :institutions do |inst| %>
<%= inst.label("cnpj" ,_("CNPJ"), :class=>"formlabel") %> <%= required inst.text_field(:cnpj, :placeholder=>"99.999.999/9999-99") %>
<%= label_tag("type_PublicInstitution", _("Public Institution")) %> <%= radio_button_tag(:type,"PublicInstitution", true)%> <%= label_tag("type_PrivateInstitution", _("Private Institution")) %> <%= radio_button_tag(:type,"PrivateInstitution")%>
<%= hidden_field_tag "acronym_translate", _("Acronym") %> <%= hidden_field_tag "fantasy_name_translate", _("Fantasy name") %> <%= inst.label("acronym" ,_("Acronym"), :class=>"formlabel") %> <%= inst.text_field(:acronym) %>
<%= 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=>0})%>
<%= 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=>0})%>

<%= recaptcha_tags :ajax => true, :display => {:theme => 'clean'} %>

<%= link_to(_('Save'), '#', :id=>'save_institution_button', :class=>'button with-text icon-add') %>
<%= hidden_field_tag :institution_error_message, _("Could not send the form data to the server") %> <% end %> <% end %>
<%= hidden_field_tag :loading_message, _("Creating institution") %>