Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 10.1.19 - standardize webauthn initiation button #308

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/material/locales/en/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ msgid "{mfa:webauthn_instructions}"
msgstr "Follow the prompts to use your key."

msgid "{mfa:webauthn_start}"
msgstr "Click OK when you're ready to start."
msgstr "Click Verify when you're ready to start."

msgid "{mfa:webauthn_error_unknown}"
msgstr "Something went wrong with that request, unable to verify at this time."
Expand Down
2 changes: 1 addition & 1 deletion modules/material/locales/es/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ msgid "{mfa:webauthn_instructions}"
msgstr "Siga las instrucciones para usar su clave."

msgid "{mfa:webauthn_start}"
msgstr "Haga clic en OK cuando esté listo para comenzar."
msgstr "Haga clic en Verificar cuando esté listo para comenzar."

msgid "{mfa:webauthn_error_unknown}"
msgstr "Algo salió mal con esa solicitud, no se pudo verificar en este momento."
Expand Down
2 changes: 1 addition & 1 deletion modules/material/locales/fr/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ msgid "{mfa:webauthn_instructions}"
msgstr "Suivez les instructions pour utiliser votre clé."

msgid "{mfa:webauthn_start}"
msgstr "Cliquez sur OK lorsque vous êtes prêt à commencer."
msgstr "Cliquez sur Vérifier lorsque vous êtes prêt à commencer."

msgid "{mfa:webauthn_error_unknown}"
msgstr "Quelque chose s'est mal passé avec cette demande, impossible de vérifier pour le moment."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
const errorNode = document.querySelector('p.error');
errorNode.classList.remove('hide');
errorNode.querySelector('span').textContent = errorMessage;

offerRetry();
}

function createMessage(error) {
Expand All @@ -37,15 +35,6 @@
}
}

function offerRetry() {
const verifyBtn = document.getElementById('verifyBtn');

verifyBtn.classList.add('mdl-color-text--red');
verifyBtn.classList.remove('mdl-color-text--primary');
verifyBtn.textContent = '{{ '{mfa:button_try_again}'|trans|e('js') }}';

}

function submitForm(webAuthnResponse) {
const form = document.querySelector('form');
const submissionInput = createHiddenInput('submitMfa');
Expand Down Expand Up @@ -126,14 +115,10 @@
{{ include('other_mfas.twig') }}

<span flex></span>

<!-- used type=button to avoid form submission on click -->
<button
id="verifyBtn"
type="button"
class="mdl-button mdl-button--raised {{ error_message is empty ? 'mdl-color-text--primary' : 'mdl-color-text--red' }}"
>
{{ error_message is empty ? 'ok' : '{mfa:button_try_again}'|trans }}
<button id="verifyBtn" type="button" class="mdl-button mdl-button--raised mdl-button--primary">
{{ '{mfa:button_verify}'|trans }}
</button>
</div>

Expand Down