class-jetpack-force-2fa.php
2 years ago
class.jetpack-sso-helpers.php
2 years ago
class.jetpack-sso-notices.php
4 years ago
class.jetpack-sso-user-admin.php
2 years ago
jetpack-sso-admin-create-user-rtl.css
2 years ago
jetpack-sso-admin-create-user-rtl.min.css
2 years ago
jetpack-sso-admin-create-user.css
2 years ago
jetpack-sso-admin-create-user.js
2 years ago
jetpack-sso-admin-create-user.min.css
2 years ago
jetpack-sso-login-rtl.css
4 years ago
jetpack-sso-login-rtl.min.css
4 years ago
jetpack-sso-login.css
4 years ago
jetpack-sso-login.js
2 years ago
jetpack-sso-login.min.css
4 years ago
jetpack-sso-users.js
2 years ago
jetpack-sso-login.js
28 lines
| 1 | document.addEventListener( 'DOMContentLoaded', () => { |
| 2 | const body = document.querySelector( 'body' ), |
| 3 | toggleSSO = document.querySelector( '.jetpack-sso-toggle' ), |
| 4 | userLogin = document.getElementById( 'user_login' ), |
| 5 | userPassword = document.getElementById( 'user_pass' ), |
| 6 | ssoWrap = document.getElementById( 'jetpack-sso-wrap' ), |
| 7 | loginForm = document.getElementById( 'loginform' ), |
| 8 | overflow = document.createElement( 'div' ); |
| 9 | |
| 10 | overflow.className = 'jetpack-sso-clear'; |
| 11 | |
| 12 | loginForm.appendChild( overflow ); |
| 13 | overflow.appendChild( document.querySelector( 'p.forgetmenot' ) ); |
| 14 | overflow.appendChild( document.querySelector( 'p.submit' ) ); |
| 15 | |
| 16 | loginForm.appendChild( ssoWrap ); |
| 17 | body.classList.add( 'jetpack-sso-repositioned' ); |
| 18 | |
| 19 | toggleSSO.addEventListener( 'click', e => { |
| 20 | e.preventDefault(); |
| 21 | body.classList.toggle( 'jetpack-sso-form-display' ); |
| 22 | if ( ! body.classList.contains( 'jetpack-sso-form-display' ) ) { |
| 23 | userLogin.focus(); |
| 24 | userPassword.disabled = false; |
| 25 | } |
| 26 | } ); |
| 27 | } ); |
| 28 |