mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-05-28 02:19:31 +02:00
feat: more changes and fixes
This commit is contained in:
@@ -5,46 +5,48 @@
|
||||
{% else %}
|
||||
<div id="div_{{ field.auto_id }}" class="{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if form_group_wrapper_class %} {{ form_group_wrapper_class }}{% endif %}{% if form_show_errors and field.errors %} has-error{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">
|
||||
|
||||
{% if field.label and form_show_labels %}
|
||||
<label for="{{ field.id_for_label }}" class="label{{ label_class }}{% if field.field.required %} requiredField{% endif %}">
|
||||
<span class="label-text">{{ field.label }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}</span>
|
||||
</label>
|
||||
{% endif %}
|
||||
<fieldset class="fieldset{% if field_class %} {{ field_class }}{% endif %}">
|
||||
{% if field.label and form_show_labels %}
|
||||
<legend class="fieldset-legend{{ label_class }}{% if field.field.required %} requiredField{% endif %}">
|
||||
{{ field.label }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}
|
||||
</legend>
|
||||
{% endif %}
|
||||
|
||||
<div {% if field_class %}class="{{ field_class }}"{% endif %}>
|
||||
<label class="input input-bordered flex items-center gap-2{% if input_size %} {{ input_size }}{% endif %}{% if field.errors %} input-error{% endif %}">
|
||||
<label class="input w-full {% if input_size %} {{ input_size }}{% endif %}{% if field.errors %} input-error{% endif %}">
|
||||
{# prepend #}
|
||||
{% if crispy_prepended_text %}
|
||||
<span>{{ crispy_prepended_text }}</span>
|
||||
{{ crispy_prepended_text }}
|
||||
{% endif %}
|
||||
|
||||
{# input #}
|
||||
{% if field|is_select %}
|
||||
{% if field.errors %}
|
||||
{% crispy_field field 'class' 'select-error' %}
|
||||
{% crispy_field field 'class' 'select-error grow' %}
|
||||
{% else %}
|
||||
{% crispy_field field 'class' '' %}
|
||||
{% crispy_field field 'class' 'grow' %}
|
||||
{% endif %}
|
||||
{% elif field.errors %}
|
||||
{% crispy_field field 'class' 'grow' %}
|
||||
{% else %}
|
||||
{% crispy_field field 'class' 'grow' %}
|
||||
{% endif %}
|
||||
|
||||
{# append #}
|
||||
{% if crispy_appended_text %}
|
||||
<span>{{ crispy_appended_text }}</span>
|
||||
{{ crispy_appended_text }}
|
||||
{% endif %}
|
||||
</label>
|
||||
{% if error_text_inline %}
|
||||
{% include 'crispy-daisyui/layout/field_errors.html' %}
|
||||
{% else %}
|
||||
{% include 'crispy-daisyui/layout/field_errors_block.html' %}
|
||||
{% endif %}
|
||||
{% if not help_text_inline %}
|
||||
{% include 'crispy-daisyui/layout/help_text.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{# help text as label paragraph #}
|
||||
{% if not help_text_inline %}
|
||||
{% include 'crispy-daisyui/layout/help_text.html' %}
|
||||
{% endif %}
|
||||
|
||||
{# errors #}
|
||||
{% if error_text_inline %}
|
||||
{% include 'crispy-daisyui/layout/field_errors.html' %}
|
||||
{% else %}
|
||||
{% include 'crispy-daisyui/layout/field_errors_block.html' %}
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user