Skip to content

Commit

Permalink
disable email confirmation digit input while confirming
Browse files Browse the repository at this point in the history
  • Loading branch information
jelveh committed Dec 23, 2024
1 parent ada051b commit e736e42
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/src/UI/UIWindowEmailConfirmationRequired.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function UIWindowEmailConfirmationRequired(options){
e.stopPropagation();

$(el_window).find('.email-confirm-btn').prop('disabled', true);
$(el_window).find(`.digit-input`).prop('disabled', true);
$(el_window).find('.error').hide();

// Check if already checking code to prevent multiple requests
Expand Down Expand Up @@ -137,6 +138,7 @@ function UIWindowEmailConfirmationRequired(options){
$(el_window).find('.digit-input').val('');
$(el_window).find('.digit-input').first().focus();
$(el_window).find('.email-confirm-btn').prop('disabled', false);
$(el_window).find(`.digit-input`).prop('disabled', false);
$(el_window).find('.email-confirm-btn').html(submit_btn_txt);
}
},
Expand All @@ -146,6 +148,7 @@ function UIWindowEmailConfirmationRequired(options){
$(el_window).find('.digit-input').val('');
$(el_window).find('.digit-input').first().focus();
$(el_window).find('.email-confirm-btn').prop('disabled', false);
$(el_window).find(`.digit-input`).prop('disabled', false);
$(el_window).find('.email-confirm-btn').html(submit_btn_txt);
},
complete: function(){
Expand Down Expand Up @@ -230,6 +233,7 @@ function UIWindowEmailConfirmationRequired(options){
// Automatically submit if 6 digits entered
if(final_code.length === 6){
$(el_window).find('.email-confirm-btn').prop('disabled', false);
$(el_window).find(`.digit-input`).prop('disabled', false);
$(el_window).find('.email-confirm-btn').trigger('click');
}
});
Expand Down

0 comments on commit e736e42

Please sign in to comment.