institution_editor_extras.html.erb 2.29 KB
<h2><%= _('Institution Information') %></h2>

<div class="formfield type-text">
  <%= labelled_text_field(_("CNPJ"), 'institution[cnpj]', context.profile.institution.cnpj, :class=>"formlabel intitution_cnpj_field", :placeholder=>"99.999.999/9999-99") %>
</div>

<span class='required-field'>
<div class="formfield type-text">
  <% if context.profile.institution.type == "PublicInstitution" %>
    <%= labelled_text_field(_("Acronym"), "institution[acronym]", context.profile.institution.acronym, :class=>"formlabel") %>
  <% else %>
    <%= labelled_text_field(_("Fantasy name"), "institution[acronym]", context.profile.institution.acronym, :class=>"formlabel") %>
  <% end %>
</div>
</span>

<% if context.profile.institution.type == "PublicInstitution" %>
  <span class='public-institutions-fields'>
  <div class="formfield type-select">
    <%= label_tag('governmental_power', _("Governmental Power")) %>
    <%= select_tag(:governmental_power, options_for_select(GovernmentalPower.all.map {|g| [g.name, g.id]}, :selected => context.profile.institution.governmental_power_id), :class=>"formlabel") %>
  </div>
  </span>

  <span class= 'public-institutions-fields'>
  <div class="formfield type-select">
    <%= label_tag('governmental_sphere', _("Governmental Sphere")) %>
    <%= select_tag(:governmental_sphere, options_for_select(GovernmentalSphere.all.map {|s| [s.name, s.id]}, :selected => context.profile.institution.governmental_sphere_id), :class=>"formlabel") %>
  </div>
  </span>
  
  <span class= 'public-institutions-fields'>
  <div class="formfield type-select">
    <%= label_tag('juridical_nature', _("Juridical Nature")) %>
    <%= select_tag(:juridical_nature, options_for_select(JuridicalNature.all.map {|j| [j.name, j.id]}, :selected => context.profile.institution.juridical_nature_id), :class=>"formlabel") %>
  </div>
  </span>
  
  <span class= 'public-institutions-fields'>
  <div class="formfieldline">
  <% if @show_sisp_field  %>
    <%= _("SISP?") %>
    <%= labelled_radio_button(_('Yes'), 'institution[sisp]', 'true', context.profile.institution.sisp)%>
    <%= labelled_radio_button(_('No'), 'institution[sisp]', 'false', !context.profile.institution.sisp)%>
  <% else %>
    <%= _("SISP?") %>
    <%= label_tag('SISP', context.profile.institution.sisp ? "YES" : "NO") %>
  <% end %>
  </div>
  </span>

<% end %>