Skip to content

Commit 5f6eaab

Browse files
Merge branch 'master' into development
2 parents 577018a + 7cac435 commit 5f6eaab

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

app/controllers/application_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def authenticate_admin!
105105
end
106106

107107
def failure_message(obj, action = 'save')
108-
format(_('Unable to %{action} the %{object}. {errors}'),
108+
format(_('Unable to %{action} the %{object}. %{errors}'),
109109
object: obj_name_for_display(obj),
110110
action: action || 'save', errors: errors_for_display(obj))
111111
end

app/controllers/orgs_controller.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ def admin_update
3333
@org = Org.find(params[:id])
3434
authorize @org
3535

36-
@org.logo = attrs[:logo] if attrs[:logo]
36+
# If a new logo was supplied then use it, otherwise retain the existing one
37+
attrs[:logo] = attrs[:logo].present? ? attrs[:logo] : @org.logo
38+
# Remove the logo if the user checked the box
39+
attrs[:logo] = nil if attrs[:remove_logo] == '1'
40+
3741
tab = (attrs[:feedback_enabled].present? ? 'feedback' : 'profile')
3842
@org.links = ActiveSupport::JSON.decode(params[:org_links]) if params[:org_links].present?
3943

app/views/contact_us/contacts/_new_right.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Rails.configuration.x.organisation.address.fetch(:line4, ""),
88
Rails.configuration.x.organisation.address.fetch(:country, "")].compact.each do |addr_line| %>
99
<% if addr_line.present? %>
10-
<%= addr_line %><br>
10+
<%= addr_line.is_a?(Array) ? addr_line.join(' ') : addr_line %><br>
1111
<% end %>
1212
<% end %>
1313
</address>

0 commit comments

Comments
 (0)