diff --git a/bookwyrm/forms.py b/bookwyrm/forms.py index b53d0b6a5..0be53ba0a 100644 --- a/bookwyrm/forms.py +++ b/bookwyrm/forms.py @@ -311,6 +311,12 @@ class EmailBlocklistForm(CustomForm): fields = ["domain"] +class IPBlocklistForm(CustomForm): + class Meta: + model = models.IPBlocklist + fields = ["address"] + + class ServerForm(CustomForm): class Meta: model = models.FederatedServer diff --git a/bookwyrm/middleware/ip_middleware.py b/bookwyrm/middleware/ip_middleware.py index 7fcec1df5..8063dd1f6 100644 --- a/bookwyrm/middleware/ip_middleware.py +++ b/bookwyrm/middleware/ip_middleware.py @@ -11,6 +11,6 @@ class IPBlocklistMiddleware: def __call__(self, request): address = request.META.get("REMOTE_ADDR") - if models.IPBlockList.objects.filter(address=address).exists(): + if models.IPBlocklist.objects.filter(address=address).exists(): raise Http404() return self.get_response(request) diff --git a/bookwyrm/static/css/bookwyrm.css b/bookwyrm/static/css/bookwyrm.css index 9065d7fba..e1012c2fd 100644 --- a/bookwyrm/static/css/bookwyrm.css +++ b/bookwyrm/static/css/bookwyrm.css @@ -378,6 +378,13 @@ input[type=file]::file-selector-button:hover { right: 1em; } +/** Tooltips + ******************************************************************************/ + +.tooltip { + width: 100%; +} + /** States ******************************************************************************/ diff --git a/bookwyrm/templates/components/tooltip.html b/bookwyrm/templates/components/tooltip.html index 06b13f344..b1a8f56c1 100644 --- a/bookwyrm/templates/components/tooltip.html +++ b/bookwyrm/templates/components/tooltip.html @@ -3,7 +3,7 @@ {% trans "Help" as button_text %} {% include 'snippets/toggle/open_button.html' with text=button_text class="ml-3 is-rounded is-small is-white p-0 pb-1" icon="question-circle is-size-6" controls_text=controls_text controls_uid=controls_uid %} -