Files
project-managment/templates/partials/form_field.html
T
sankalp 0537ea5e5e feat(templates): enrichUI with Tailwind styling and messaging component improvements
- Add custom border, background, and spacing utilities to base template
- Enhance message notification styling and layout
- Update delete modal button appearance and behavior
- Refine comment card component with Tailwind classes and responsive behavior
- Adjust sidebar responsiveness for mobile view
2026-05-28 00:51:41 +05:45

24 lines
1.4 KiB
HTML

{% load form_helpers %}
<div class="space-y-1.5">
<label class="text-sm font-medium text-secondary">{{ field.label }}</label>
{% with wt=field|field_type %}
{% if wt == "CheckboxInput" or wt == "CheckboxSelectMultiple" %}
<label class="flex items-center gap-3 cursor-pointer">
{{ field }}
<span class="text-sm text-secondary">{{ field.label }}</span>
</label>
{% elif wt == "Select" or wt == "NullBooleanSelect" or wt == "SelectMultiple" %}
{{ field|add_class:"w-full px-3 py-2 rounded-lg border border-soft bg-white text-sm text-primary focus:outline-none focus:ring-2 focus:ring-blue-500/30 focus:border-blue-500 transition-colors" }}
{% elif wt == "Textarea" %}
{{ field|add_class:"w-full px-3 py-2 rounded-lg border border-soft bg-white text-sm text-primary focus:outline-none focus:ring-2 focus:ring-blue-500/30 focus:border-blue-500 transition-colors resize-y" }}
{% else %}
{{ field|add_class:"w-full px-3 py-2 rounded-lg border border-soft bg-white text-sm text-primary focus:outline-none focus:ring-2 focus:ring-blue-500/30 focus:border-blue-500 transition-colors" }}
{% endif %}
{% endwith %}
{% if field.errors %}
<p class="text-xs text-red-600">{{ field.errors.0 }}</p>
{% endif %}
{% if field.help_text %}
<p class="text-xs text-tertiary">{{ field.help_text }}</p>
{% endif %}
</div>