Bug 32061: Remove spans from page titles for adding/editing Z39.50/SRU servers
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / auth.tt
index a8d8f79..16cfb36 100644 (file)
                     type: 'POST',
                     url: '/api/v1/auth/two-factor/registration/verification',
                     success: function (data) {
-                        alert(_("Two-factor authentication correctly configured. You will be redirected to the login screen."));
-                        window.location = "/cgi-bin/koha/mainpage.pl";
+                        return;
                     },
                     error: function (data) {
                         const error = data.responseJSON.error;
                             alert(error);
                         }
                     },
+                }).then(function(){
+                    alert(_("Two-factor authentication correctly configured. You will be redirected to the login screen."));
+                    window.location = "/cgi-bin/koha/mainpage.pl";
                 });
             });