{% extends "base.html" %} {% from "_ui.html" import page_head, rich_editor %} {% block title %}{{ 'Edit KT' if kt else (block_meta[block_type].label if block_type else 'Add KT') }}{% endblock %} {% block content %} {% if not block_type %} {# ---------- step 1: pick a block type (the KT Criteria is already fixed) ---------- #} {{ page_head('list', 'Add KT', 'Choose what kind of KT to add inside ' ~ (selected_criteria.title if selected_criteria else 'this KT Criteria') ~ '.') }} {% if selected_criteria %}
{{ icon('cap') }} {{ selected_criteria.college_name }} › {{ icon('list') }} {{ selected_criteria.title }}
{% for value, label, icon_name, hint in block_types %} {{ icon(icon_name) }} {{ label }} {{ hint }} {% endfor %}
{% else %}

Choose a KT Criteria first, then add KT inside it. Go to Find College KT.

{% endif %} {% else %} {# ---------- step 2: the form for the chosen block type ---------- #} {% set meta = block_meta[block_type] %} {{ page_head(meta.icon, 'Edit KT' if kt else meta.label, meta.hint if not kt else 'Update this KT.') }}

{{ icon(meta.icon) }} KT details

{{ icon('cap') }} {{ selected_criteria.college_name }} › {{ icon('list') }} {{ selected_criteria.title }}
{{ icon(meta.icon) }} {{ meta.label if not kt else 'KT' }}
{{ icon('type') }}
{% if block_type == 'description' %}
{{ rich_editor('kt', values.text, required=True, placeholder='Description') }}
{% elif block_type == 'form' %}
{{ rich_editor('description', values.description, placeholder='Optional description or instructions') }}
{% elif block_type == 'link' %}
{{ icon('link') }}

Shown as an "Open link" button that opens in a new tab.

{% elif block_type == 'embed' %}

YouTube and Vimeo links embed automatically. You can also paste a full <iframe> embed code (e.g. from YouTube's Share → Embed) - the address is pulled out automatically. Other pages embed as typed if they allow it.

{% elif block_type == 'alert' %}
{% elif block_type == 'attachment' %}
{% if kt and kt.file_name %}

Current file: {{ kt.file_name }}{% if kt.file_size %} ({{ (kt.file_size / 1024)|round(1) }} KB){% endif %}. Choose a new file to replace it, or leave this blank to keep it.

{% endif %}

Allowed: PDF, Word, Excel, PowerPoint, OpenDocument, RTF, text, CSV, image or ZIP. Up to 15 MB.

{% elif block_type == 'faculty' %}
{% if not faculty_list %}

There is no faculty yet. Add a faculty first, then come back.

{% else %}

Choose from the Faculty List. Need someone new? Add a faculty, then reload this page.

{% endif %}
{% if kt and kt.file_name %}

Current file: {{ kt.file_name }}{% if kt.file_size %} ({{ (kt.file_size / 1024)|round(1) }} KB){% endif %}. Choose a new file to replace it, or leave this blank to keep it.

{% endif %}

Optional. Any document format: PDF, Word, Excel, PowerPoint, OpenDocument, RTF, text, CSV and more (images and ZIP too). Up to 15 MB.

{{ icon('link') }}

Optional. Shown as an "Open link" button that opens in a new tab.

{% elif block_type == 'reminder' %}

Choose the faculty this reminder is for from the Faculty List. A faculty can be used only once in a KT Criteria.{% if not faculty_list %} There is no faculty yet - add a faculty first, then come back.{% endif %}

{{ icon('calendar') }}
{{ icon('calendar') }}
{% endif %}
{{ icon('x') }} Cancel
{% if block_type == 'form' %} {% endif %} {% if block_type == 'reminder' %} {% endif %} {% endif %} {% endblock %}