Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Forwarding UI When No PGP Key Present #507

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions hushline/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1681,6 +1681,14 @@ input#captcha_answer {
margin-top: 2.25rem;
}

#email .forwarding {
margin-bottom: 0;
}

#email .forwarding+.meta {
margin-bottom: 1rem;
}

@media only screen and (max-width: 768px) {

.container {
Expand Down
12 changes: 7 additions & 5 deletions hushline/templates/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,15 @@ <h3>Change Password</h3>
<div id="email" class="tab-content" role="tabpanel" aria-labelledby="email-tab" hidden>
<!-- SMTP Settings Section -->
<h3>Email Forwarding</h3>
{% if not is_personal_server and default_forwarding_enabled %}
<p class="meta">✊ Email forwarding is powered by <a href="https://riseup.net" target="_blank"
rel="noopener noreferrer">Riseup.net</a>.</p>
{% endif %}
{% if not user.pgp_key %}
<p class="info">Add a PGP key to enable email forwarding. <a
href="https://github.com/scidsg/hushline/blob/main/docs/1-getting-started.md#2-mailvelope">Here's
how.</a></p>
{% endif %}
<form method="POST" action="{{ url_for('settings.update_smtp_settings') }}" class="formBody">
{% if user.pgp_key %}
{{ email_forwarding_form.hidden_tag() }}
<div class="checkbox-group toggle-ui">
<div class="checkbox-group toggle-ui forwarding">
{{ email_forwarding_form.forwarding_enabled() }}
<label for="forwarding_enabled" class="toggle-label">
{{ email_forwarding_form.forwarding_enabled.label }}
Expand All @@ -160,6 +157,10 @@ <h3>Email Forwarding</h3>
</div>
</label>
</div>
{% if not is_personal_server and default_forwarding_enabled %}
<p class="meta">✊ Email forwarding is powered by <a href="https://riseup.net" target="_blank"
rel="noopener noreferrer">Riseup.net</a>.</p>
{% endif %}
<fieldset id="forwarding_enabled_fields">
{{ email_forwarding_form.email_address.label }}
{{ email_forwarding_form.email_address }}
Expand Down Expand Up @@ -190,6 +191,7 @@ <h3>Email Forwarding</h3>
</fieldset>
<button type="submit">Update Email Forwarding</button>
</fieldset>
{% endif %}
</form>
<!-- PGP Key Section -->
<h3>Message Encryption</h3>
Expand Down
Loading