diff --git a/changelog/8683.md b/changelog/8683.md new file mode 100644 index 0000000000..a86d9ed0eb --- /dev/null +++ b/changelog/8683.md @@ -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 + diff --git a/meinberlin/apps/platformemails/forms.py b/meinberlin/apps/platformemails/forms.py index de84d49042..5b2ccc59dc 100644 --- a/meinberlin/apps/platformemails/forms.py +++ b/meinberlin/apps/platformemails/forms.py @@ -17,3 +17,7 @@ class Meta: "people in summer." ), } + + def __init__(self, **kwargs): + super().__init__(**kwargs) + self.fields["sender"].required = True diff --git a/meinberlin/apps/platformemails/templates/meinberlin_platformemails/platformemail_form.html b/meinberlin/apps/platformemails/templates/meinberlin_platformemails/platformemail_form.html index 2f814696e8..5d63937f5d 100644 --- a/meinberlin/apps/platformemails/templates/meinberlin_platformemails/platformemail_form.html +++ b/meinberlin/apps/platformemails/templates/meinberlin_platformemails/platformemail_form.html @@ -1,36 +1,33 @@ -{% extends "a4dashboard/base_dashboard.html" %} +{% extends "base.html" %} {% load i18n userindicator %} {% block title %} - {% translate 'Create platform email' %} + {% translate 'Create platform email' %} {% endblock title %} {% block content %} -
- {% userindicator %} -
-

{% translate 'Create platform email' %}

-

- {% blocktranslate %}This email will be sent to all registered and verified users of mein.berlin.de.{% endblocktranslate %} -

-
- {% csrf_token %} - {{ form.media }} -
- {% include 'a4forms/includes/form_field.html' with field=form.sender_name %} - {% include 'a4forms/includes/form_field.html' with field=form.sender %} -
- {% include 'a4forms/includes/form_field.html' with field=form.subject %} - {% include 'a4forms/includes/form_field.html' with field=form.body %} - -
+
+
+

{% translate 'Create platform email' %}

+

+ {% blocktranslate %}This email will be sent to all registered and verified users of mein.berlin.de.{% endblocktranslate %} +

+
+ {% csrf_token %} + {{ form.media }} +
+ {% include 'meinberlin_contrib/includes/form_field.html' with field=form.sender_name %} + {% include 'meinberlin_contrib/includes/form_field.html' with field=form.sender %}
+ {% include 'meinberlin_contrib/includes/form_field.html' with field=form.subject %} + {% include 'meinberlin_contrib/includes/form_field.html' with field=form.body %} + + + +
+
{% endblock content %} diff --git a/meinberlin/apps/platformemails/views.py b/meinberlin/apps/platformemails/views.py index 5c9bb62903..3c070bf358 100644 --- a/meinberlin/apps/platformemails/views.py +++ b/meinberlin/apps/platformemails/views.py @@ -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": "support@mein.berlin.de", } return kwargs diff --git a/meinberlin/assets/scss/components_user_facing/_narrow-wrapper.scss b/meinberlin/assets/scss/components_user_facing/_narrow-wrapper.scss index 33da001751..831aa4daac 100644 --- a/meinberlin/assets/scss/components_user_facing/_narrow-wrapper.scss +++ b/meinberlin/assets/scss/components_user_facing/_narrow-wrapper.scss @@ -15,6 +15,12 @@ } } +.narrow-wrapper__secondary-cta--left { + padding-left: 0; + margin-left: 0; + text-align: left; +} + .narrow-wrapper__footer { padding: 1em 0 3em; @@ -30,4 +36,4 @@ padding: 1.2em 0 4.6em; } -} \ No newline at end of file +} diff --git a/meinberlin/assets/scss/components_user_facing/ck-editor/_base.scss b/meinberlin/assets/scss/components_user_facing/ck-editor/_base.scss new file mode 100644 index 0000000000..04aad801a5 --- /dev/null +++ b/meinberlin/assets/scss/components_user_facing/ck-editor/_base.scss @@ -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; +} diff --git a/meinberlin/assets/scss/style_user_facing.scss b/meinberlin/assets/scss/style_user_facing.scss index ae7a15a026..7b9e008437 100644 --- a/meinberlin/assets/scss/style_user_facing.scss +++ b/meinberlin/assets/scss/style_user_facing.scss @@ -69,5 +69,6 @@ @import "components_user_facing/adhocracy4/a4-textarea-with-counter"; // ck-editor +@import "components_user_facing/ck-editor/base"; @import "components_user_facing/ck-editor/collapsible-fragment"; @import "components_user_facing/ck-editor/iframe";