{% extends "crud/form.html" %}
{% from "macros/form.html" import text_input %}
{% set title = 'Edit Unit' if is_update else 'Create Unit' %}
{% block form_fields %}
{% if is_update %}
{{ text_input('slug', 'Name', value=unit.slug, readonly=true) }}
{% else %}
{{ text_input('slug', 'Name', required=true, maxlength=64, help='A unique ID used to identify this Business Unit') }}
{% endif %}
{{ text_input('title', 'Title', value=(unit.title if unit else ''), required=true, maxlength=200) }}
{% endblock %}