summaryrefslogtreecommitdiff
path: root/login_form.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-08-12 03:30:18 +0100
committerAndrew Dolgov <[email protected]>2007-08-12 03:30:18 +0100
commit1efaefda1fa9eee274898499817a4001c0f2c3c2 (patch)
treeeec6eb54641982b11c9f99e613127eacf577f97e /login_form.php
parentaa531f289d37359b97e77c5a7de6494c9e335671 (diff)
disable login submit button when changing language
Diffstat (limited to 'login_form.php')
-rw-r--r--login_form.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/login_form.php b/login_form.php
index f6ed750ec..9555f56f9 100644
--- a/login_form.php
+++ b/login_form.php
@@ -24,9 +24,15 @@ function init() {
}
function languageChange(elem) {
- var lang = elem[elem.selectedIndex].value;
- setCookie("ttrss_lang", lang, <?php print SESSION_COOKIE_LIFETIME ?>);
- window.location.reload();
+ try {
+ document.forms['loginForm']['click'].disabled = true;
+
+ var lang = elem[elem.selectedIndex].value;
+ setCookie("ttrss_lang", lang, <?php print SESSION_COOKIE_LIFETIME ?>);
+ window.location.reload();
+ } catch (e) {
+ exception_error("languageChange", e);
+ }
}
</script>
@@ -69,7 +75,7 @@ window.onload = init;
<label for="remember_me">Remember me on this computer</label>
</td></tr> -->
<tr><td colspan="2" align="right" class="innerLoginCell">
- <input type="submit" class="button" value="Login">
+ <input type="submit" class="button" value="Login" name='click'>
<input type="hidden" name="action" value="login">
<input type="hidden" name="rt"
value="<?php if ($return_to != 'none') { echo $return_to; } ?>">