From 5e8475a02053f1df18d08d3c45afdf687b664fa4 Mon Sep 17 00:00:00 2001 From: MR Lemon Date: Fri, 17 Apr 2020 22:44:27 +0100 Subject: making the form slightly better --- ctrack/caf/forms.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'ctrack/caf/forms.py') diff --git a/ctrack/caf/forms.py b/ctrack/caf/forms.py index 5903a2c..1d07249 100644 --- a/ctrack/caf/forms.py +++ b/ctrack/caf/forms.py @@ -1,5 +1,5 @@ from crispy_forms.helper import FormHelper -from crispy_forms.layout import Button +from crispy_forms.layout import Button, Field from crispy_forms.layout import ButtonHolder from crispy_forms.layout import Fieldset from crispy_forms.layout import Layout @@ -28,13 +28,14 @@ class ApplicableSystemCreateForm(forms.ModelForm): self.helper.layout = Layout( Fieldset( "Create a new System", - "name", - "description", - "organisation", - "caf", + Field("name", css_class="form-control form-control-sm"), + Field("description", css_class="form-control form-control-sm"), + Field("organisation", css_class="form-control form-control-sm"), + Field("caf", css_class="form-control form-control-sm") ), ButtonHolder( - Submit("submit", "Submit", css_class="btn-primary") + Submit("submit", "Submit", css_class="btn-primary"), + Button("cancel", "Cancel", css_class="btn-danger") ) ) -- cgit v1.2.3