From: Radek Czajka Date: Wed, 21 Dec 2011 13:52:21 +0000 (+0100) Subject: html validation X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/54d2f3a9f5501bfca8ab48544123f2851c6c4085?hp=-c html validation --- 54d2f3a9f5501bfca8ab48544123f2851c6c4085 diff --git a/apps/catalogue/forms.py b/apps/catalogue/forms.py index f59b356c..26d14aa4 100644 --- a/apps/catalogue/forms.py +++ b/apps/catalogue/forms.py @@ -144,7 +144,7 @@ class ReadonlyBookForm(BookForm): def __init__(self, *args, **kwargs): ret = super(ReadonlyBookForm, self).__init__(*args, **kwargs) for field in self.fields.values(): - field.widget.attrs.update({"readonly": True}) + field.widget.attrs.update({"disabled": "disabled"}) return ret @@ -179,5 +179,5 @@ class ReadonlyImageForm(ImageForm): def __init__(self, *args, **kwargs): ret = super(ReadonlyImageForm, self).__init__(*args, **kwargs) for field in self.fields.values(): - field.widget.attrs.update({"readonly": True}) + field.widget.attrs.update({"disabled": "disabled"}) return ret diff --git a/apps/catalogue/models/image.py b/apps/catalogue/models/image.py index 797d27d5..558f4c1f 100755 --- a/apps/catalogue/models/image.py +++ b/apps/catalogue/models/image.py @@ -84,8 +84,8 @@ class Image(dvcs_models.Document): raise AssertionError(_('Invalid Dublin Core') + ': ' + str(e)) valid_about = self.correct_about() - assert (picture.picture_info.about == valid_about, - _("rdf:about is not") + " " + valid_about) + assert picture.picture_info.about == valid_about, \ + _("rdf:about is not") + " " + valid_about def accessible(self, request): return self.public or request.user.is_authenticated() diff --git a/apps/catalogue/templates/catalogue/base.html b/apps/catalogue/templates/catalogue/base.html index f3ebcd98..65bbf336 100644 --- a/apps/catalogue/templates/catalogue/base.html +++ b/apps/catalogue/templates/catalogue/base.html @@ -12,7 +12,7 @@
- +
diff --git a/apps/catalogue/templates/catalogue/book_list/book_list.html b/apps/catalogue/templates/catalogue/book_list/book_list.html index 73811cab..f8d18d57 100755 --- a/apps/catalogue/templates/catalogue/book_list/book_list.html +++ b/apps/catalogue/templates/catalogue/book_list/book_list.html @@ -2,7 +2,7 @@ {% load pagination_tags %} -
+ {% if not viewed_user %} @@ -45,6 +45,8 @@ {% endif %}value="{{ user.username }}">{{ user.first_name }} {{ user.last_name }} ({{ user.count }}) {% endfor %} + {% else %} + {% endif %} {% if not viewed_user %} diff --git a/apps/catalogue/templates/catalogue/wall.html b/apps/catalogue/templates/catalogue/wall.html index 9227ba19..c277f940 100755 --- a/apps/catalogue/templates/catalogue/wall.html +++ b/apps/catalogue/templates/catalogue/wall.html @@ -7,7 +7,8 @@
  • {% if item.get_email %} - {% gravatar_img_for_email item.get_email 32 %} + Avatar
    {% endif %}
    diff --git a/apps/wiki/templates/wiki/document_details_base.html b/apps/wiki/templates/wiki/document_details_base.html index dbbe7a10..9ef0c33e 100644 --- a/apps/wiki/templates/wiki/document_details_base.html +++ b/apps/wiki/templates/wiki/document_details_base.html @@ -8,7 +8,7 @@ {% endblock %} {% block extrabody %} - {% compressed_js 'detail' %} @@ -27,7 +27,7 @@