Flat file database editor and browser with web interface
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rocket-inv/templates/index.html.tera

48 lines
791 B

{% extends "layout" %}
{% import "form_macros" as form %}
{% block title -%}
Form
{%- endblock title %}
{% block content %}
<form action="/add" method="POST">
{% for field in fields %}
<div class="Row">
{% if field.kind == "string" %}
{{ form::text(field=field) }}
{% elif field.kind == "text" %}
{{ form::longtext(field=field) }}
{% elif field.kind == "number" %}
{{ form::number(field=field) }}
{% elif field.kind == "bool" %}
{{ form::checkbox(field=field) }}
{% elif field.kind == "select" %}
{{ form::select(field=field) }}
{% elif field.kind == "free_select" %}
{{ form::free_select(field=field) }}
{% else %}
{{ field.key }}
{% endif %}
</div>
{% endfor %}
<button type="submit">Add</button>
</form>
{% endblock content %}