2022-05-31 23:13:44 +02:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block content %}
|
2022-07-26 22:34:33 +02:00
|
|
|
<article>
|
|
|
|
<form method="post">
|
|
|
|
<div>
|
|
|
|
{% for model_field in view_model.fields -%}
|
|
|
|
<label for="{{ model_field.field_name }}">
|
|
|
|
{{ model_field.field_name }}
|
|
|
|
{% if model_field.select_list != "" %}
|
|
|
|
<select name="{{ model_field.field_name }}">
|
|
|
|
{% if model_field.is_option %}
|
|
|
|
<option value=""></option>
|
|
|
|
{% endif %}
|
|
|
|
{% for select_list_item in select_lists[model_field.field_name] -%}
|
|
|
|
<option {% if select_list_item[0]==model.values | get(key=model_field.field_name) %} selected {%
|
|
|
|
endif %} value="{{ select_list_item[0] }}">{{ select_list_item[1] }}</option>
|
|
|
|
{%- endfor %}
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
{% else %}
|
|
|
|
<input type="{{ model_field.html_input_type }}" value="{{ model.values | get(key=model_field.field_name) }}"
|
|
|
|
name="{{ model_field.field_name }}" placeholder="{{ model_field.field_name }}"
|
|
|
|
aria-label="{{ model_field.field_name }}"><!-- required="" -->
|
2022-07-26 11:47:49 +02:00
|
|
|
{% endif %}
|
2022-07-26 22:34:33 +02:00
|
|
|
</label>
|
2022-07-21 19:01:05 +02:00
|
|
|
{%- endfor %}
|
2022-07-26 22:34:33 +02:00
|
|
|
<button type="submit">Save</button>
|
|
|
|
<a href="{{ list_link }}" role="button" class="secondary">Cancel</a>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</article>
|
2022-05-31 23:13:44 +02:00
|
|
|
{% endblock content %}
|