1414)
1515from .models import (
1616 Project , ProjectScreenshot , Domain , Organisation , ProjectFlatpage )
17- from certification .forms import MultiSelectWidget
1817
1918logger = logging .getLogger (__name__ )
2019
2120
21+ class MultiSelectWidget (forms .SelectMultiple ):
22+ template_name = 'widgets/multiselect.html'
23+
2224class ProjectScreenshotForm (forms .ModelForm ):
2325 """Form to input a screenshot linked to a project."""
2426
@@ -40,6 +42,7 @@ def __init__(self, *args, **kwargs):
4042 self .helper .layout = layout
4143 self .helper .include_media = False
4244 self .helper .html5_required = False
45+ self .helper .form_class = 'box-content'
4346 super (ProjectScreenshotForm , self ).__init__ (* args , ** kwargs )
4447
4548
@@ -181,6 +184,7 @@ def __init__(self, *args, **kwargs):
181184 self .helper .layout = layout
182185 self .helper .include_media = False
183186 self .helper .html5_required = False
187+ self .helper .form_class = 'box-content'
184188 super (ProjectForm , self ).__init__ (* args , ** kwargs )
185189 self .fields ['changelog_managers' ].label_from_instance = \
186190 lambda obj : "%s <%s>" % (obj .get_full_name (), obj )
@@ -274,6 +278,7 @@ def __init__(self, *args, **kwargs):
274278 )
275279 self .helper .layout = layout
276280 self .helper .html5_required = False
281+ self .helper .form_class = 'box-content'
277282 super (RegisterDomainForm , self ).__init__ (* args , ** kwargs )
278283 self .helper .add_input (Submit ('submit' , 'Submit' , css_class = 'button is-success pt-2 mt-5' ))
279284
@@ -307,6 +312,7 @@ def __init__(self, *args, **kwargs):
307312 )
308313 self .helper .layout = layout
309314 self .helper .html5_required = False
315+ self .helper .form_class = 'box-content'
310316 super (OrganisationForm , self ).__init__ (* args , ** kwargs )
311317 self .helper .add_input (Submit ('submit' , 'Submit' , css_class = 'button is-success pt-2 mt-5' ))
312318
@@ -345,6 +351,7 @@ def __init__(self, *args, **kwargs):
345351 )
346352 self .helper .layout = layout
347353 self .helper .html5_required = False
354+ self .helper .form_class = 'box-content'
348355 super (UserForm , self ).__init__ (* args , ** kwargs )
349356 self .helper .add_input (Submit ('submit' , 'Submit' , css_class = 'button is-success pt-2 mt-5' ))
350357
0 commit comments