{% extends "base.html" %} {% block title %}{{ category.name }} - 生成向导{% endblock %} {% block page_title %}{{ ui_config.page_title or (category.name + ' 题目生成向导') }}{% endblock %} {% block styles %} {% endblock %} {% block content %}

{{ ui_config.page_title or (category.name + ' 题目生成向导') }}

{{ ui_config.page_description or '按顺序完成配置,快速生成高质量 CTF 题目' }}

{% set visible_index = namespace(value=0) %} {% for field in form_fields %} {% if not field.hidden %} {% set visible_index.value = visible_index.value + 1 %}
{{ visible_index.value }} {{ field.label }}
{% endif %} {% endfor %}
加载中...
{% set panel_index = namespace(value=0) %} {% for field in form_fields %} {% if not field.hidden %} {% set panel_index.value = panel_index.value + 1 %}
{{ loop.index }}. {{ field.label }} {% if field.type in ['multi_select', 'multi_select_categorized'] %} {% endif %}
{% if loop.first %} {% if field.type == 'select' and field.options %} {% for opt in field.options %}
{% if opt.icon %} {% else %} {% endif %}
{{ opt.label or opt.value }}
{% if opt.description %}
{{ opt.description }}
{% endif %}
{% endfor %} {% elif field.type == 'text' %}
{% if field.description %} {{ field.description }} {% endif %}
{% elif field.type == 'textarea' %}
{% if field.description %} {{ field.description }} {% endif %}
{% elif field.type == 'number' %}
{% if field.description %} {{ field.description }} {% endif %}
{% elif field.type in ['multi_select', 'multi_select_categorized'] %} {# 多选类型由 JS 动态加载 #}
{% else %}
{% endif %} {% else %}
请先完成上一步
{% endif %}
{% endif %} {% endfor %}
请按顺序完成所有配置
{% endblock %} {% block scripts %} {# 使用单独的 script 标签存储 JSON,避免在 JavaScript 代码中直接嵌入 #} {# 不需要 HTML 转义,因为 JSON 本身是安全的文本内容 #} {# 但要确保 JSON 中不包含 标签(如果包含,需要转义) #} {% endblock %}