Merge pull request #8752 from opf/fix/34793-QR-code-not-displayed-on-2FA-device-registration

QRCode library working on the global space
pull/8760/head
ulferts 4 years ago committed by GitHub
commit 4a2c9baa87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      frontend/src/app/modules/augmenting/dynamic-scripts/two_factor_authentication.ts
  2. 2
      frontend/src/vendor/qrcode-min.js

@ -1,8 +1,10 @@
require('core-vendor/qrcode-min');
import 'core-vendor/qrcode-min';
declare var QRCode:any;
jQuery(function ($) {
$('#submit_otp').submit(function(){
$('.ajax_form').find("input, radio").attr('disabled','disabled');
$('#submit_otp').submit(function() {
$('.ajax_form').find("input, radio").attr('disabled', 'disabled');
});
$('#toggle_resend_form').click(function(){
@ -22,19 +24,19 @@ jQuery(function ($) {
);
});
$('.ajax_form').submit(function(){
$('#submit_otp').find("input").attr('disabled','disabled');
$('.ajax_form').submit(function() {
$('#submit_otp').find("input").attr('disabled', 'disabled');
var form = $(this),
submit_button = form.find("input[type=submit]");
$.ajax({ url: form.attr('action'),
type: 'post',
data: form.serialize(),
beforeSend: function(){
submit_button.attr('disabled','disabled');
beforeSend: function() {
submit_button.attr('disabled', 'disabled');
submit_button.toggleClass('submitting');
$('.flash.notice').toggle();
},
complete: function(response){
complete: function(response) {
submit_button.removeAttr('disabled');
$('#submit_otp').find("input").removeAttr('disabled');
$('.flash.notice a').html(response.responseText);

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save