Skip to content

Commit 5e27beb

Browse files
committed
added reseach-fi block
1 parent 7c542ce commit 5e27beb

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

app/views/org_admin/templates/_form.html.erb

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@
1111
<%= f.text_area(:description, class: "template", spellcheck: true) %>
1212
</div>
1313

14+
<% if Rails.configuration.x.research_fi.active %>
15+
<div class="form-control mb-3">
16+
<div class="row">
17+
<div class="col-6">
18+
<%= f.label(:api_server, _('Enable interoperation with an external system'), class: "form-label")%>
19+
<%= select_tag :api_server_id,
20+
options_for_select(ApiServer.pluck(:title, :id), selected: f.object.api_server_id),
21+
class: 'form-select', "aria-labelledby": "api_server_id", include_blank: _("--Select--")%>
22+
</div>
23+
</div>
24+
</div>
25+
<% end %>
26+
1427
<% if current_user.org.funder? && !current_user.org.funder_only? %>
1528
<!-- If the Org is a funder and another org type then allow then to set the visibility -->
1629
<div class="form-control mb-3 col-xs-8">
@@ -20,10 +33,7 @@
2033
placement: 'right' }%>
2134
<div class="form-check">
2235
<%= f.label(:visibility) do %>
23-
<%= f.check_box(:visibility,
24-
{ checked: f.object.organisationally_visible? },
25-
f.object.class.visibilities[:organisationally_visible],
26-
f.object.class.visibilities[:publicly_visible]) %>
36+
<%= f.check_box(:visibility, checked: f.object.visibility == 'organisationally_visible') %>
2737

2838
<%= _('for internal %{org_name} use only') % { org_name: f.object.org.name } %>
2939
<% end %>

0 commit comments

Comments
 (0)