| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | @include 'layout/head.html' |
| 5 | </head> |
| 6 | <body> |
| 7 | @include 'layout/header.html' |
| 8 | |
| 9 | <div class="content"> |
| 10 | <h1>%twofa_title</h1> |
| 11 | |
| 12 | @if enabled |
| 13 | <p class="twofa-status twofa-status--on">%twofa_status_enabled</p> |
| 14 | <form method='post' action='/@username/settings/2fa/disable'> |
| 15 | <button type='submit' class='pr-action pr-action--close'>%twofa_disable</button> |
| 16 | </form> |
| 17 | @else |
| 18 | <p>%twofa_setup_intro</p> |
| 19 | <p class="twofa-secret"><strong>%twofa_secret</strong> <code>@secret</code></p> |
| 20 | <p class="twofa-uri"><a href="@provisioning_uri">@provisioning_uri</a></p> |
| 21 | <form method='post' action='/@username/settings/2fa/enable' class="form"> |
| 22 | <div class="field"> |
| 23 | <input type='text' name='code' placeholder='%twofa_code' pattern='[0-9]*' inputmode='numeric' required> |
| 24 | </div> |
| 25 | <div class="field"> |
| 26 | <button type='submit' class='settings-form__submit'>%twofa_verify</button> |
| 27 | </div> |
| 28 | </form> |
| 29 | @end |
| 30 | </div> |
| 31 | |
| 32 | @include 'layout/footer.html' |
| 33 | </body> |
| 34 | </html> |
| 35 | |