backup-codes-display.php
5 days ago
backup-codes-generate.php
5 days ago
backup-method-footer.php
5 days ago
backup-method-selection.php
5 days ago
completion.php
5 days ago
confirm-close.php
5 days ago
email-setup.php
5 days ago
email-verify.php
5 days ago
index.php
5 days ago
method-selection.php
5 days ago
modal.php
5 days ago
required-intro.php
5 days ago
totp-setup.php
5 days ago
totp-verify.php
5 days ago
welcome.php
5 days ago
backup-codes-display.php
58 lines
| 1 | <?php |
| 2 | /** |
| 3 | * WP 2FA Wizard Template: Backup Codes Display |
| 4 | * |
| 5 | * Contains two template IDs: |
| 6 | * - wp2fa-backup-codes-display — Displays generated codes with actions. |
| 7 | * - wp2fa-backup-codes-display-footer — Footer button to close wizard. |
| 8 | * |
| 9 | * tmpl-wp2fa-backup-codes-display data: |
| 10 | * - intro {string} Introductory text after generation. |
| 11 | * - codesText {string} Newline-separated codes string. |
| 12 | * - codesCount {number} Number of codes. |
| 13 | * - showCopyBtn {bool} Whether clipboard copy is supported. |
| 14 | * - copyLabel {string} "Copy" button text. |
| 15 | * - downloadLabel {string} "Download" button text. |
| 16 | * - printLabel {string} "Print" button text. |
| 17 | * - emailLabel {string} "Send via email" button text. |
| 18 | * - emailNonce {string} Nonce for email sending AJAX request. |
| 19 | * |
| 20 | * tmpl-wp2fa-backup-codes-display-footer data: |
| 21 | * - closeLabel {string} "I'm ready, close the wizard" button text. |
| 22 | * |
| 23 | * @package wp2fa |
| 24 | * @since 4.0.0 |
| 25 | */ |
| 26 | |
| 27 | defined( 'ABSPATH' ) || exit; |
| 28 | ?> |
| 29 | <script type="text/html" id="tmpl-wp2fa-backup-codes-display"> |
| 30 | <p class="wp2fa-backup-codes-display-intro" id="wp2fa-backup-codes-display-intro">{{{ data.intro }}}</p> |
| 31 | |
| 32 | <textarea class="wp2fa-backup-codes-textarea" id="wp2fa-backup-codes-textarea" readonly rows="{{ data.codesCount }}" cols="50">{{ data.codesText }}</textarea> |
| 33 | |
| 34 | <div class="wp2fa-backup-codes-actions" id="wp2fa-backup-codes-actions"> |
| 35 | <# if ( data.showCopyBtn ) { #> |
| 36 | <button class="wp2fa-wizard-btn wp2fa-wizard-btn-primary wp-2fa-button-primary" id="wp2fa-backup-codes-copy-btn" type="button">{{ data.copyLabel }}</button> |
| 37 | <# } #> |
| 38 | <button class="wp2fa-wizard-btn wp2fa-wizard-btn-primary wp-2fa-button-primary" id="wp2fa-backup-codes-download-btn" type="button">{{ data.downloadLabel }}</button> |
| 39 | <button class="wp2fa-wizard-btn wp2fa-wizard-btn-primary wp-2fa-button-primary" id="wp2fa-backup-codes-print-btn" type="button">{{ data.printLabel }}</button> |
| 40 | <button class="wp2fa-wizard-btn wp2fa-wizard-btn-primary wp-2fa-button-primary" id="wp2fa-backup-codes-email-btn" type="button" data-nonce="{{ data.emailNonce }}">{{ data.emailLabel }}</button> |
| 41 | </div> |
| 42 | |
| 43 | <div class="wp2fa-backup-codes-status" id="wp2fa-backup-codes-status" style="display: none;"></div> |
| 44 | |
| 45 | <style> |
| 46 | #wp2fa-wizard-title { |
| 47 | display: none !important; |
| 48 | } |
| 49 | .wp2fa-setup-wizard-body { |
| 50 | margin-top: -44px !important; |
| 51 | } |
| 52 | </style> |
| 53 | </script> |
| 54 | |
| 55 | <script type="text/html" id="tmpl-wp2fa-backup-codes-display-footer"> |
| 56 | <button class="wp2fa-wizard-btn wp2fa-wizard-btn-primary wp-2fa-button-primary" id="wp2fa-backup-codes-close-btn" type="button">{{ data.closeLabel }}</button> |
| 57 | </script> |
| 58 |