codepedia2/templates/users/user_info.html

62 lines
3.5 KiB
HTML
Executable File

{% extends 'users/user_center_base.html' %}
{% block right_content %}
<div class="right">
<div class="personal_des ">
<div class="head">
<h1>个人信息</h1>
</div>
<div class="inforcon">
<div class="left">
<iframe id='frameFile' name='frameFile' style='display: none;'></iframe>
<form class="clearfix" id="jsAvatarForm" enctype="multipart/form-data" autocomplete="off" method="post" action="/users/upload-avator" target='frameFile' style="border: 1px solid #dcdcdc;">
<label class="changearea" for="avatarUp">
<span id="avatardiv" class="pic">
<img width="100" height="100" class="js-img-show" id="avatarShow" src="{{ MEDIA_URL }}{{ request.user.avatar }}"/>
</span>
<span class="fl upload-inp-box" style="margin-left:70px;">
<span class="button btn-green btn-w100" id="jsAvatarBtn">修改头像</span>
<input type="file" name="image" id="avatarUp" class="js-img-up"/>
</span>
</label>
{% csrf_token %}
</form>
<div style="margin-top:30px;">
<a class="button btn-green btn-w100" id="jsUserResetPwd" style="margin:80px auto;width:100px;">修改密码</a>
</div>
</div>
<form class="perinform" id="jsEditUserForm" autocomplete="off">
<ul class="right">
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称:
<input type="text" name="username" id="nick_name" value="{{ user.username }}" maxlength="10">
<i class="error-tips"></i>
</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日:
<input type="text" id="birth_day" name="birthday" value="{{ user.birthday }}" readonly="readonly"/>
<i class="error-tips"></i>
</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别:
<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="gender" value="male" {% if user.gender == 'male' %}checked="checked"{% endif %} ></label>
<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="gender" {% if user.gender == 'female' %}checked="checked"{% endif %} ></label>
</li>
<li class="p_infor_city">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址:
<input type="text" name="address" id="address" placeholder="请输入你的地址" value="{{ user.address }}" maxlength="50">
<i class="error-tips"></i>
</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;号:
<input type="text" name="mobile" id="mobile" placeholder="请输入你的手机号" value="{{ user.mobile }}" maxlength="11">
</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱:
<input class="borderno" type="text" name="email" readonly="readonly" value="{{ user.email }}"/>
<span class="green changeemai_btn">[修改]</span>
</li>
<li class="button heibtn">
<input type="button" id="jsEditUserBtn" value="保存">
</li>
</ul>
{% csrf_token %}
</form>
</div>
</div>
</div>
{% endblock %}