{% extends "admin/base.html" %} {% block title %}{% if entity %}Edit{% else %}New{% endif %} {{ content_type.label }} - Focomy{% endblock %} {% block header_title %}{% if entity %}Edit{% else %}New{% endif %} {{ content_type.label }}{% endblock %} {% block content %}
{% if error %}
{{ error }}
{% endif %} {% if message %}
{{ message }}
{% endif %}
{% for field in content_type.fields %}
{% if field.type == 'text' or field.type == 'string' %} {% elif field.type == 'email' %} {% elif field.type == 'password' %} {% if entity %}

Leave empty to keep current password

{% endif %} {% elif field.type == 'slug' %}

URL-friendly identifier (lowercase letters, numbers, hyphens)

{% elif field.type == 'textarea' or field.type == 'richtext' %} {% elif field.type == 'blocks' %} {% set blocks_value = entity.get(field.name, '') if entity else '' %}
{% elif field.type == 'number' or field.type == 'integer' %} {% elif field.type == 'float' %} {% elif field.type == 'boolean' %} {% elif field.type == 'select' %} {% elif field.type == 'datetime' %} {% elif field.type == 'date' %} {% elif field.type == 'image' or field.type == 'file' or field.type == 'media' %} {% if entity and entity.get(field.name) %}
{% endif %} {% elif field.type == 'json' %}

JSON format

{% else %} {% endif %} {% if field.hint %}

{{ field.hint }}

{% endif %}
{% endfor %} {% if relations %}

Relations

{% for rel in relations %}
{% endfor %} {% endif %}
Cancel {% if entity %} {% endif %}
{% if entity %}
{% endif %}
{% if entity %} {% endif %} {% set has_blocks = namespace(value=false) %} {% for field in content_type.fields %} {% if field.type == 'blocks' %} {% set has_blocks.value = true %} {% endif %} {% endfor %} {% if has_blocks.value %} {% include "admin/components/editor.html" %} {% endif %} {% endblock %}