Skip to content
Snippets Groups Projects
Commit cb513c60 authored by Brian Canini's avatar Brian Canini
Browse files

OPIC error handling

- javascript on user profile page to swap out image for defaultbuckeye leaf if user is using OPIC image and OPIC is down
parent 61e7b5f6
No related branches found
No related tags found
1 merge request!148OPIC error handling
......@@ -24,7 +24,7 @@
{% if (content.user_picture.0 != '') and (user.field_use_opic.value == false) %}
{{ content.user_picture }}
{% elseif user.field_use_opic.value %}
<img src="https://opic.osu.edu/{{ content.field_osu_name_num.0 }}?aspect=p&width=300" alt="{% if (content.field_first_name.0 != '') and (content.field_last_name.0 != '') %}{{ content.field_first_name.0 }} {{ content.field_last_name.0 }}{% endif %}" />
<img src="https://opic.osu.edu/{{ content.field_osu_name_num.0 }}?aspect=p&width=300" alt="{% if (content.field_first_name.0 != '') and (content.field_last_name.0 != '') %}{{ content.field_first_name.0 }} {{ content.field_last_name.0 }}{% endif %}" onerror="this.onerror=null;this.src='/themes/asc_bootstrap/images/profile-avatar/user-profile.png';" />
{% else %}
<img src="/themes/asc_bootstrap/images/profile-avatar/user-profile.png" alt="{% if (content.field_first_name.0 != '') and (content.field_last_name.0 != '') %}{{ content.field_first_name.0 }} {{ content.field_last_name.0 }}{% endif %}" />
{% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment