mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-07 14:43:45 -04:00
Prevent login before extra.js is loaded (#3275)
Disable submit button until extra.js with its crypto functions is loaded.
This commit is contained in:
committed by
GitHub
parent
98b82842d5
commit
48e0464e4b
@@ -31,7 +31,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group form-group-actions">
|
||||
<button id="loginButton" type="submit" class="btn btn-important">
|
||||
<button id="loginButton" type="submit" class="btn btn-important" disabled="disabled">
|
||||
<?= _t('gen.auth.login') ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -51,8 +51,10 @@ function init_crypto_form() {
|
||||
|
||||
forgetOpenCategories();
|
||||
|
||||
const submit_button = document.querySelector('button[type="submit"]');
|
||||
submit_button.disabled = false;
|
||||
|
||||
crypto_form.onsubmit = function (e) {
|
||||
const submit_button = this.querySelector('button[type="submit"]');
|
||||
submit_button.disabled = true;
|
||||
let success = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user