diff --git a/static/js/avatar.js b/static/js/avatar.js index e25b773826..9428533d78 100644 --- a/static/js/avatar.js +++ b/static/js/avatar.js @@ -71,7 +71,7 @@ exports.build_user_avatar_widget = function (upload_function) { if (settings_account.user_can_change_avatar()) { return upload_widget.build_direct_upload_widget( get_file_input, - $("#user_avatar_file_input_error").expectOne(), + $("#user-avatar-upload-widget .image_file_input_error").expectOne(), $("#user-avatar-upload-widget .image_upload_button").expectOne(), upload_function, page_params.max_avatar_file_size_mib diff --git a/static/js/settings_account.js b/static/js/settings_account.js index 90adc6d29d..edf8d50a15 100644 --- a/static/js/settings_account.js +++ b/static/js/settings_account.js @@ -590,7 +590,7 @@ exports.set_up = function () { contentType: false, success: function () { display_avatar_upload_complete(); - $("#user_avatar_file_input_error").hide(); + $("#user-avatar-upload-widget .image_file_input_error").hide(); $("#user-avatar-source").hide(); // Rest of the work is done via the user_events -> avatar_url event we will get }, @@ -599,7 +599,7 @@ exports.set_up = function () { if (page_params.avatar_source === 'G') { $("#user-avatar-source").show(); } - const $error = $("#user_avatar_file_input_error"); + const $error = $("#user-avatar-upload-widget .image_file_input_error"); $error.text(JSON.parse(xhr.responseText).msg); $error.show(); }, diff --git a/static/templates/settings/image_upload_widget.hbs b/static/templates/settings/image_upload_widget.hbs index f00b9b189a..e7194ff961 100644 --- a/static/templates/settings/image_upload_widget.hbs +++ b/static/templates/settings/image_upload_widget.hbs @@ -18,5 +18,5 @@ {{/if}} -
+