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

45 lines
966 B

{% extends "layout" %}
{% import "form_macros" as form %}
{% block title -%}
Form
{%- endblock title %}
{% block content -%}
<form action="/add" method="POST" class="Form">
{%- for field in fields %}
<!-- {{ field.key }} -->
<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) }}
{%- elif field.kind == "tags" -%}
{{ form::tags(field=field) }}
{%- elif field.kind == "free_tags" -%}
{{ form::free_tags(field=field) }}
{%- else -%}
{{ field.key }}
{%- endif -%}
</div>
{%- endfor %}
<button type="submit">Add</button>
</form>
{%- endblock content %}