Skip to content
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
29 changes: 2 additions & 27 deletions class-two-factor-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,8 @@ public static function login_html( $user, $login_nonce, $redirect_to, $error_msg
// Disable the language switcher.
add_filter( 'login_display_language_dropdown', '__return_false' );

wp_enqueue_style( 'user-edit-2fa', plugins_url( 'user-edit.css', __FILE__ ), array(), TWO_FACTOR_VERSION );

login_header();

if ( ! empty( $error_msg ) ) {
Expand Down Expand Up @@ -1100,33 +1102,6 @@ public static function login_html( $user, $login_nonce, $redirect_to, $error_msg
</div>
<?php endif; ?>

<style>
/* @todo: migrate to an external stylesheet. */
.backup-methods-wrap {
margin-top: 16px;
padding: 0 24px;
}
.backup-methods-wrap a {
text-decoration: none;
}
.backup-methods-wrap ul {
list-style-position: inside;
}
/* Prevent Jetpack from hiding our controls, see https://github.com/Automattic/jetpack/issues/3747 */
.jetpack-sso-form-display #loginform > p,
.jetpack-sso-form-display #loginform > div {
display: block;
}
#login form p.two-factor-prompt {
margin-bottom: 1em;
}
.input.authcode {
letter-spacing: .3em;
}
.input.authcode::placeholder {
opacity: 0.5;
}
</style>
<script>
(function() {
// Enforce numeric-only input for numeric inputmode elements.
Expand Down
31 changes: 31 additions & 0 deletions user-edit.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,37 @@
margin: 0 0.15rem;
}

.backup-methods-wrap {
margin-top: 16px;
padding: 0 24px;
}

.backup-methods-wrap a {
text-decoration: none;
}

.backup-methods-wrap ul {
list-style-position: inside;
}
Comment on lines +21 to +32
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.backup-methods-wrap {
margin-top: 16px;
padding: 0 24px;
}
.backup-methods-wrap a {
text-decoration: none;
}
.backup-methods-wrap ul {
list-style-position: inside;
}
#login .backup-methods-wrap {
margin-top: 16px;
padding: 0 24px;
}
#login .backup-methods-wrap a {
text-decoration: none;
}
#login .backup-methods-wrap ul {
list-style-position: inside;
}


/* Prevent Jetpack from hiding our controls, see https://github.com/Automattic/jetpack/issues/3747 */
.jetpack-sso-form-display #loginform > p,
.jetpack-sso-form-display #loginform > div {
display: block;
}

#login form p.two-factor-prompt {
margin-bottom: 1em;
}

.input.authcode {
letter-spacing: 0.3em;
}

.input.authcode::placeholder {
opacity: 0.5;
}
Comment on lines +44 to +50
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.input.authcode {
letter-spacing: 0.3em;
}
.input.authcode::placeholder {
opacity: 0.5;
}
#loginform .input.authcode {
letter-spacing: 0.3em;
}
#loginform .input.authcode::placeholder {
opacity: 0.5;
}


.two-factor-backup-codes-wrapper > :not(:last-child) {
margin-bottom: 1em;
}
Expand Down