Skip to content

Commit

Permalink
Change the place of the <fieldset> and <form>
Browse files Browse the repository at this point in the history
  • Loading branch information
eunjuhuss committed Dec 13, 2024
1 parent 80439f7 commit afdb66c
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions src/components/Dashboard/UseSecurityKeyToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,32 @@ export default function UseSecurityKeyToggle(): JSX.Element | null {
}

return (
<>
<form>
{/* always_use_security_key toggle button */}
<fieldset>
<form>
<label className="toggle flex-between border-toggle-area" htmlFor="security-key-mfa">
<legend className="legend-2fa">
<label className="toggle flex-between border-toggle-area" htmlFor="security-key-mfa">
<legend className="legend-2fa">
<FormattedMessage
defaultMessage={`Always use a second factor (2FA) to log in`}
description="Security key toggle"
/>
<p className="help-text">
<FormattedMessage
defaultMessage={`Always use a second factor (2FA) to log in`}
description="Security key toggle"
description="help text toggle 2FA"
defaultMessage="If a second factor is required by external services for authentication, it will be always requested during the login even if this option is off."
/>
<p className="help-text">
<FormattedMessage
description="help text toggle 2FA"
defaultMessage="If a second factor is required by external services for authentication, it will be always requested during the login even if this option is off."
/>
</p>
</legend>
<input
onChange={handleSwitchChange}
className="toggle-checkbox"
type="checkbox"
checked={switchChecked}
id="security-key-mfa"
/>
<div className="toggle-switch"></div>
</label>
</form>
</p>
</legend>
<input
onChange={handleSwitchChange}
className="toggle-checkbox"
type="checkbox"
checked={switchChecked}
id="security-key-mfa"
/>
<div className="toggle-switch"></div>
</label>
</fieldset>
</>
</form>
);
}

0 comments on commit afdb66c

Please sign in to comment.