-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
platform-mail: update styling & fix issue with email clients when sen…
…der is missing
- Loading branch information
Showing
8 changed files
with
58 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Changed | ||
- New design for platform mail form | ||
- sender field is now required to prevent issues with email clients | ||
- CKEditor styling for redesign | ||
- change default values for fields in platform email form | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 26 additions & 30 deletions
56
meinberlin/apps/platformemails/templates/meinberlin_platformemails/platformemail_form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,31 @@ | ||
{% extends "a4dashboard/base_dashboard.html" %} | ||
{% extends "base.html" %} | ||
{% load i18n %} | ||
{% block title %} | ||
{% translate 'Create platform email' %} | ||
{% translate 'Create platform email' %} | ||
{% endblock title %} | ||
{% block content %} | ||
<div class="container"> | ||
<div class="offset-lg-3 col-lg-6"> | ||
<h1>{% translate 'Create platform email' %}</h1> | ||
<p class="form-hint"> | ||
{% blocktranslate %}This email will be sent to all registered and verified users of mein.berlin.de.{% endblocktranslate %} | ||
</p> | ||
<form novalidate | ||
enctype="multipart/form-data" | ||
action="{{ request.path }}" | ||
method="post"> | ||
{% csrf_token %} | ||
{{ form.media }} | ||
<div class="l-tiles-2"> | ||
{% include 'a4forms/includes/form_field.html' with field=form.sender_name %} | ||
{% include 'a4forms/includes/form_field.html' with field=form.sender %} | ||
</div> | ||
{% include 'a4forms/includes/form_field.html' with field=form.subject %} | ||
{% include 'a4forms/includes/form_field.html' with field=form.body %} | ||
<div class="u-spacer-bottom"> | ||
<input type="submit" | ||
class="btn btn--primary" | ||
name="send" | ||
value="{% translate 'Send' %}" /> | ||
<a href="{% url 'wagtail_serve' '' %}" class="btn btn--light">{% translate 'Cancel' %}</a> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
<div class="narrow-wrapper"> | ||
<h1 class="mb-1">{% translate 'Create platform email' %}</h1> | ||
<p> | ||
{% blocktranslate %}This email will be sent to all registered and verified users of mein.berlin.de.{% endblocktranslate %} | ||
</p> | ||
<form novalidate | ||
enctype="multipart/form-data" | ||
action="{{ request.path }}" | ||
method="post"> | ||
{% csrf_token %} | ||
{{ form.media }} | ||
<div class="l-tiles-2"> | ||
{% include 'meinberlin_contrib/includes/form_field.html' with field=form.sender_name %} | ||
{% include 'meinberlin_contrib/includes/form_field.html' with field=form.sender %} | ||
</div> | ||
{% include 'meinberlin_contrib/includes/form_field.html' with field=form.subject %} | ||
{% include 'meinberlin_contrib/includes/form_field.html' with field=form.body %} | ||
|
||
<div class="narrow-wrapper__secondary-cta narrow-wrapper__secondary-cta--left"> | ||
<a href="{% url 'wagtail_serve' '' %}">{% translate 'Cancel' %}</a> | ||
</div> | ||
<button type="submit" class="button button--full-width" name="send">{% translate 'Send' %}</button> | ||
</form> | ||
</div> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from django.conf import settings | ||
from django.contrib import auth | ||
from django.contrib import messages | ||
from django.http.response import HttpResponseRedirect | ||
|
@@ -24,11 +23,9 @@ class PlatformEmailCreateView(rules_mixins.PermissionRequiredMixin, generic.Crea | |
def get_form_kwargs(self): | ||
kwargs = super().get_form_kwargs() | ||
|
||
sender_name = settings.WAGTAIL_SITE_NAME | ||
|
||
kwargs["initial"] = { | ||
"sender_name": sender_name, | ||
"sender": settings.CONTACT_EMAIL, | ||
"sender_name": "mein.berlin.de", | ||
"sender": "[email protected]", | ||
} | ||
return kwargs | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
meinberlin/assets/scss/components_user_facing/ck-editor/_base.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.ck .ck-toolbar { | ||
border: 2px solid black !important; | ||
border-bottom: none !important; | ||
} | ||
|
||
.ck .ck-editor__editable { | ||
border: 2px solid black !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,10 @@ | |
margin-top: 0.5em; | ||
} | ||
|
||
.mb-1 { | ||
margin-bottom: .5em; | ||
} | ||
|
||
.mb-2 { | ||
margin-bottom: 1em; | ||
} | ||
|