diff --git a/src/pretix/control/forms/event.py b/src/pretix/control/forms/event.py index 068d306d42..79b7b4b2d5 100644 --- a/src/pretix/control/forms/event.py +++ b/src/pretix/control/forms/event.py @@ -1635,10 +1635,15 @@ class MailSettingsForm(FormPlaceholderMixin, SettingsForm): self._set_field_placeholders(k, v, rich=k.startswith('mail_text_') and k not in self.plain_rendering) for k, v in list(self.fields.items()): - if k.endswith('_attendee') and not event.settings.attendee_emails_asked: - # If we don't ask for attendee emails, we can't send them anything and we don't need to clutter - # the user interface with it - del self.fields[k] + if k.endswith('_attendee'): + if not event.settings.attendee_emails_asked: + # If we don't ask for attendee emails, we can't send them anything and we don't need to clutter + # the user interface with it + del self.fields[k] + elif 'subject' in k and k.replace("subject", "send") in self.fields: + v.widget.attrs["data-display-dependency"] = f'#id_{k.replace("subject", "send")}' + elif 'text' in k and k.replace("text", "send") in self.fields: + v.widget.attrs["data-display-dependency"] = f'#id_{k.replace("text", "send")}' class TicketSettingsForm(SettingsForm): diff --git a/src/pretix/static/pretixcontrol/js/ui/main.js b/src/pretix/static/pretixcontrol/js/ui/main.js index 7ebefa0bbd..5dee045a8f 100644 --- a/src/pretix/static/pretixcontrol/js/ui/main.js +++ b/src/pretix/static/pretixcontrol/js/ui/main.js @@ -401,6 +401,9 @@ var form_handlers = function (el) { if (tagName !== "div" && tagName !== "button") { $toggling = dependent.closest('.form-group'); } + if ($toggling.find(".has-error").length > 0) { + enabled = true; // Don't hide error message that makes form unsubmittable + } if (ev) { if (enabled) { $toggling.stop().slideDown();