You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
4.2 KiB

6 months ago
{% extends 'Mindex.html' %}
{% block title %}
修改管理员信息页面
{% endblock %}
{% block content %}
<div class="pagetitle" style="display:flex;align-items:center">
<div style="margin-right:auto">
<h1>个人信息</h1>
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'index' %}">个人中心</a></li>
<li class="breadcrumb-item active">修改个人信息页面</li>
</ol>
</nav>
</div>
<h5>
{{ nowTime.year}}-{{ nowTime.mon}}-{{ nowTime.day}}
</h5>
</div>
<section class="section dashboard">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<h5 class="card-title">修改信息</h5>
<div class="activity">
<form action="{% url 'MGchangeSelfInfo' %}" method="POST" enctype="multipart/form-data">
<div class="row mb-3">
<label for="inputText" class="col-sm-2 col-form-label">用户名:</label>
<div class="col-sm-10">
<!-- disabled默认值不能改变 -->
<input type="text" name="username" disabled value="{{ userInfo.username }}" class="form-control" style="width:200px">
</div>
</div>
<div class="row mb-3">
<label for="inputText" class="col-sm-2 col-form-label" >性别:</label>
<div class="col-sm-10">
<select class="form-select" name="sex" aria-label="Default select example" style="width:200px" placeholder="请输入">
<option {% if userInfo.sex == '' %}
selected
{% endif %} value="男">男</option>
<option {% if userInfo.sex == '' %}
selected
{% endif %}value="女">女</option>
<option {% if userInfo.sex == '' %}
selected
{% endif %}value="保密">保密</option>
</select>
</div>
</div>
<div class="row mb-3">
<label for="inputText" class="col-sm-2 col-form-label">地址:</label>
<div class="col-sm-10">
<input type="text" name="address" value="{{ userInfo.address }}" class="form-control" style="width:200px" placeholder="请输入">
</div>
</div>
<div class="row mb-3">
<label for="inputText" class="col-sm-2 col-form-label">个人简介:</label>
<div class="col-sm-10">
<textarea name="textarea" class="form-control" placeholder="{{ userInfo.textarea }}" value="{{ userInfo.textarea }}" style="height: 100px;width:500px;" placeholder="请输入"></textarea>
</div>
</div>
<div class="row mb-3">
<label for="inputText" class="col-sm-2 col-form-label">编辑头像:</label>
<div class="col-sm-10">
<img style="width:100px;border:1px solid #ddd;padding:5px;" src="/media/{{ userInfo.avatar }}"><br>
<input type="file" name="avatar">
</div>
</div>
<div class="row mb-3">
<label for="inputText" class="col-sm-2 col-form-label"></label>
<div class="col-sm-10">
<button type="submit" class="btn btn-primary">确认</button>
</div>
</div>
</form>
</div>
</div>
</div><!-- End 评分排名前十 -->
</div>
</div>
</section>
{% endblock %}
{% block echarts %}
<script>
</script>
{% endblock %}