Skip to content

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
raycarrick-ed committed May 12, 2022
2 parents 577018a + 7cac435 commit 5f6eaab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def authenticate_admin!
end

def failure_message(obj, action = 'save')
format(_('Unable to %{action} the %{object}. {errors}'),
format(_('Unable to %{action} the %{object}. %{errors}'),
object: obj_name_for_display(obj),
action: action || 'save', errors: errors_for_display(obj))
end
Expand Down
6 changes: 5 additions & 1 deletion app/controllers/orgs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ def admin_update
@org = Org.find(params[:id])
authorize @org

@org.logo = attrs[:logo] if attrs[:logo]
# If a new logo was supplied then use it, otherwise retain the existing one
attrs[:logo] = attrs[:logo].present? ? attrs[:logo] : @org.logo
# Remove the logo if the user checked the box
attrs[:logo] = nil if attrs[:remove_logo] == '1'

tab = (attrs[:feedback_enabled].present? ? 'feedback' : 'profile')
@org.links = ActiveSupport::JSON.decode(params[:org_links]) if params[:org_links].present?

Expand Down
2 changes: 1 addition & 1 deletion app/views/contact_us/contacts/_new_right.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Rails.configuration.x.organisation.address.fetch(:line4, ""),
Rails.configuration.x.organisation.address.fetch(:country, "")].compact.each do |addr_line| %>
<% if addr_line.present? %>
<%= addr_line %><br>
<%= addr_line.is_a?(Array) ? addr_line.join(' ') : addr_line %><br>
<% end %>
<% end %>
</address>
Expand Down

0 comments on commit 5f6eaab

Please sign in to comment.