From e73ad743c5349dd6daba91febcda71c6be39b329 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Tue, 24 Jan 2017 12:23:28 +0100 Subject: [PATCH] Log form enhancements (button layout) --- contest/forms.py | 9 ++++++--- templates/contest/log.html | 4 ++++ templates/contest/logEdit.html | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/contest/forms.py b/contest/forms.py index 43c0a47..b87f7c1 100644 --- a/contest/forms.py +++ b/contest/forms.py @@ -48,12 +48,15 @@ class QSOForm(forms.ModelForm): self.helper = FormHelper() self.helper.form_id = "qso-log-form" - self.helper.form_class = "form-inline" + #self.helper.form_class = "form-inline " #self.helper.form_class = "form-horizontal" - self.helper.form_style = 'inline' - self.helper.field_template = "bootstrap3/layout/inline_field.html" + #self.helper.form_style = 'inline' + #self.helper.field_template = "bootstrap3/layout/inline_field.html" self.helper.action = reverse("contest:log") self.helper.add_input(Submit('submit', 'Log')) + #self.helper.layout = Layout( + # #*(QSOForm.Meta.fields + [ButtonHolder(Submit('submit', 'Submit', css_class='button white'))])) + # *(QSOForm.Meta.fields + [FormActions(Submit('submit', 'Log!'))])) def clean_call(self): diff --git a/templates/contest/log.html b/templates/contest/log.html index e3bc41d..39df524 100644 --- a/templates/contest/log.html +++ b/templates/contest/log.html @@ -26,6 +26,10 @@ width: 100px; } + #qso-log-form .form-group:last-child { + vertical-align: bottom; + } +
diff --git a/templates/contest/logEdit.html b/templates/contest/logEdit.html index c9ecf84..862b416 100644 --- a/templates/contest/logEdit.html +++ b/templates/contest/logEdit.html @@ -11,7 +11,7 @@ {% csrf_token %} {{ form|crispy }} - +