Cloud Computing Course
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.

42 lines
2.2 KiB

3 years ago
  1. from flask_wtf import FlaskForm
  2. from wtforms import StringField, PasswordField, SubmitField, SelectField
  3. from wtforms.validators import DataRequired
  4. class Book(FlaskForm):
  5. username = StringField(label='student_id',
  6. validators=[DataRequired()],
  7. render_kw={
  8. 'placeholder': 'Student ID',
  9. 'class': 'input_text'
  10. })
  11. password = PasswordField(label='password',
  12. validators=[DataRequired()],
  13. render_kw={
  14. 'placeholder': 'Password',
  15. 'class': 'input_text'
  16. })
  17. email = StringField(label='email',
  18. validators=[DataRequired()],
  19. render_kw={
  20. 'placeholder': 'Email',
  21. 'class': 'email'
  22. })
  23. area = SelectField(label='area',
  24. validators=[DataRequired()],
  25. render_kw={
  26. 'class': 'form-control'
  27. },
  28. choices=[('F1_A','一楼A区'),
  29. ('F1_B','一楼B区'),
  30. ('F1_digital_reading_area','一楼数字阅览区'),
  31. ('F1_study_area','一楼自习区'),
  32. ('F3_foreign_books','三楼外文图书借阅区'),
  33. ('F3_newspaper','三楼报刊区'),
  34. ('F4_liberal_art_books_A','四楼中文文科图书借阅区A'),
  35. ('F4_liberal_art_books_B','四楼中文文科图书借阅区B'),
  36. ('F4_liberal_art_books_C','四楼中文文科图书借阅区C'),
  37. ('F5_liberal_art_books','五楼中文文科图书借阅区'),
  38. ('F6_science_books','六楼中文理科图书借阅区')
  39. ],
  40. default='F1_A'
  41. )
  42. submit = SubmitField('confirm')