forked from mirrors/bookwyrm
Email domain form
This commit is contained in:
parent
5d0c6bdde2
commit
a6760cabc8
2 changed files with 6 additions and 3 deletions
|
@ -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):
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue