diff --git a/atlas/forms.py b/atlas/forms.py index 2d80f167..60fbda07 100755 --- a/atlas/forms.py +++ b/atlas/forms.py @@ -131,6 +131,18 @@ class ConditionForm(ModelForm): ), } + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + # Crispy helper to render a submit button consistently + try: + self.helper = FormHelper() + self.helper.form_method = "post" + self.helper.form_tag = True + self.helper.add_input(Submit("submit", "Submit")) + except Exception: + # If crispy not available or something goes wrong, don't break form + pass + class CaseCollectionForm(ModelForm): class Meta: