crispy-daisyui 0.8.0__py3-none-any.whl → 0.9.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,13 @@
1
1
  {% load crispy_forms_filters %}
2
2
  {% load l10n %}
3
3
 
4
- <select class="select select-bordered w-full focus:ring focus:outline-none{% if field.errors %} select-error {% endif %}"
5
- name="{{ field.html_name }}"
6
- id="{% if input.id %}{{ input.id }}{% else %}{{ input.input_type }}-id-{{ input.name|slugify }}{% endif %}"
7
- {{ field.field.widget.attrs|flatatt }}>
8
- {% for value, label in field.field.choices %}
9
- {% include "daisyui/layout/select_option.html" with value=value label=label %}
10
- {% endfor %}
11
- </select>
4
+ <select
5
+ class="select select-bordered w-full focus:ring focus:outline-none{% if field.errors %} select-error{% endif %}"
6
+ name="{{ field.html_name }}"
7
+ id="{{ field.id_for_label }}"
8
+ {% if field.field.widget.allow_multiple_selected %}multiple{% endif %}
9
+ {{ field.field.widget.attrs|flatatt }}>
10
+ {% for value, label in field.field.choices %}
11
+ {% include "daisyui/layout/select_option.html" with value=value label=label %}
12
+ {% endfor %}
13
+ </select>
@@ -1,4 +1,14 @@
1
1
  {% load crispy_forms_filters %}
2
2
  {% load l10n %}
3
3
 
4
- <option value="{{ value|stringformat:'s' }}" {{ field.field.widget.attrs|flatatt }}{% if field.value|stringformat:'s' == value|stringformat:'s' %} selected{% endif %}>{{ label }}</option>
4
+ {% with current=field.value multi=field.field.widget.allow_multiple_selected %}
5
+ <option value="{{ value|stringformat:'s' }}"
6
+ {% if current %}
7
+ {% if multi %}
8
+ {% if value|stringformat:'s' in current %}selected{% endif %}
9
+ {% else %}
10
+ {% if current|stringformat:'s' == value|stringformat:'s' %}selected{% endif %}
11
+ {% endif %}
12
+ {% endif %}
13
+ >{{ label }}</option>
14
+ {% endwith %}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crispy-daisyui
3
- Version: 0.8.0
3
+ Version: 0.9.0
4
4
  Summary: A DaisyUI package for Django Crispy Forms
5
5
  Author: Fabian Geiger
6
6
  License: Apache-2.0
@@ -30,14 +30,14 @@ crispy_daisyui/templates/daisyui/layout/prepended_appended_text.html,sha256=_8nZ
30
30
  crispy_daisyui/templates/daisyui/layout/radioselect.html,sha256=UhptN_uXmgjfss5EsWGJqCrwuWfwbcaXRFgqZFj66OY,854
31
31
  crispy_daisyui/templates/daisyui/layout/radioselect_inline.html,sha256=vQxTJBN7mm5n57sdcRI86SZwllGu_asrR8QnIHj-MT0,893
32
32
  crispy_daisyui/templates/daisyui/layout/row.html,sha256=qGv5hSu1_QDZTqQDKhEwry4eJCBqei7m4yARuDVNEmM,169
33
- crispy_daisyui/templates/daisyui/layout/select.html,sha256=-_xw2lGdNfBVAE0SD-i2cHrN3rC9iGw91UgNK0LQP8E,525
34
- crispy_daisyui/templates/daisyui/layout/select_option.html,sha256=c5oNLFw_hYICvixovxbd6o1EI_8aqYT38DudWlaDOmg,237
33
+ crispy_daisyui/templates/daisyui/layout/select.html,sha256=KNpc8KHABlmmsv9f0gw1KlNOmdvs1hYId89vIHMH1l4,506
34
+ crispy_daisyui/templates/daisyui/layout/select_option.html,sha256=CKgPAMLoTsCzATUjyLrzF5KKOIVK85RaPl_emWxEIGY,464
35
35
  crispy_daisyui/templates/daisyui/layout/toggle.html,sha256=i8F7a9Wx-rkuQ6QEvFRXo2h4CngfQMOYifrNt6kmYWQ,418
36
36
  crispy_daisyui/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  crispy_daisyui/templatetags/daisyui_field.py,sha256=FQz008pHvHN2w5dOe5FCIpJIPnWhBbYaGw8CdWt97yA,7680
38
38
  crispy_daisyui/templatetags/daisyui_filters.py,sha256=4RCNLV-fS6Pe3fwdMgqnExFtAHYGdtMB016nzt9fdno,3708
39
- crispy_daisyui-0.8.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
40
- crispy_daisyui-0.8.0.dist-info/METADATA,sha256=pX2bV0PPqm3eJe0FjFxanjautbjO2wD9PScKFJoVrdQ,2119
41
- crispy_daisyui-0.8.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
42
- crispy_daisyui-0.8.0.dist-info/top_level.txt,sha256=iUfAwww7rFyMb7SijKgjBe3vui_xvSHOovH4tPtPjTo,15
43
- crispy_daisyui-0.8.0.dist-info/RECORD,,
39
+ crispy_daisyui-0.9.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
40
+ crispy_daisyui-0.9.0.dist-info/METADATA,sha256=dZazKUeQALKao_u2hIE8enK02Iuj16YQvshEBVzZGes,2119
41
+ crispy_daisyui-0.9.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
42
+ crispy_daisyui-0.9.0.dist-info/top_level.txt,sha256=iUfAwww7rFyMb7SijKgjBe3vui_xvSHOovH4tPtPjTo,15
43
+ crispy_daisyui-0.9.0.dist-info/RECORD,,