changeset 2505:49ea7807635a

Fixes HTML5 validation errors in the markup generated
author sharky93 <rishabhr123@gmail.com>
date Sun, 22 Sep 2013 15:23:14 +0530
parents 96f95afaf6f8
children 5859ca25dbfc
files MoinMoin/templates/forms.html MoinMoin/templates/index.html MoinMoin/themes/basic/templates/index.html
diffstat 3 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/forms.html	Sun Sep 22 13:34:06 2013 +0530
+++ b/MoinMoin/templates/forms.html	Sun Sep 22 15:23:14 2013 +0530
@@ -104,7 +104,7 @@
 {% macro _valued_label(field, value, contents=none) %}
   {# XXX Patch <label>'s `for` attribute with value when element referred to is
      checkbox or radio. See: https://bitbucket.org/jek/flatland/issue/9 #}
-  {{ gen.label(field, for='f_{0}_{1}'.format(field.flattened_name(), value), contents=contents, **kwargs) }}
+  {{ gen.label(field, for='f_{0}_{1}'.format(field.flattened_name(), value.replace(' ', '')), contents=contents, **kwargs) }}
 {% endmacro %}
 
 {% macro _checkbox_label(field) %}
@@ -234,8 +234,12 @@
         </table>
     </div>
 {% endmacro %}
+
+{% macro file_uploader_styles() %}
+    <link rel="stylesheet" href="{{ url_for('serve.files', name='jquery_file_upload', filename='jquery.fileupload-ui.css') }}">
+{% endmacro %}
+
 {% macro file_uploader_scripts() %}
-    <link rel="stylesheet" href="{{ url_for('serve.files', name='jquery_file_upload', filename='jquery.fileupload-ui.css') }}">
     <script src="{{ url_for('serve.files', name='jquery_file_upload', filename='jquery.fileupload.js') }}"></script>
     <script src="{{ url_for('serve.files', name='jquery_file_upload', filename='jquery.fileupload-ui.js') }}"></script>
 {% endmacro %}
--- a/MoinMoin/templates/index.html	Sun Sep 22 13:34:06 2013 +0530
+++ b/MoinMoin/templates/index.html	Sun Sep 22 15:23:14 2013 +0530
@@ -219,3 +219,8 @@
     <script src="{{ url_for('static', filename='js/jfu.js') }}"></script>
     {{ forms.file_uploader_scripts() }}
 {% endblock %}
+
+{% block head %}
+    {{ super() }}
+    {{ forms.file_uploader_styles() }}
+{% endblock %}
--- a/MoinMoin/themes/basic/templates/index.html	Sun Sep 22 13:34:06 2013 +0530
+++ b/MoinMoin/themes/basic/templates/index.html	Sun Sep 22 15:23:14 2013 +0530
@@ -224,3 +224,8 @@
     <script src="{{ url_for('static', filename='js/jfu.js') }}"></script>
     {{ forms.file_uploader_scripts() }}
 {% endblock %}
+
+{% block head %}
+    {{ super() }}
+    {{ forms.file_uploader_styles() }}
+{% endblock %}