Commit 42de1b02 by attiyaishaque Committed by Attiya Ishaque

EDUCATOR-1705 Fix when profile_image is not available.

parent 58776f7a
<div class="instructor" id="instructor_{{ staff.id }}">
<input type="hidden" id="staff_{{ staff.id }}" name="staff" value="{{ staff.id }}">
<div><img src="{% if staff.profile_image_url %}{{ staff.profile_image_url }}{% else %}{{ staff.profile_image.url }}{% endif %}"></div>
<div><img src="{{ staff.get_profile_image_url }}"></div>
<div><a class="delete" id="{{ staff.id }}" href="#"><i class="fa fa-trash-o fa-fw"></i></a>
{% if course_user_role == 'course_team' %}
{% if staff.position %}
......
......@@ -247,12 +247,7 @@ $(document).on('click', '.selected-instructor a.edit', function (e) {
$.getJSON({
url: btnInstructor.data('url') + uuid,
success: function (data) {
if ($.isEmptyObject(data['profile_image'])) {
$('.select-image').attr('src', data['profile_image_url']);
}
else {
$('.select-image').attr('src', data['profile_image']['medium']['url']);
}
$('.select-image').attr('src', data['profile_image']);
$('#given-name').val(data['given_name']);
$('#family-name').val(data['family_name']);
$('#title').val(data['position']['title']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment