Add basic editing functionality

This commit is contained in:
2019-03-04 19:48:29 +00:00
parent eb7eabb7c7
commit c41141fea6
4 changed files with 60 additions and 31 deletions

View File

@ -88,7 +88,6 @@ class BaseCaseStudyForm(forms.models.ModelForm):
self.helper.form_id = 'case-study-form'
self.helper.form_class = 'form-horizontal'
self.helper.form_method = 'post'
self.helper.form_action = 'add'
self.helper.label_class = 'col-md-3'
self.helper.field_class = 'col-md-9'
self.helper.include_media = False
@ -110,7 +109,6 @@ class ShortCaseStudyForm(BaseCaseStudyForm):
def __init__(self, *args, **kwargs):
super(ShortCaseStudyForm, self).__init__(*args, **kwargs)
self.helper.form_action = reverse('short-form')
self.helper.add_input(Submit('submit', _('Submit'), css_class='btn-success center-block'))
# Duplicate code from long form, below...