refactor: using word depot in rear instead of admin
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<!--noformat-->
|
||||
<form class="ui form"
|
||||
hx-target="main"
|
||||
{% if form.method|upper == 'POST' or not form.method %}
|
||||
hx-post="{{form.action}}"
|
||||
{% elif form.method|upper == 'GET' %}
|
||||
hx-get="{{form.action}}"
|
||||
{% elif form.method|upper == 'PATCH' %}
|
||||
hx-patch="{{form.action}}"
|
||||
{% elif form.method|upper == 'PUT' %}
|
||||
hx-put="{{form.action}}"
|
||||
{% else %}
|
||||
unknown-form-method={{form.method}}
|
||||
{% endif %}>
|
||||
|
||||
{% from "/admin/items/items.jinja" import field_widget %}
|
||||
{% for field_name, field_defs in fields %}
|
||||
{% if item %}
|
||||
{% set field_value = item.fields[field_name]|none("") %}
|
||||
{% else %}
|
||||
{% set field_value = "" %}
|
||||
{% endif %}
|
||||
<div class="field">
|
||||
{{ field_widget(field_name, field_defs, field_value) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
<button class="ui button" type="submit">Create</button>
|
||||
</form>
|
||||
<!--noformat-->
|
||||
Reference in New Issue
Block a user