mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-09 22:32:50 +02:00
feat: first batch of work
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
{% load crispy_forms_field %}
|
||||
|
||||
<div class="tw:form-group tw:mb-3">
|
||||
<div class="tw:join tw:w-full" role="group" aria-label="{{ field.label }}">
|
||||
<div class="form-group mb-3">
|
||||
<div class="join w-full" role="group" aria-label="{{ field.label }}">
|
||||
{% for choice in field.field.choices %}
|
||||
<input type="radio"
|
||||
class="tw:join-item tw:btn {% if forloop.first %}tw:btn-success{% elif forloop.last %}tw:btn-error{% else %}tw:btn-primary{% endif %} {% if field.errors %}tw:input-error{% endif %}"
|
||||
class="join-item btn {% if forloop.first %}btn-success{% elif forloop.last %}btn-error{% else %}btn-primary{% endif %} {% if field.errors %}input-error{% endif %} btn-outline w-1/2"
|
||||
name="{{ field.html_name }}"
|
||||
id="{{ field.html_name }}_{{ forloop.counter }}_tr"
|
||||
value="{{ choice.0 }}"
|
||||
@@ -13,13 +13,13 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if field.errors %}
|
||||
<div class="tw:text-error tw:text-sm tw:mt-1">
|
||||
<div class="text-error text-sm mt-1">
|
||||
{% for error in field.errors %}
|
||||
{{ error }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if field.help_text %}
|
||||
<small class="tw:text-base-content/60 tw:text-sm">{{ field.help_text }}</small>
|
||||
<small class="text-base-content/60 text-sm">{{ field.help_text }}</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_field %}
|
||||
|
||||
<div class="tw:form-group tw:mb-3">
|
||||
<div class="tw:join tw:w-full" role="group" aria-label="{{ field.label }}">
|
||||
<input type="radio" class="tw:join-item tw:btn tw:btn-primary" name="{{ field.name }}" id="{{ field.id_for_label }}_false"
|
||||
<div class="form-group mb-3">
|
||||
<div class="join w-full " role="group" aria-label="{{ field.label }}">
|
||||
<input type="radio" class="join-item btn btn-warning btn-outline w-1/2" name="{{ field.name }}" id="{{ field.id_for_label }}_false"
|
||||
value="false" aria-label="{% trans 'Projected' %}" {% if not field.value %}checked{% endif %}>
|
||||
|
||||
<input type="radio" class="tw:join-item tw:btn tw:btn-success" name="{{ field.name }}" id="{{ field.id_for_label }}_true"
|
||||
<input type="radio" class="join-item btn btn-success btn-outline w-1/2" name="{{ field.name }}" id="{{ field.id_for_label }}_true"
|
||||
value="true" aria-label="{% trans 'Paid' %}" {% if field.value %}checked{% endif %}>
|
||||
</div>
|
||||
|
||||
{% if field.help_text %}
|
||||
<div class="tw:text-base-content/60 tw:text-sm tw:mt-1">{{ field.help_text|safe }}</div>
|
||||
<div class="text-base-content/60 text-sm mt-1">{{ field.help_text|safe }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% load crispy_forms_field %}
|
||||
|
||||
<div class="tw:join tw:w-full tw:mb-3"
|
||||
<div class="join w-full flex mb-3"
|
||||
role="group"
|
||||
aria-label="{{ field.label }}"
|
||||
_="on click
|
||||
@@ -10,7 +10,7 @@
|
||||
end">
|
||||
{% for choice in field.field.choices %}
|
||||
<input type="checkbox"
|
||||
class="tw:join-item tw:btn tw:btn-outline"
|
||||
class="join-item btn btn-secondary btn-outline grow"
|
||||
name="{{ field.html_name }}"
|
||||
id="{{ field.html_name }}_{{ forloop.counter }}"
|
||||
value="{{ choice.0 }}"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_field %}
|
||||
|
||||
<div class="tw:form-group tw:mb-3">
|
||||
<div class="tw:join tw:w-full" role="group" aria-label="{{ field.label }}">
|
||||
<div class="form-group mb-3">
|
||||
<div class="join w-full" role="group" aria-label="{{ field.label }}">
|
||||
<input type="radio"
|
||||
class="tw:join-item tw:btn tw:btn-neutral {% if field.errors %}tw:input-error{% endif %}"
|
||||
class="join-item btn btn-neutral {% if field.errors %}input-error{% endif %}"
|
||||
name="{{ field.html_name }}"
|
||||
id="{{ field.html_name }}_none_tr"
|
||||
value=""
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
{% for choice in field.field.choices %}
|
||||
<input type="radio"
|
||||
class="tw:join-item tw:btn {% if forloop.first %}tw:btn-success{% elif forloop.last %}tw:btn-error{% else %}tw:btn-primary{% endif %} {% if field.errors %}tw:input-error{% endif %}"
|
||||
class="join-item btn {% if forloop.first %}btn-success{% elif forloop.last %}btn-error{% else %}btn-primary{% endif %} {% if field.errors %}input-error{% endif %}"
|
||||
name="{{ field.html_name }}"
|
||||
id="{{ field.html_name }}_{{ forloop.counter }}_tr"
|
||||
value="{{ choice.0 }}"
|
||||
@@ -22,13 +22,13 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if field.errors %}
|
||||
<div class="tw:text-error tw:text-sm tw:mt-1">
|
||||
<div class="text-error text-sm mt-1">
|
||||
{% for error in field.errors %}
|
||||
{{ error }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if field.help_text %}
|
||||
<small class="tw:text-base-content/60 tw:text-sm">{{ field.help_text }}</small>
|
||||
<small class="text-base-content/60 text-sm">{{ field.help_text }}</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_field %}
|
||||
|
||||
<div class="tw:form-group tw:mb-3">
|
||||
<div class="tw:join tw:w-full" role="group" aria-label="{{ field.label }}">
|
||||
<input type="radio" class="tw:join-item tw:btn tw:btn-neutral" name="{{ field.name }}" id="{{ field.id_for_label }}_null"
|
||||
<div class="form-group mb-3">
|
||||
<div class="join w-full" role="group" aria-label="{{ field.label }}">
|
||||
<input type="radio" class="join-item btn btn-neutral" name="{{ field.name }}" id="{{ field.id_for_label }}_null"
|
||||
value="" aria-label="{% trans 'Unchanged' %}" {% if field.value is None %}checked{% endif %}>
|
||||
|
||||
<input type="radio" class="tw:join-item tw:btn tw:btn-primary" name="{{ field.name }}" id="{{ field.id_for_label }}_false"
|
||||
<input type="radio" class="join-item btn btn-primary" name="{{ field.name }}" id="{{ field.id_for_label }}_false"
|
||||
value="false" aria-label="{% trans 'Projected' %}" {% if field.value is False %}checked{% endif %}">
|
||||
|
||||
<input type="radio" class="tw:join-item tw:btn tw:btn-success" name="{{ field.name }}" id="{{ field.id_for_label }}_true"
|
||||
<input type="radio" class="join-item btn btn-success" name="{{ field.name }}" id="{{ field.id_for_label }}_true"
|
||||
value="true" aria-label="{% trans 'Paid' %}" {% if field.value is True %}checked{% endif %}>
|
||||
</div>
|
||||
|
||||
{% if field.help_text %}
|
||||
<div class="tw:text-base-content/60 tw:text-sm tw:mt-1">{{ field.help_text|safe }}</div>
|
||||
<div class="text-base-content/60 text-sm mt-1">{{ field.help_text|safe }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user