mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
user avatar: Remove user_avatar_file_input id.
Now we can remove `user-avatar-block` id and added new class 'image_file_input'.we can access this class using `#user-avatar-upload-widget .image_file_input` so that we can have only one id at top-level and 'image_upload_widget.hbs` can be more dynamic so we can use for other similar widgets also.
This commit is contained in:
@@ -42,7 +42,7 @@ exports.build_bot_edit_widget = function (target) {
|
|||||||
|
|
||||||
exports.build_user_avatar_widget = function (upload_function) {
|
exports.build_user_avatar_widget = function (upload_function) {
|
||||||
const get_file_input = function () {
|
const get_file_input = function () {
|
||||||
return $('#user_avatar_file_input').expectOne();
|
return $('#user-avatar-upload-widget .image_file_input').expectOne();
|
||||||
};
|
};
|
||||||
|
|
||||||
if (page_params.avatar_source === 'G') {
|
if (page_params.avatar_source === 'G') {
|
||||||
|
|||||||
@@ -17,6 +17,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<img class="image-block" src="{{ image }}"/>
|
<img class="image-block" src="{{ image }}"/>
|
||||||
<input type="file" name="user_avatar_file_input" class="notvisible" id="user_avatar_file_input" value="{{t 'Upload profile picture' }}" />
|
<input type="file" name="file_input" class="notvisible image_file_input" value="{{t upload_text }}" />
|
||||||
<div id="user_avatar_file_input_error" class="text-error"></div>
|
<div id="user_avatar_file_input_error" class="text-error"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user