diff --git a/django_starfield/static/django_starfield.css b/django_starfield/static/django_starfield.css index 95171d491179fd3bff989d56f6f919a95f6e3383..3800cb150fcf0fe2f81f2a00bb8efb5751cadb6c 100644 --- a/django_starfield/static/django_starfield.css +++ b/django_starfield/static/django_starfield.css @@ -53,6 +53,11 @@ font-size: 18px; cursor: pointer; } + +.django-starfield label span +{ + display: none; +} .django-starfield input:checked ~ label { diff --git a/django_starfield/templates/django_starfield/stars.html b/django_starfield/templates/django_starfield/stars.html index d68168d93974c02a1d78bbd423089d007372e45b..239937704d6ba01fcabf55b9a28a4f433afa36aa 100644 --- a/django_starfield/templates/django_starfield/stars.html +++ b/django_starfield/templates/django_starfield/stars.html @@ -3,12 +3,12 @@ {% for i in stars %}<!-- --><input type="radio" name="{{ widget.name }}" id="{{ widget.name }}-{{ forloop.counter0 }}" value="{{ i }}" {% if widget.value == i %}checked="checked"{% endif %} /><!-- - --><label for="{{ widget.name }}-{{ forloop.counter0 }}">{{ i }}</label><!-- + --><label for="{{ widget.name }}-{{ forloop.counter0 }}"><span>{{ i }}</span></label><!-- -->{% endfor %} </div> <link rel="stylesheet" href="{% static 'django_starfield.css' %}" /> <style type="text/css"> - #django-starfield-{{ widget.name }} label { + #django-starfield-{{ widget.name }} label:before { content: '\{{ codepoint }}'; } </style>