40 lines
1.8 KiB
HTML
40 lines
1.8 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}编辑子分类{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4>编辑子分类</h4>
|
|
</div>
|
|
<div class="card-body">
|
|
<form method="post">
|
|
<div class="mb-3">
|
|
<label for="sub_id" class="form-label">子分类ID</label>
|
|
<input type="text" class="form-control" id="sub_id" name="sub_id" value="{{ sub_id }}" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="sub_name" class="form-label">子分类名称</label>
|
|
<input type="text" class="form-control" id="sub_name" name="sub_name" value="{{ sub_name }}" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="color" class="form-label">颜色</label>
|
|
<input type="color" name="color" id="color" class="form-control form-control-color"
|
|
value="{{ color }}" title="选择颜色">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="weight" class="form-label">权重</label>
|
|
<input type="number" class="form-control" id="weight" name="weight" value="{{ weight }}">
|
|
<small class="text-muted">权重越大,排序越靠前</small>
|
|
</div>
|
|
<div class="mb-3 form-check">
|
|
<input type="checkbox" class="form-check-input" id="private" name="private"
|
|
{% if is_private %}checked{% endif %}>
|
|
<label class="form-check-label" for="private">私有分类</label>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">保存</button>
|
|
<a href="{{ url_for('manage_categories') }}" class="btn btn-secondary">取消</a>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |