##// END OF EJS Templates
Small style and forms rendering changes
neko259 -
r426:7ce7bc5e default
parent child Browse files
Show More
@@ -24,8 +24,8 b' class PlainErrorList(ErrorList):'
24
24
25 class NeboardForm(forms.Form):
25 class NeboardForm(forms.Form):
26
26
27 def as_p(self):
27 def as_div(self):
28 "Returns this form rendered as HTML <p>s."
28 "Returns this form rendered as HTML <as_div>s."
29 return self._html_output(
29 return self._html_output(
30 # TODO Do not show hidden rows in the list here
30 # TODO Do not show hidden rows in the list here
31 normal_row='<div class="form-row">'
31 normal_row='<div class="form-row">'
@@ -37,9 +37,12 b' class NeboardForm(forms.Form):'
37 '</div>'
37 '</div>'
38 '%(help_text)s'
38 '%(help_text)s'
39 '</div>',
39 '</div>',
40 error_row='<div class="form-row"><div class="form-label"></div><div class="form-errors">%s</div></div>',
40 error_row='<div class="form-row">'
41 row_ender='</p>',
41 '<div class="form-label"></div>'
42 help_text_html=' <span class="helptext">%s</span>',
42 '<div class="form-errors">%s</div>'
43 '</div>',
44 row_ender='</div>',
45 help_text_html='%s',
43 errors_on_separate_row=True)
46 errors_on_separate_row=True)
44
47
45 class PostForm(NeboardForm):
48 class PostForm(NeboardForm):
@@ -20,7 +20,6 b' html {'
20 color: #FF0000;
20 color: #FF0000;
21 }
21 }
22
22
23
24 .title {
23 .title {
25 font-weight: bold;
24 font-weight: bold;
26 color: #ffcc00;
25 color: #ffcc00;
@@ -126,8 +125,7 b' p {'
126 }
125 }
127
126
128 .form-errors {
127 .form-errors {
129 padding-left: 1ex;
128 font-weight: bolder;
130 font-weight: bold;
131 vertical-align: middle;
129 vertical-align: middle;
132 }
130 }
133
131
@@ -141,9 +139,8 b' p {'
141 }
139 }
142
140
143 .form-submit {
141 .form-submit {
144 border-bottom: 2px solid #ddd;
142 display: table;
145 margin-bottom: .5em;
143 margin-bottom: 1ex;
146 padding-bottom: .5em;
147 }
144 }
148
145
149 .form-title {
146 .form-title {
@@ -154,8 +151,13 b' p {'
154
151
155 input[type="submit"] {
152 input[type="submit"] {
156 background: #222;
153 background: #222;
157 border: solid 1px #fff;
154 border: solid 2px #fff;
158 color: #fff;
155 color: #fff;
156 padding: 0.5ex;
157 }
158
159 input[type="submit"]:hover {
160 background: #060;
159 }
161 }
160
162
161 blockquote {
163 blockquote {
@@ -300,10 +302,6 b' li {'
300 margin-top: 1em;
302 margin-top: 1em;
301 }
303 }
302
304
303 input[type="submit"]:hover {
304 background: #555;
305 }
306
307 .fav {
305 .fav {
308 color: yellow;
306 color: yellow;
309 }
307 }
@@ -207,11 +207,12 b''
207 <div class="post-form">
207 <div class="post-form">
208 <div class="form-title">{% trans "Create new thread" %}</div>
208 <div class="form-title">{% trans "Create new thread" %}</div>
209 <form enctype="multipart/form-data" method="post">{% csrf_token %}
209 <form enctype="multipart/form-data" method="post">{% csrf_token %}
210 {{ form.as_p }}
210 {{ form.as_div }}
211 <div class="form-submit">
211 <div class="form-submit">
212 <input type="submit" value="{% trans "Post" %}"/></div>
212 <input type="submit" value="{% trans "Post" %}"/>
213 <div>
213 </div>
214 </form>
214 </form>
215 <div>
215 {% trans 'Tags must be delimited by spaces. Text or image is required.' %}
216 {% trans 'Tags must be delimited by spaces. Text or image is required.' %}
216 </div>
217 </div>
217 <div><a href="{% url "staticpage" name="help" %}">
218 <div><a href="{% url "staticpage" name="help" %}">
@@ -26,9 +26,10 b''
26 <div class="post-form-w">
26 <div class="post-form-w">
27 <div class="post-form">
27 <div class="post-form">
28 <form method="post">{% csrf_token %}
28 <form method="post">{% csrf_token %}
29 {{ form.as_p }}
29 {{ form.as_div }}
30 <hr />
30 <div class="form-submit">
31 <input type="submit" value="{% trans "Save" %}" />
31 <input type="submit" value="{% trans "Save" %}" />
32 </div>
32 </form>
33 </form>
33 </div>
34 </div>
34 </div>
35 </div>
@@ -98,7 +98,7 b''
98 <div class="post-form">
98 <div class="post-form">
99 <form id="form" enctype="multipart/form-data" method="post"
99 <form id="form" enctype="multipart/form-data" method="post"
100 >{% csrf_token %}
100 >{% csrf_token %}
101 {{ form.as_p }}
101 {{ form.as_div }}
102 <div class="form-submit">
102 <div class="form-submit">
103 <input type="submit" value="{% trans "Post" %}"/>
103 <input type="submit" value="{% trans "Post" %}"/>
104 </div>
104 </div>
General Comments 0
You need to be logged in to leave comments. Login now