mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-25 10:08:36 +02:00
Merge pull request #464 from eitchtee/dev
fix: input fields with text inside looks wrong
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
{% load crispy_forms_field %}
|
{% load crispy_forms_field %}
|
||||||
|
{% load crispy_extra %}
|
||||||
|
|
||||||
{% if field.is_hidden %}
|
{% if field.is_hidden %}
|
||||||
{{ field }}
|
{{ field }}
|
||||||
@@ -7,33 +8,43 @@
|
|||||||
|
|
||||||
<fieldset class="fieldset{% if field_class %} {{ field_class }}{% endif %}">
|
<fieldset class="fieldset{% if field_class %} {{ field_class }}{% endif %}">
|
||||||
{% if field.label and form_show_labels %}
|
{% if field.label and form_show_labels %}
|
||||||
<legend class="fieldset-legend{{ label_class }}{% if field.field.required %} requiredField{% endif %}">
|
<label for="{{ field.id_for_label }}" class="fieldset-legend{% if label_class %} {{ label_class }}{% endif %}{% if field.field.required %} requiredField{% endif %}">
|
||||||
{{ field.label }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}
|
{{ field.label }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}
|
||||||
</legend>
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<label class="{% if input_size %} {{ input_size }}{% endif %}{% if field.errors %} input-error{% endif %}">
|
<div class="join w-full{% if input_size %} {{ input_size }}{% endif %}">
|
||||||
{# prepend #}
|
{# prepend #}
|
||||||
{% if crispy_prepended_text %}
|
{% if crispy_prepended_text %}
|
||||||
{{ crispy_prepended_text }}
|
<span class="join-item flex items-center px-3 bg-base-200 border border-base-300">{{ crispy_prepended_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# input #}
|
{# input #}
|
||||||
{% if field|is_select %}
|
{% if field|is_select %}
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% crispy_field field 'class' 'select-error grow' %}
|
{% crispy_field field 'class' 'select select-error join-item grow' %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% crispy_field field 'class' 'grow' %}
|
{% crispy_field field 'class' 'select join-item grow' %}
|
||||||
|
{% endif %}
|
||||||
|
{% elif field|is_input %}
|
||||||
|
{% if field.errors %}
|
||||||
|
{% crispy_field field 'class' 'input input-error join-item grow' %}
|
||||||
|
{% else %}
|
||||||
|
{% crispy_field field 'class' 'input join-item grow' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% crispy_field field 'class' 'grow' %}
|
{% if field.errors %}
|
||||||
|
{% crispy_field field 'class' 'input input-error join-item grow' %}
|
||||||
|
{% else %}
|
||||||
|
{% crispy_field field 'class' 'input join-item grow' %}
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# append #}
|
{# append #}
|
||||||
{% if crispy_appended_text %}
|
{% if crispy_appended_text %}
|
||||||
{{ crispy_appended_text }}
|
<span class="join-item flex items-center px-3 bg-base-200 border border-base-300">{{ crispy_appended_text }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</label>
|
</div>
|
||||||
|
|
||||||
{# help text as label paragraph #}
|
{# help text as label paragraph #}
|
||||||
{% if not help_text_inline %}
|
{% if not help_text_inline %}
|
||||||
|
|||||||
Reference in New Issue
Block a user