Skip to content

Commit 833b350

Browse files
web/flows: fix missing padding on authenticator_validate card (cherry-pick #13420) (#13519)
web/flows: fix missing padding on authenticator_validate card (#13420) Signed-off-by: Jens Langhammer <[email protected]> Co-authored-by: Jens L. <[email protected]>
1 parent b388265 commit 833b350

File tree

1 file changed

+48
-43
lines changed

1 file changed

+48
-43
lines changed

web/src/flow/stages/authenticator_validate/AuthenticatorValidateStageCode.ts

+48-43
Original file line numberDiff line numberDiff line change
@@ -70,52 +70,57 @@ export class AuthenticatorValidateStageWebCode extends BaseDeviceStage<
7070
return html`<ak-empty-state loading> </ak-empty-state>`;
7171
}
7272
return html`<div class="pf-c-login__main-body">
73-
<form
74-
class="pf-c-form"
75-
@submit=${(e: Event) => {
76-
this.submitForm(e);
77-
}}
78-
>
79-
${this.renderUserInfo()}
80-
<div class="icon-description">
81-
<i class="fa ${this.deviceIcon()}" aria-hidden="true"></i>
82-
<p>${this.deviceMessage()}</p>
83-
</div>
84-
<ak-form-element
85-
label="${this.deviceChallenge?.deviceClass === DeviceClassesEnum.Static
86-
? msg("Static token")
87-
: msg("Authentication code")}"
88-
required
89-
class="pf-c-form__group"
90-
.errors=${(this.challenge?.responseErrors || {})["code"]}
73+
<form
74+
class="pf-c-form"
75+
@submit=${(e: Event) => {
76+
this.submitForm(e);
77+
}}
9178
>
92-
<!-- @ts-ignore -->
93-
<input
94-
type="text"
95-
name="code"
96-
inputmode="${this.deviceChallenge?.deviceClass === DeviceClassesEnum.Static
97-
? "text"
98-
: "numeric"}"
99-
pattern="${this.deviceChallenge?.deviceClass === DeviceClassesEnum.Static
100-
? "[0-9a-zA-Z]*"
101-
: "[0-9]*"}"
102-
placeholder="${msg("Please enter your code")}"
103-
autofocus=""
104-
autocomplete="one-time-code"
105-
class="pf-c-form-control"
106-
value="${PasswordManagerPrefill.totp || ""}"
79+
${this.renderUserInfo()}
80+
<div class="icon-description">
81+
<i class="fa ${this.deviceIcon()}" aria-hidden="true"></i>
82+
<p>${this.deviceMessage()}</p>
83+
</div>
84+
<ak-form-element
85+
label="${this.deviceChallenge?.deviceClass === DeviceClassesEnum.Static
86+
? msg("Static token")
87+
: msg("Authentication code")}"
10788
required
108-
/>
109-
</ak-form-element>
89+
class="pf-c-form__group"
90+
.errors=${(this.challenge?.responseErrors || {})["code"]}
91+
>
92+
<!-- @ts-ignore -->
93+
<input
94+
type="text"
95+
name="code"
96+
inputmode="${this.deviceChallenge?.deviceClass ===
97+
DeviceClassesEnum.Static
98+
? "text"
99+
: "numeric"}"
100+
pattern="${this.deviceChallenge?.deviceClass ===
101+
DeviceClassesEnum.Static
102+
? "[0-9a-zA-Z]*"
103+
: "[0-9]*"}"
104+
placeholder="${msg("Please enter your code")}"
105+
autofocus=""
106+
autocomplete="one-time-code"
107+
class="pf-c-form-control"
108+
value="${PasswordManagerPrefill.totp || ""}"
109+
required
110+
/>
111+
</ak-form-element>
110112
111-
<div class="pf-c-form__group pf-m-action">
112-
<button type="submit" class="pf-c-button pf-m-primary pf-m-block">
113-
${msg("Continue")}
114-
</button>
115-
${this.renderReturnToDevicePicker()}
116-
</div>
117-
</form>
118-
</div>`;
113+
<div class="pf-c-form__group pf-m-action">
114+
<button type="submit" class="pf-c-button pf-m-primary pf-m-block">
115+
${msg("Continue")}
116+
</button>
117+
${this.renderReturnToDevicePicker()}
118+
</div>
119+
</form>
120+
</div>
121+
<footer class="pf-c-login__main-footer">
122+
<ul class="pf-c-login__main-footer-links"></ul>
123+
</footer>`;
119124
}
120125
}
121126

0 commit comments

Comments
 (0)