Skip to content

Commit

Permalink
Added fallback message if image url is invalid (bigbluebutton#1149)
Browse files Browse the repository at this point in the history
Co-authored-by: Jesus Federico <jesus@123it.ca>
  • Loading branch information
farhatahmad and jfederico committed Apr 1, 2020
1 parent 6dc0ffc commit 509215a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/views/shared/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
<div class="container">
<div class="d-flex">
<%= link_to (current_user ? home_page : root_path), class: "header-brand" do %>
<%= image_tag(logo_image, class: "header-brand-img", alt:"") %>
<% begin %>
<%= image_tag(logo_image, class: "header-brand-img", alt:"") %>
<% rescue %>
<%= t("administrator.site_settings.branding.invalid") %>
<% end %>
<% end %>

<div class="d-flex ml-auto">
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ en:
info: Change the branding image that appears in the top left corner
placeholder: Image Url...
title: Branding Image
invalid: Invalid URL
cache:
info: Clears the stored provider cache which forces a new request for the updated info
title: Clear Provider Cache
Expand Down

0 comments on commit 509215a

Please sign in to comment.