-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from UKHomeOffice/feature/YEL-10651-theme
Update GOVUK-Internal-DQ
- Loading branch information
Showing
3 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<#import "template.ftl" as layout> | ||
<@layout.registrationLayout displayInfo=true; section> | ||
<#if section = "title"> | ||
${msg("loginTotpTitle")} | ||
<#elseif section = "header"> | ||
${msg("loginTotpTitle")} | ||
<#elseif section = "form"> | ||
<ol id="kc-totp-settings" class="list list-number"> | ||
<li> | ||
<p>${msg("loginTotpStep1")}</p> | ||
</li> | ||
<li> | ||
<p>${msg("loginTotpStep2")}</p> | ||
<img id="kc-totp-secret-qr-code" src="data:image/png;base64, ${totp.totpSecretQrCode}" alt="Figure: Barcode"><br/> | ||
<span class="code">${totp.totpSecretEncoded}</span> | ||
</li> | ||
<li> | ||
<p>${msg("loginTotpStep3")}</p> | ||
</li> | ||
</ol> | ||
<form action="${url.loginAction}" class="${properties.kcFormClass!}" id="kc-totp-settings-form" method="post"> | ||
<div class="${properties.kcFormGroupClass!}"> | ||
<div class="${properties.kcLabelWrapperClass!}"> | ||
<label for="totp" class="${properties.kcLabelClass!}">${msg("loginTotpOneTime")}</label> | ||
</div> | ||
<div class="${properties.kcInputWrapperClass!}"> | ||
<input type="text" id="totp" name="totp" autocomplete="off" class="${properties.kcInputClass!}" /> | ||
</div> | ||
<input type="hidden" id="totpSecret" name="totpSecret" value="${totp.totpSecret}" /> | ||
</div> | ||
|
||
<input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonLargeClass!}" type="submit" value="${msg("doSubmit")}"/> | ||
</form> | ||
</#if> | ||
</@layout.registrationLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<#import "template.ftl" as layout> | ||
<@layout.registrationLayout; section> | ||
<#if section="header"> | ||
${msg("doLogIn")} | ||
<#elseif section="form"> | ||
<form id="kc-otp-login-form" class="${properties.kcFormClass!}" action="${url.loginAction}" | ||
method="post"> | ||
<#if otpLogin.userOtpCredentials?size gt 1> | ||
<div class="${properties.kcFormGroupClass!}"> | ||
<div class="${properties.kcInputWrapperClass!}"> | ||
<#list otpLogin.userOtpCredentials as otpCredential> | ||
<div class="${properties.kcSelectOTPListClass!}"> | ||
<input type="hidden" value="${otpCredential.id}"> | ||
<div class="${properties.kcSelectOTPListItemClass!}"> | ||
<span class="${properties.kcAuthenticatorOtpCircleClass!}"></span> | ||
<h2 class="${properties.kcSelectOTPItemHeadingClass!}"> | ||
${otpCredential.userLabel} | ||
</h2> | ||
</div> | ||
</div> | ||
</#list> | ||
</div> | ||
</div> | ||
</#if> | ||
|
||
<div class="${properties.kcFormGroupClass!}"> | ||
<div class="${properties.kcLabelWrapperClass!}"> | ||
<label for="otp" class="${properties.kcLabelClass!}">${msg("loginOtpOneTime")}</label> | ||
</div> | ||
<p>The one-time code is available in the FreeOTP Authenticator application, which you downloaded to your mobile phone when you set up this account</p> | ||
|
||
<div class="${properties.kcInputWrapperClass!}"> | ||
<input id="otp" name="otp" autocomplete="off" type="text" class="${properties.kcInputClass!}" | ||
autofocus/> | ||
</div> | ||
</div> | ||
|
||
<div class="${properties.kcFormGroupClass!}"> | ||
<div id="kc-form-options" class="${properties.kcFormOptionsClass!}"> | ||
<div class="${properties.kcFormOptionsWrapperClass!}"> | ||
</div> | ||
</div> | ||
|
||
<div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}"> | ||
<input | ||
class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" | ||
name="login" id="kc-login" type="submit" value="${msg("doLogIn")}" /> | ||
</div> | ||
</div> | ||
</form> | ||
<script type="text/javascript" src="${url.resourcesCommonPath}/node_modules/jquery/dist/jquery.min.js"></script> | ||
<script type="text/javascript"> | ||
$(document).ready(function() { | ||
// Card Single Select | ||
$('.card-pf-view-single-select').click(function() { | ||
if ($(this).hasClass('active')) | ||
{ $(this).removeClass('active'); $(this).children().removeAttr('name'); } | ||
else | ||
{ $('.card-pf-view-single-select').removeClass('active'); | ||
$('.card-pf-view-single-select').children().removeAttr('name'); | ||
$(this).addClass('active'); $(this).children().attr('name', 'selectedCredentialId'); } | ||
}); | ||
var defaultCred = $('.card-pf-view-single-select')[0]; | ||
if (defaultCred) { | ||
defaultCred.click(); | ||
} | ||
}); | ||
</script> | ||
</#if> | ||
</@layout.registrationLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters