- Add trainer status system (pending, approved, active, inactive, disabled) - Create access control system based on trainer status - Refactor Master Dashboard with enhanced trainer table - Add status column and filtering - Implement search and pagination - Add bulk status update functionality - Create status pages for pending and disabled trainers - Implement approval workflow with email notifications - Add email template management to settings page - Include comprehensive test suite (unit, integration, E2E) This allows Master Trainers to manage trainer accounts, approve new registrations, and control access based on account status. Trainers must be approved before accessing dashboard features. Co-Authored-By: Claude <noreply@anthropic.com>
139 lines
No EOL
4.2 KiB
PHP
139 lines
No EOL
4.2 KiB
PHP
<?php
|
|
/**
|
|
* Template Name: Trainer Account Pending
|
|
*
|
|
* This template displays a message to trainers whose accounts are pending approval.
|
|
*
|
|
* @package HVAC Community Events
|
|
* @subpackage Templates
|
|
* @author Ben Reed
|
|
* @version 1.0.0
|
|
*/
|
|
|
|
// Exit if accessed directly.
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
get_header();
|
|
?>
|
|
|
|
<style>
|
|
.hvac-status-page {
|
|
max-width: 800px;
|
|
margin: 60px auto;
|
|
padding: 40px;
|
|
background: #fff;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
}
|
|
.hvac-status-page .status-icon {
|
|
width: 80px;
|
|
height: 80px;
|
|
margin: 0 auto 30px;
|
|
background: #f0ad4e;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: white;
|
|
font-size: 40px;
|
|
}
|
|
.hvac-status-page h1 {
|
|
text-align: center;
|
|
color: #333;
|
|
margin-bottom: 30px;
|
|
font-size: 32px;
|
|
}
|
|
.hvac-status-page .status-content {
|
|
font-size: 16px;
|
|
line-height: 1.8;
|
|
color: #666;
|
|
margin-bottom: 30px;
|
|
}
|
|
.hvac-status-page .status-content p {
|
|
margin-bottom: 20px;
|
|
}
|
|
.hvac-status-page .info-box {
|
|
background: #f8f9fa;
|
|
border-left: 4px solid #f0ad4e;
|
|
padding: 20px;
|
|
margin: 30px 0;
|
|
border-radius: 4px;
|
|
}
|
|
.hvac-status-page .info-box h3 {
|
|
margin-top: 0;
|
|
color: #333;
|
|
}
|
|
.hvac-status-page .button-group {
|
|
text-align: center;
|
|
margin-top: 40px;
|
|
}
|
|
.hvac-status-page .button {
|
|
display: inline-block;
|
|
padding: 12px 30px;
|
|
background: #0073aa;
|
|
color: white;
|
|
text-decoration: none;
|
|
border-radius: 4px;
|
|
margin: 0 10px;
|
|
transition: background 0.3s;
|
|
}
|
|
.hvac-status-page .button:hover {
|
|
background: #005a87;
|
|
color: white;
|
|
}
|
|
.hvac-status-page .button.secondary {
|
|
background: #6c757d;
|
|
}
|
|
.hvac-status-page .button.secondary:hover {
|
|
background: #545b62;
|
|
}
|
|
</style>
|
|
|
|
<div id="primary" class="content-area primary ast-container">
|
|
<main id="main" class="site-main">
|
|
<div class="hvac-status-page">
|
|
<div class="status-icon">
|
|
<i class="dashicons dashicons-clock"></i>
|
|
</div>
|
|
|
|
<h1><?php _e( 'Your Account is Pending Approval', 'hvac-community-events' ); ?></h1>
|
|
|
|
<div class="status-content">
|
|
<p>
|
|
<?php _e( 'Thank you for registering as an HVAC trainer! Your account has been successfully created and is currently pending approval by our team.', 'hvac-community-events' ); ?>
|
|
</p>
|
|
|
|
<p>
|
|
<?php _e( 'We review all new trainer applications to ensure the quality and integrity of our training network. This process typically takes 1-2 business days.', 'hvac-community-events' ); ?>
|
|
</p>
|
|
|
|
<div class="info-box">
|
|
<h3><?php _e( 'What happens next?', 'hvac-community-events' ); ?></h3>
|
|
<ul>
|
|
<li><?php _e( 'Our team will review your application and verify your credentials', 'hvac-community-events' ); ?></li>
|
|
<li><?php _e( 'You will receive an email notification once your account has been approved', 'hvac-community-events' ); ?></li>
|
|
<li><?php _e( 'After approval, you can log in and start creating training events', 'hvac-community-events' ); ?></li>
|
|
<li><?php _e( 'You will have access to all trainer tools and resources', 'hvac-community-events' ); ?></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<p>
|
|
<?php _e( 'If you have any questions about your application or need immediate assistance, please don\'t hesitate to contact our support team.', 'hvac-community-events' ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="button-group">
|
|
<a href="<?php echo esc_url( home_url() ); ?>" class="button secondary">
|
|
<?php _e( 'Return to Home', 'hvac-community-events' ); ?>
|
|
</a>
|
|
<a href="<?php echo esc_url( wp_logout_url( home_url() ) ); ?>" class="button">
|
|
<?php _e( 'Logout', 'hvac-community-events' ); ?>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<?php get_footer(); ?>
|