File tree Expand file tree Collapse file tree 3 files changed +2
-21
lines changed Expand file tree Collapse file tree 3 files changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -94,24 +94,6 @@ class Html5EmailInput(forms.widgets.Input):
9494 input_type = 'email'
9595
9696
97- class Form (forms .Form ):
98- """Customized form, using Bootstrap."""
99-
100- def as_div (self ):
101- "Return this form rendered as HTML <div>s."
102- return self ._html_output (
103- normal_row = ('<div%(html_class_attr)s class="form-group row">'
104- '%(label)s'
105- '<div class="col-12 col-md-9 col-lg-10">'
106- '%(field)s%(help_text)s'
107- '</div>'
108- '</div>' ),
109- error_row = '%s' ,
110- row_ender = '</p>' ,
111- help_text_html = ' <span class="helptext">%s</span>' ,
112- errors_on_separate_row = True )
113-
114-
11597def getxmlline (key , value ):
11698 """Get a XML line for a key/value."""
11799 strvalue = f'{ value } ' .replace ('<' , '<' ).replace ('>' , '>' )
Original file line number Diff line number Diff line change 3030from flashtux .common .forms import (
3131 CharField ,
3232 EmailField ,
33- Form ,
3433 Html5EmailInput ,
3534 TestField ,
3635)
@@ -131,7 +130,7 @@ class Meta:
131130 ordering = ['-date' ]
132131
133132
134- class CommentFormAdd (Form ):
133+ class CommentFormAdd (forms . Form ):
135134 """Form to add a script."""
136135 required_css_class = 'required'
137136 title = CharField (
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ <h4>{% trans "New comment" %}</h4>
4848 < div class ="col-12 col-md-8 ">
4949 < form action =". " method ="post " enctype ="multipart/form-data ">
5050 {% csrf_token %}
51- {{ form.as_div }}
51+ {{ form.as_p }}
5252 < button type ="submit " class ="btn btn-success mt-3 me-3 px-5 "> {% trans "Submit" %}</ button >
5353 < a href ="{% url 'info' section=section info_id=info.id %} " class ="btn btn-danger mt-3 px-5 " role ="button "> {% trans "Cancel" %}</ a >
5454 </ form >
You can’t perform that action at this time.
0 commit comments