Complete and total rework ahead.
This commit is contained in:
parent
559fd56f33
commit
e420110fb3
95 changed files with 394 additions and 6351 deletions
16
crudkit/ui/templates/field.html
Normal file
16
crudkit/ui/templates/field.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<label for="{{ field_name }}">{{ field_label }}</label>
|
||||
|
||||
{% if field_type == 'select' %}
|
||||
<select name="{{ field_name }}" {%- if not options %}disabled{% endif %}>
|
||||
{% if options %}
|
||||
<option value="">-- Select --</option>
|
||||
{% for opt in options %}
|
||||
<option value="{{ opt.value }}" {% if opt.value|string == value|string %}selected{% endif %}>{{ opt.label }}</option>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<option value="">-- No selection available --</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
{% else %}
|
||||
<input type="text" name="{{ field_name }}" value="{{ value }}">
|
||||
{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue