After clicking the login button, the loginform.html page disables the login
button and changes the text.
<input class="btn btn-submit btn-block"
name="submit"
accesskey="l"
th:value="#{screen.welcome.button.login}"
tabindex="6"
type="submit"/>
<script type="text/javascript" th:inline="javascript">
var i = [[#{screen.welcome.button.loginwip}]]
$("#fm1").submit(function() {
$(":submit").attr("disabled", true);
$(":submit").attr("value", i);
return true;
});
</script>
My customized loginform.html that is perfectly working as expected, uses a
button instead of an input, which requires a small script modification
(.attr("value",...) -> .html(i)):
<button class="btn-submit" accesskey="l" tabindex="6" type=
"submit">
<i class="fa fa-sign-in" aria-hidden="true"></i>
<span th:utext="#{screen.welcome.button.login}"/>
</button>
<script type="text/javascript" th:inline="javascript">
var LOGIN_WORK_IN_PROGRESS_TEXT = [[#{screen.welcome.button.loginwip
}]]
$("#fm1").submit(function() {
$(":submit").attr("disabled", true);
$(":submit").html(LOGIN_WORK_IN_PROGRESS_TEXT);
return true;
});
</script>
The multifactor casGoogleAuthenticatorLoginView.html page has a similar
button:
<input class="btn-submit" name="_eventId_submit" accesskey=
"l"
th:value="#{screen.welcome.button.login}" tabindex=
"4" type="submit"/>
I also customized this button from input to button style. Multifactor login
is perfectly working as expected:
<button class="btn-submit reduced-left-margin" name=
"_eventId_submit" accesskey="l" tabindex="4" type="submit">
<i class="fa fa-sign-in" aria-hidden="true"></i>
<span th:utext="#{screen.welcome.button.login}"/>
</button>
But, if I add the same script to disable the button and modify its text,
the page stops working. It does not accept any token and does not display
error message (empty input) anymore. It only reloads.
Is this a bug or a feature? What would be required to support this feature?
--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to the Google Groups "CAS
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/47905a02-5489-427a-8838-3571b38ce382%40apereo.org.