Added fallback message if image url is invalid (#1149)

Co-authored-by: Jesus Federico <jesus@123it.ca>
This commit is contained in:
Ahmad Farhat 2020-04-01 17:26:16 -04:00 committed by GitHub
parent 6dc0ffc5c1
commit 509215ae8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -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">

View File

@ -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