This repository has been archived on 2023-09-24. You can view files and clone it, but cannot push or open issues or pull requests.
takahe/core/forms.py

12 lines
315 B
Python
Raw Normal View History

2022-11-05 21:17:27 +01:00
from crispy_forms.helper import FormHelper as BaseFormHelper
from crispy_forms.layout import Submit
class FormHelper(BaseFormHelper):
submit_text = "Submit"
def __init__(self, form=None, submit_text=None):
super().__init__(form)
self.add_input(Submit("submit", submit_text or "Submit"))