Email domain form

This commit is contained in:
Joachim 2021-11-29 23:28:29 +01:00
parent 5d0c6bdde2
commit a6760cabc8
2 changed files with 6 additions and 3 deletions

View file

@ -383,6 +383,11 @@ class EmailBlocklistForm(CustomForm):
class Meta:
model = models.EmailBlocklist
fields = ["domain"]
widgets = {
"avatar": forms.TextInput(
attrs={'aria-describedby': "desc_domain"}
),
}
class IPBlocklistForm(CustomForm):

View file

@ -17,10 +17,8 @@
{{ form.domain }}
</div>
</div>
{% for error in form.domain.errors %}
<p class="help is-danger">{{ error | escape }}</p>
{% endfor %}
{% include 'snippets/form_errors.html' with errors_list=form.domain.errors id="desc_domain" %}
<div class="field">
<div class="control">
<button type="submit" class="button is-primary">{% trans "Add" %}</button>