[UPDT] HORILLA WIDGETS: Horilla form select field widgets condition

This commit is contained in:
Horilla
2024-10-25 15:31:33 +05:30
parent 63e9cd78b1
commit b48ebf7fe4
2 changed files with 2 additions and 2 deletions

View File

@@ -1 +1 @@
{% for name, value in widget.attrs.items %}{% if value is not False %} {{ name }}{% if value is not True %}="{{ value|stringformat:'s' }}"{% endif %}{% endif %}{% endfor %}
{% for name, value in widget.attrs.items %}{% if value is not False %} {{ name }}{% if value is not True %}="{{ value|stringformat:'s' }}"{% endif %}{% endif %}{% endfor %}

View File

@@ -1 +1 @@
<option value="{{ widget.value|stringformat:'s' }}" {% include "horilla_widgets/attr.html" %} {% if not widget.value %}disabled{% endif %}>{{ widget.label }}{{widget.disable_option}}</option>
<option value="{{ widget.value|stringformat:'s' }}" {% include "horilla_widgets/attr.html" %} {% if widget.value == "" %}disabled{% endif %}>{{ widget.label }}{{widget.disable_option}}</option>