Skip to content
Snippets Groups Projects
Commit 6d789ba9 authored by Moritz Strohm's avatar Moritz Strohm
Browse files

avatar/update: made "select" button accessible

parent fac4b64b
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
) ?> ) ?>
</p> </p>
<a onclick="javascript:void 0" class=button><?= _('Auswählen') ?></a> <a class="button" tabindex="0"><?= _('Auswählen') ?></a>
</label> </label>
<input type="hidden" name="cropped-image" id="cropped-image" value=""> <input type="hidden" name="cropped-image" id="cropped-image" value="">
......
...@@ -43,4 +43,13 @@ STUDIP.domReady(() => { ...@@ -43,4 +43,13 @@ STUDIP.domReady(() => {
}); });
}); });
} }
//"Redirecting" the event is necessary so that the avatar image upload
//is accessible by pressing the enter key when its focused.
jQuery(document).on('keydown', 'form.settings-avatar label.file-upload a.button', function(event) {
if (event.code == "Enter") {
//The enter key has been pressed.
jQuery(this).parent('.file-upload').trigger('click');
}
});
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment