squid_ui/templates/settings.html
2025-06-24 14:30:33 +08:00

42 lines
1.5 KiB
HTML

<!-- templates/settings.html -->
{% extends "base.html" %}
{% block title %}系统设置 - Squid代理用户管理系统{% endblock %}
{% block content %}
<h1>系统设置</h1>
<!-- 添加消息显示区域 -->
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="alert alert-{{ messages[0][0] }}">
{{ messages[0][1] }}
</div>
{% endif %}
{% endwith %}
<form method="post" action="{{ url_for('update_settings') }}" class="settings-form">
<div class="form-group">
<label for="admin_password">管理员密码</label>
<input type="password" id="admin_password" name="admin_password"
placeholder="留空则不修改" value="{{ config.admin_password }}">
</div>
<div class="form-group">
<label for="proxy_address">代理服务器地址</label>
<input type="text" id="proxy_address" name="proxy_address"
value="{{ config.proxy_address }}" required>
</div>
<div class="form-group">
<label for="proxy_port">代理服务器端口</label>
<input type="text" id="proxy_port" name="proxy_port"
value="{{ config.proxy_port }}" required>
</div>
<div class="form-actions">
<button type="submit" class="btn-success">保存设置</button>
<a href="{{ url_for('index') }}" class="btn-danger">取消</a>
</div>
</form>
{% endblock %}