diff --git a/counter/forms.py b/counter/forms.py index 10109b4d..27dc74d7 100644 --- a/counter/forms.py +++ b/counter/forms.py @@ -43,7 +43,6 @@ class BillingInfoForm(forms.ModelForm): ] widgets = { "phone_number": RegionalPhoneNumberWidget, - "country": AutoCompleteSelect, } diff --git a/eboutic/models.py b/eboutic/models.py index 60dddb91..b6daaf34 100644 --- a/eboutic/models.py +++ b/eboutic/models.py @@ -51,7 +51,9 @@ class BillingInfoState(Enum): MISSING_PHONE_NUMBER = 3 @classmethod - def from_model(cls, info: BillingInfo) -> BillingInfoState: + def from_model(cls, info: BillingInfo | None) -> BillingInfoState: + if info is None: + return cls.EMPTY for attr in [ "first_name", "last_name", diff --git a/eboutic/templates/eboutic/eboutic_billing_info.jinja b/eboutic/templates/eboutic/eboutic_billing_info.jinja index b498e234..4a1d0739 100644 --- a/eboutic/templates/eboutic/eboutic_billing_info.jinja +++ b/eboutic/templates/eboutic/eboutic_billing_info.jinja @@ -16,7 +16,7 @@ class="collapse-body" hx-trigger="submit" hx-post="{{ action }}" - hx-swap="outerHTML settle:100" + hx-swap="outerHTML" hx-target="closest span" x-show="collapsed" > diff --git a/eboutic/templates/eboutic/eboutic_main.jinja b/eboutic/templates/eboutic/eboutic_main.jinja index ee563dd0..1e070b95 100644 --- a/eboutic/templates/eboutic/eboutic_main.jinja +++ b/eboutic/templates/eboutic/eboutic_main.jinja @@ -66,7 +66,6 @@ {% trans %}Clear{% endtrans %}
- {% csrf_token %}