Disable initial email verification.
This commit is contained in:
@@ -206,6 +206,31 @@
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<!-- Email Nag Screens -->
|
||||
{% if g.show_email_nag %}
|
||||
<div class="email-nag-banner">
|
||||
<div class="email-nag-content">
|
||||
<span class="email-nag-icon">📧</span>
|
||||
<span class="email-nag-text">
|
||||
<strong>Add your email address</strong> to enable account recovery and receive important notifications.
|
||||
</span>
|
||||
<a href="{{ url_for('profile') }}" class="btn btn-sm btn-primary">Add Email</a>
|
||||
<button class="email-nag-dismiss" onclick="dismissEmailNag()" title="Dismiss for this session">×</button>
|
||||
</div>
|
||||
</div>
|
||||
{% elif g.show_email_verification_nag %}
|
||||
<div class="email-nag-banner email-verify">
|
||||
<div class="email-nag-content">
|
||||
<span class="email-nag-icon">✉️</span>
|
||||
<span class="email-nag-text">
|
||||
<strong>Please verify your email address</strong> to ensure you can recover your account if needed.
|
||||
</span>
|
||||
<a href="{{ url_for('profile') }}" class="btn btn-sm btn-warning">Verify Email</a>
|
||||
<button class="email-nag-dismiss" onclick="dismissEmailNag()" title="Dismiss for this session">×</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
|
||||
@@ -229,6 +254,28 @@
|
||||
<script src="{{ url_for('static', filename='js/password-strength.js') }}"></script>
|
||||
{% if g.user %}
|
||||
<script src="{{ url_for('static', filename='js/user-dropdown.js') }}"></script>
|
||||
<script>
|
||||
function dismissEmailNag() {
|
||||
// Hide the banner with animation
|
||||
const banner = document.querySelector('.email-nag-banner');
|
||||
if (banner) {
|
||||
banner.style.animation = 'slideUp 0.3s ease-out';
|
||||
setTimeout(() => {
|
||||
banner.style.display = 'none';
|
||||
}, 300);
|
||||
}
|
||||
// Store in session storage to not show again this session
|
||||
sessionStorage.setItem('emailNagDismissed', 'true');
|
||||
}
|
||||
|
||||
// Check if already dismissed this session
|
||||
if (sessionStorage.getItem('emailNagDismissed') === 'true') {
|
||||
const banner = document.querySelector('.email-nag-banner');
|
||||
if (banner) {
|
||||
banner.style.display = 'none';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{% else %}
|
||||
<script src="{{ url_for('static', filename='js/splash.js') }}"></script>
|
||||
{% endif %}
|
||||
|
||||
@@ -93,7 +93,16 @@
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Email</span>
|
||||
<span class="info-value">{{ user.email }}</span>
|
||||
<span class="info-value">
|
||||
{% if user.email %}
|
||||
{{ user.email }}
|
||||
{% if not user.is_verified %}
|
||||
<span class="badge badge-warning">Unverified</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="text-muted">Not provided</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Role</span>
|
||||
@@ -120,10 +129,20 @@
|
||||
<form method="POST" action="{{ url_for('profile') }}" class="profile-form">
|
||||
<div class="form-group">
|
||||
<label for="email">Email Address</label>
|
||||
<input type="email" id="email" name="email" class="form-control" value="{{ user.email }}" required>
|
||||
<small>This email address is used for account verification and notifications.</small>
|
||||
<input type="email" id="email" name="email" class="form-control" value="{{ user.email or '' }}" placeholder="your@email.com">
|
||||
<small>This email address is used for account recovery and notifications.</small>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Update Email</button>
|
||||
{% if user.email and not user.is_verified %}
|
||||
<div class="alert alert-warning">
|
||||
<i>⚠️</i> Your email address is not verified.
|
||||
<a href="{{ url_for('profile') }}" class="btn btn-sm btn-warning">Send Verification Email</a>
|
||||
</div>
|
||||
{% elif not user.email %}
|
||||
<div class="alert alert-info">
|
||||
<i>ℹ️</i> Adding an email address enables account recovery and important notifications.
|
||||
</div>
|
||||
{% endif %}
|
||||
<button type="submit" class="btn btn-primary">{% if user.email %}Update{% else %}Add{% endif %} Email</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -132,7 +151,7 @@
|
||||
<h3>Change Password</h3>
|
||||
<form method="POST" action="{{ url_for('profile') }}" class="password-form">
|
||||
<!-- Hidden email field to maintain current email -->
|
||||
<input type="hidden" name="email" value="{{ user.email }}">
|
||||
<input type="hidden" name="email" value="{{ user.email or '' }}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="current_password">Current Password</label>
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
|
||||
<div class="form-group input-icon">
|
||||
<i>📧</i>
|
||||
<input type="email" id="email" name="email" class="form-control" placeholder="your@email.com" required>
|
||||
<label for="email">Email Address</label>
|
||||
<small class="form-text text-muted">We'll send a verification link to this address</small>
|
||||
<input type="email" id="email" name="email" class="form-control" placeholder="your@email.com (optional)">
|
||||
<label for="email">Email Address (Optional)</label>
|
||||
<small class="form-text text-muted">Recommended for account recovery and notifications</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group input-icon">
|
||||
@@ -80,7 +80,7 @@
|
||||
</div>
|
||||
|
||||
<div class="verification-notice">
|
||||
<p>📨 After registration, you'll need to verify your email address before you can log in.</p>
|
||||
<p>💡 You can register without an email, but we recommend adding one later for account recovery.</p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -47,8 +47,9 @@
|
||||
|
||||
<div class="form-group input-icon">
|
||||
<i>📧</i>
|
||||
<input type="email" id="email" name="email" class="form-control" placeholder="your@email.com" required>
|
||||
<label for="email">Email Address</label>
|
||||
<input type="email" id="email" name="email" class="form-control" placeholder="your@email.com (optional)">
|
||||
<label for="email">Email Address (Optional)</label>
|
||||
<small class="form-text text-muted">Recommended for account recovery</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group input-icon">
|
||||
|
||||
Reference in New Issue
Block a user