mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-29 16:41:56 +00:00
个人信息中的学校改为选填
This commit is contained in:
parent
0f7c853783
commit
4737e970f5
@ -21,7 +21,7 @@ class EmailCheckSerializer(serializers.Serializer):
|
||||
class UserRegisterSerializer(serializers.Serializer):
|
||||
username = serializers.CharField(max_length=30)
|
||||
real_name = serializers.CharField(max_length=30)
|
||||
school = serializers.CharField(max_length=200)
|
||||
school = serializers.CharField(max_length=200, required=False, default=None)
|
||||
password = serializers.CharField(max_length=30, min_length=6)
|
||||
email = serializers.EmailField(max_length=254)
|
||||
captcha = serializers.CharField(max_length=4, min_length=4)
|
||||
|
@ -31,14 +31,6 @@ require(["jquery", "bsAlert", "csrfToken", "validator"], function ($, bsAlert, c
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#school").blur(function () {
|
||||
var school = $("#school").val().trim(school).toLowerCase();
|
||||
if (school == "青岛大学" || school == "qdu" || school == "青大") {
|
||||
$("#stu_id").show();
|
||||
$("#school").val("青岛大学");
|
||||
}
|
||||
});
|
||||
function refresh_captcha() {
|
||||
$("#captcha-img")[0].src = "/captcha/?" + Math.random();
|
||||
$("#captcha")[0].value = "";
|
||||
|
@ -20,10 +20,9 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="school">学校</label>
|
||||
<input type="text" class="form-control input-lg" id="school" name="school" placeholder="学校" data-error="请填写学校" required>
|
||||
<div class="help-block with-errors"></div>
|
||||
<input type="text" class="form-control input-lg" id="school" name="school" placeholder="非必填,如果你需要使用课程功能,请填写该字段">
|
||||
</div>
|
||||
<div class="form-group" id="stu_id">
|
||||
<div class="form-group">
|
||||
<label for="student_id">学号</label>
|
||||
<input type="number" class="form-control input-lg" id="student_id" name="student_id" placeholder="非必填,如果你需要使用课程功能,请填写该字段">
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user