| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- {% extends "base.html" %}
- {% block title %}{{ '添加站点' if action == 'add' else '编辑站点' }} - 逐鹿导航{% endblock %}
- {% block content %}
- <div class="row justify-content-center">
- <div class="col-md-8">
- <div class="card">
- <div class="card-header">
- <h4>{{ '添加站点' if action == 'add' else '编辑站点' }}</h4>
- </div>
- <div class="card-body">
- <form method="POST" enctype="multipart/form-data">
- {{ form.hidden_tag() }}
- <div class="mb-3">
- {{ form.name.label(class="form-label") }}
- {{ form.name(class="form-control") }}
- {% if form.name.errors %}
- {% for error in form.name.errors %}
- <div class="text-danger small">{{ error }}</div>
- {% endfor %}
- {% endif %}
- </div>
- <div class="mb-3">
- {{ form.url.label(class="form-label") }}
- {{ form.url(class="form-control") }}
- {% if form.url.errors %}
- {% for error in form.url.errors %}
- <div class="text-danger small">{{ error }}</div>
- {% endfor %}
- {% endif %}
- </div>
- <div class="mb-3">
- {{ form.description.label(class="form-label") }}
- {{ form.description(class="form-control", rows="3") }}
- {% if form.description.errors %}
- {% for error in form.description.errors %}
- <div class="text-danger small">{{ error }}</div>
- {% endfor %}
- {% endif %}
- </div>
- <div class="mb-3">
- {{ form.category_id.label(class="form-label") }}
- {{ form.category_id(class="form-select") }}
- {% if form.category_id.errors %}
- {% for error in form.category_id.errors %}
- <div class="text-danger small">{{ error }}</div>
- {% endfor %}
- {% endif %}
- </div>
- <div class="mb-3">
- {{ form.custom_icon.label(class="form-label") }}
- {{ form.custom_icon(class="form-control") }}
- {% if form.custom_icon.errors %}
- {% for error in form.custom_icon.errors %}
- <div class="text-danger small">{{ error }}</div>
- {% endfor %}
- {% endif %}
- <div class="form-text">支持 JPG, JPEG, PNG, GIF, WebP 格式。仅上传站点图标图片文件。</div>
- </div>
-
- <div class="mb-3 form-check">
- {{ form.is_public(class="form-check-input") }}
- {{ form.is_public.label(class="form-check-label") }}
- </div>
-
- <div class="d-flex justify-content-between">
- <a href="{{ url_for('dashboard') }}" class="btn btn-secondary">返回</a>
- {{ form.submit(class="btn btn-primary") }}
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- {% endblock %}
|