Commit 7495e3aa4d2678c82d79a51d830b9ffec30176ed

Authored by David Silva
1 parent 362e45e6

institution_fields: Add label for sisp when the user is not admin

Signed-off-by: David Carlos <ddavidcarlos1392@gmail.com>
Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
views/institution_editor_extras.html.erb
... ... @@ -36,12 +36,15 @@
36 36 </div>
37 37 </span>
38 38  
39   - <% if @show_sisp_field %>
40 39 <span class= 'public-institutions-fields'>
41 40 <div class="formfieldline">
  41 + <% if @show_sisp_field %>
42 42 <%= _("SISP?") %>
43 43 <%= labelled_radio_button(_('Yes'), 'institution[sisp]', 'true', context.profile.institution.sisp)%>
44 44 <%= labelled_radio_button(_('No'), 'institution[sisp]', 'false', !context.profile.institution.sisp)%>
  45 + <% else %>
  46 + <%= _("SISP?") %>
  47 + <%= label_tag('SISP', context.profile.institution.sisp ? "YES" : "NO") %>
45 48 </div>
46 49 </span>
47 50 <% end %>
... ...
views/mpog_software_plugin/create_institution.html.erb
... ... @@ -75,8 +75,23 @@
75 75 <%= inst.select(:juridical_nature, [[_("Select a Juridical Nature"), 0]]|JuridicalNature.all.map {|j| [j.name, j.id]}, {:selected=>0})%>
76 76 </div>
77 77 </span>
78   - <br />
  78 +
  79 + <span class='required-field public-institutions-fields'>
  80 + <div class="formfield type-text">
  81 + <%= _("SISP?") %>
  82 + <% if @show_sisp_field %>
79 83  
  84 + <%= inst.label("sisp" ,_("Yes")) %>
  85 + <%= inst.radio_button(:sisp, true) %>
  86 + <%= inst.label("sisp" ,_("No")) %>
  87 + <%= inst.radio_button(:sisp, false) %>
  88 + <% else %>
  89 + <%= inst.label("sisp", _("No")) %>
  90 + <% end %>
  91 + </div>
  92 + </span>
  93 + <br />
  94 +
80 95 <div>
81 96 <p><%= recaptcha_tags :ajax => true, :display => {:theme => 'clean'} %> </p>
82 97 <%= link_to(_('Save'), '#', :id=>'save_institution_button', :class=>'button with-text icon-add') %>
... ...