File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
views/org_admin/templates Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,10 @@ def edit
157157 def new
158158 authorize Template
159159 @template = current_org . templates . new
160+ # If the Org is a funder set the visibility to Public otherwise set to Organizational
161+ # for Orgs that are both, the admin will see controls on the page to let them choose.
162+ # The default is already 'organisationally_visible' so change it if this is a funder
163+ @template . visibility = Template . visibilities [ :publicly_visible ] if current_org . funder?
160164 end
161165
162166 # POST /org_admin/templates
Original file line number Diff line number Diff line change 2929<% else %>
3030 <%
3131 visibility = f . object . visibility
32- visibility = f . object . funder? ? 'publicly_visible' : 'organisationally_visible' if visibility . nil?
32+ visibility = f . object . org . funder? ? 'publicly_visible' : 'organisationally_visible' if visibility . nil?
3333 %>
3434 <%= f . hidden_field :visibility , value : visibility %>
3535<% end %>
You can’t perform that action at this time.
0 commit comments