admin-actions.php
5 days ago
backup-codes-dialog.php
5 days ago
card-backup.php
5 days ago
card-setup.php
5 days ago
confirm-dialogs.php
5 days ago
index.php
5 days ago
main.php
5 days ago
summary.php
5 days ago
totp-details.php
5 days ago
backup-codes-dialog.php
51 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Profile section: Backup Codes Generated dialog. |
| 4 | * |
| 5 | * Overlay dialog shown after backup codes are generated from the profile page. |
| 6 | * Displays the codes with Copy, Print, Send via email actions. |
| 7 | * |
| 8 | * This template is included via admin_footer so it is available on the page. |
| 9 | * |
| 10 | * @var array $data Template data (user_id, nonce). |
| 11 | * |
| 12 | * @package wp2fa |
| 13 | * @since 4.0.0 |
| 14 | */ |
| 15 | |
| 16 | use WP2FA\WP2FA; |
| 17 | |
| 18 | defined( 'ABSPATH' ) || exit; |
| 19 | ?> |
| 20 | <div class="wp2fa-profile__confirm-overlay" id="wp2fa-profile-backup-codes-dialog" role="dialog" aria-modal="true" aria-labelledby="wp2fa-profile-backup-codes-title" style="display:none;"> |
| 21 | <div class="wp2fa-profile__confirm-dialog" style="max-width:480px;text-align:center;"> |
| 22 | <div class="wp2fa-profile-backup-codes__icon" id="wp2fa-profile-backup-codes-icon"> |
| 23 | <svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"> |
| 24 | <circle cx="28" cy="28" r="28" fill="#e8f5e9"/> |
| 25 | <path d="M18 28l7 7 13-13" stroke="#4caf50" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" fill="none"/> |
| 26 | </svg> |
| 27 | </div> |
| 28 | <!-- <h3 id="wp2fa-profile-backup-codes-title"><?php \esc_html_e( 'Backup Codes Generated', 'wp-2fa' ); ?></h3> --> |
| 29 | <p id="wp2fa-profile-backup-codes-desc"><?php echo \wp_kses_post( WP2FA::get_wp2fa_white_label_setting( 'backup_codes_generated', true ) ) ?: \esc_html__( 'Store these codes somewhere safe. Each code can only be used once.', 'wp-2fa' ); ?></p> |
| 30 | <textarea class="wp2fa-profile-backup-codes__textarea" id="wp2fa-profile-backup-codes-textarea" readonly rows="6" cols="30"></textarea> |
| 31 | <div class="wp2fa-profile-backup-codes__actions" id="wp2fa-profile-backup-codes-actions"> |
| 32 | <button type="button" class="wp2fa-profile__btn wp2fa-profile__btn--primary wp2fa-profile-backup-codes__action-btn" id="wp2fa-profile-backup-codes-copy"> |
| 33 | <?php \esc_html_e( 'Copy Codes', 'wp-2fa' ); ?> |
| 34 | </button> |
| 35 | <button type="button" class="wp2fa-profile__btn wp2fa-profile__btn--primary wp2fa-profile-backup-codes__action-btn" id="wp2fa-profile-backup-codes-print"> |
| 36 | <?php \esc_html_e( 'Print codes', 'wp-2fa' ); ?> |
| 37 | </button> |
| 38 | <button type="button" class="wp2fa-profile__btn wp2fa-profile__btn--primary wp2fa-profile-backup-codes__action-btn" id="wp2fa-profile-backup-codes-email" |
| 39 | data-nonce="<?php echo \esc_attr( \wp_create_nonce( 'wp-2fa-send-backup-codes-email-nonce' ) ); ?>"> |
| 40 | <?php \esc_html_e( 'Send Codes via email', 'wp-2fa' ); ?> |
| 41 | </button> |
| 42 | </div> |
| 43 | <div class="wp2fa-profile-backup-codes__close-wrap"> |
| 44 | <a href="#" class="wp2fa-profile-backup-codes__close-link" id="wp2fa-profile-backup-codes-close"> |
| 45 | <?php \esc_html_e( "I'm ready, close popup", 'wp-2fa' ); ?> |
| 46 | </a> |
| 47 | </div> |
| 48 | <div id="wp2fa-profile-backup-codes-status" class="wp2fa-profile-backup-codes__status" style="display:none;"></div> |
| 49 | </div> |
| 50 | </div> |
| 51 |