actix-admin/actix_admin/templates/create.html

22 lines
900 B
HTML
Raw Normal View History

2022-05-01 23:30:20 +02:00
{% extends "base.html" %}
{% block content %}
<form method="post">
2022-07-25 17:33:06 +02:00
<div>
2022-05-01 23:30:20 +02:00
{% for model_field in view_model.fields -%}
2022-07-21 19:01:05 +02:00
{% if model_field.select_list != "" %}
<select name="{{ model_field.field_name }}">
<option value="" selected>Select</option>
{% for select_list_item in select_lists[model_field.field_name] -%}
<option value="{{ select_list_item[0] }}">{{ select_list_item[1] }}</option>
{%- endfor %}
</select>
{% else %}
<input type="{{ model_field.html_input_type }}" name="{{ model_field.field_name }}" placeholder="{{ model_field.field_name }}" aria-label="{{ model_field.field_name }}"><!-- required="" -->
{% endif %}
2022-05-01 23:30:20 +02:00
{%- endfor %}
<button type="submit">Save</button>
2022-07-25 17:33:06 +02:00
<a href="{{ list_link }}" role="button">Cancel</a>
2022-05-01 23:30:20 +02:00
</div>
</form>
{% endblock content %}