diff --git a/dictionaries/login.definition.json b/dictionaries/login.definition.json index 6399256a6619f2e5cb56e5d0468a6efbd75ecf3c..49ebed33ed64a91c1df4ce07f89731f171edc36f 100644 --- a/dictionaries/login.definition.json +++ b/dictionaries/login.definition.json @@ -11,6 +11,9 @@ "login_button": { "en": "Login" }, + "processing": { + "en": "Processing..." + }, "username": { "en": "Username" }, diff --git a/modules/core/templates/loginuserpass.php b/modules/core/templates/loginuserpass.php index a0ccb0061d137f9428256434b780a907c865c1cc..7b39963c2023dccbeeb5a73930019e15237624cd 100644 --- a/modules/core/templates/loginuserpass.php +++ b/modules/core/templates/loginuserpass.php @@ -67,7 +67,7 @@ if ($this->data['rememberUsernameEnabled'] || $this->data['rememberMeEnabled']) } else { $text = $this->t('{login:login_button}'); echo str_repeat("\t", 4); - echo "<input type=\"submit\" tabindex=\"4\" id=\"regularsubmit\" value=\"{$text}\" />"; + echo "<input onclick=\"this.value='" . $this->t('{login:processing}') . "';this.disabled=true;this.form.submit();return true;\" type=\"submit\" tabindex=\"4\" id=\"regularsubmit\" value=\"{$text}\" />"; } ?> </td> @@ -81,7 +81,7 @@ if ($this->data['rememberUsernameEnabled'] || $this->data['rememberMeEnabled']) $rowspan = (array_key_exists('organizations', $this->data) ? 2 : 1); ?> <td style="padding: .4em;" rowspan="<?php echo $rowspan; ?>"> - <input type="submit" tabindex="5" id="regularsubmit" value="<?php echo $this->t('{login:login_button}'); ?>" /> + <input onclick="this.value='<?php echo $this->t('{login:processing}'); ?>';this.disabled=true;this.form.submit();return true;" type="submit" tabindex="5" id="regularsubmit" value="<?php echo $this->t('{login:login_button}'); ?>" /> </td> <?php } @@ -121,7 +121,7 @@ foreach ($this->data['organizations'] as $orgId => $orgDesc) { } ?> <tr><td></td><td> - <input type="submit" tabindex="5" id="mobilesubmit" value="<?php echo $this->t('{login:login_button}'); ?>" /> + <input onclick="this.value='<?php echo $this->t('{login:processing}'); ?>';this.disabled=true;this.form.submit();return true;" type="submit" tabindex="5" id="mobilesubmit" value="<?php echo $this->t('{login:login_button}'); ?>" /> </td></tr> </table> <?php