针对添加学号字段对页面的一些修改,注册是学校为青岛大学则显示学号字段,在user settings页面显示学号,并提供修改

This commit is contained in:
sxw
2015-12-08 14:33:40 +08:00
parent 7d358c9e4c
commit 2d6be12a2f
6 changed files with 34 additions and 7 deletions

View File

@@ -69,9 +69,16 @@
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-12"><label>学号</label>
<input name="student_id" type="number" class="form-control" id="student_id"
value="{{ request.user.userprofile.student_id }}">
<div class="help-block with-errors"></div>
</div>
<div class="form-group col-md-12"><label>blog</label>
<input name="blog" type="url" class="form-control" id="blog"
value="{{ request.user.userprofile.blog }}">
value="{% if request.user.userprofile.school %}{{ request.user.userprofile.blog }}{% endif %}">
<div class="help-block with-errors"></div>