diff --git a/dictionaries/privacyidea.definition.json b/dictionaries/privacyidea.definition.json index 7ec13d06184b24be1a4e5fddbc2c782dd15b14ba..df58b6f5cc0baea5780351678b1941db17b573a0 100644 --- a/dictionaries/privacyidea.definition.json +++ b/dictionaries/privacyidea.definition.json @@ -17,8 +17,17 @@ "otp": { "en": "OTP" }, + "webauthn": { + "en": "WebAuthn" + }, + "push": { + "en": "Push" + }, + "u2f": { + "en": "U2F" + }, "login_title_challenge": { - "en": "Please enter your One Time Password" + "en": "Multi-factor authentication" }, "otp_extra_text": { "en": "Please enter your Password and One Time Password" @@ -66,6 +75,6 @@ "en": "Verification was not successful. Please try again." }, "error": { - "en": "Error " + "en": "Error" } } diff --git a/dictionaries/privacyidea.translation.json b/dictionaries/privacyidea.translation.json index b74df6542a22031bf00514cb8b4b60aad3b55e93..cebf65a2aaf45f78b43a5073376ebb368cd373b7 100644 --- a/dictionaries/privacyidea.translation.json +++ b/dictionaries/privacyidea.translation.json @@ -24,10 +24,25 @@ "de": "Einmalpasswort", "nl": "OTP" }, + "webauthn": { + "cs": "WebAuthn", + "de": "WebAuthn", + "nl": "WebAuthn" + }, + "push": { + "cs": "push notifikace", + "de": "Push", + "nl": "Push" + }, + "u2f": { + "cs": "U2F", + "de": "U2F", + "nl": "U2F" + }, "login_title_challenge": { - "cs": "VloĹľte jednorázovĂ˝ kĂłd", - "de": "Bitte geben Sie Ihr Einmalpasswort ein", - "nl": "Vul je eenmalige wachtwoord in." + "cs": "VĂcefázovĂ© ověřenĂ", + "de": "Multi-Faktor-Authentisierung", + "nl": "Multifactorauthenticatie" }, "otp_extra_text": { "cs": "VloĹľte svĂ© heslo a jednorázovĂ˝ kĂłd", @@ -90,6 +105,6 @@ "cs": "OvěřenĂ nebylo ĂşspěšnĂ©. Zkuste to znovu nebo pouĹľijte jinou metodu." }, "error": { - "cs": "Chyba " + "cs": "Chyba" } } diff --git a/templates/LoginForm.php b/templates/LoginForm.php index 0ba5d5bc233071f2c60d691b97c8f7f55cc3d7a1..93bb007a9e41c1b167aba142cecc8519f97e61ce 100644 --- a/templates/LoginForm.php +++ b/templates/LoginForm.php @@ -43,16 +43,22 @@ if (null !== $this->data['errorCode']) { ?> <div class="error-dialog"> - <img src="/<?php echo htmlspecialchars( + <img src="/<?php + echo htmlspecialchars( $this->data['baseurlpath'], ENT_QUOTES ); ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l erroricon" alt="gtk-dialog-error"/> <h2><?php echo $this->t('{login:error_header}'); ?></h2> <p> - <strong><?php echo htmlspecialchars( - $this->t('{privacyidea:privacyidea:error}') . $this->data['errorCode'] . ': ' . $this->data['errorMessage'] - ); ?></strong> + <strong> + <?php + echo htmlspecialchars( + sprintf('%s%s: %s', $this->t( + '{privacyidea:privacyidea:error}' + ), $this->data['errorCode'] ? (' ' . $this->data['errorCode']) : '', $this->data['errorMessage']) + ); ?> + </strong> </p> </div> @@ -62,15 +68,11 @@ if (null !== $this->data['errorCode']) { <div class="container"> <div class="login"> - <div class="loginlogo"></div> - <?php if ($this->data['authProcFilterScenario']) { echo '<h2>' . htmlspecialchars($this->t('{privacyidea:privacyidea:login_title_challenge}')) . '</h2>'; - } else { - if ($this->data['step'] < 2) { - echo '<h2>' . htmlspecialchars($this->t('{privacyidea:privacyidea:login_title}')) . '</h2>'; - } + } elseif ($this->data['step'] < 2) { + echo '<h2>' . htmlspecialchars($this->t('{privacyidea:privacyidea:login_title}')) . '</h2>'; } ?> @@ -231,10 +233,18 @@ if (null !== $this->data['errorCode']) { <div id="AlternateLoginOptions" class="groupMargin"> <h3><?php echo $this->t('{privacyidea:privacyidea:alternate_login_options}'); ?></h3> <!-- Alternate Login Options--> - <input id="useWebAuthnButton" name="useWebAuthnButton" type="button" value="WebAuthn"/> - <input id="usePushButton" name="usePushButton" type="button" value="Push"/> - <input id="useOTPButton" name="useOTPButton" type="button" value="OTP"/> - <input id="useU2FButton" name="useU2FButton" type="button" value="U2F"/> + <button id="useWebAuthnButton" name="useWebAuthnButton" type="button"> + <span><?php echo $this->t('{privacyidea:privacyidea:webauthn}'); ?></span> + </button> + <button id="usePushButton" name="usePushButton" type="button"> + <span><?php echo $this->t('{privacyidea:privacyidea:push}'); ?></span> + </button> + <button id="useOTPButton" name="useOTPButton" type="button"> + <span><?php echo $this->t('{privacyidea:privacyidea:otp}'); ?></span> + </button> + <button id="useU2FButton" name="useU2FButton" type="button"> + <span><?php echo $this->t('{privacyidea:privacyidea:u2f}'); ?></span> + </button> </div> <br> </form>