mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
Use selection mark field
This commit is contained in:
parent
80e7ff731f
commit
eb09b793c6
1 changed files with 5 additions and 3 deletions
|
@ -2,7 +2,7 @@ from flask_wtf import FlaskForm
|
|||
from wtforms.fields import DateField, SubmitField, TextAreaField
|
||||
from wtforms.validators import DataRequired, Optional
|
||||
|
||||
from .model_dependent_funs import mark_field
|
||||
from .model_dependent_funs import selection_mark_field
|
||||
|
||||
|
||||
class AssistantGroupExperimentFormBase(FlaskForm):
|
||||
|
@ -16,6 +16,7 @@ def assistant_group_experiment_form_factory(current_user, group_experiment):
|
|||
default=group_experiment.note,
|
||||
validators=[Optional()],
|
||||
description="The note is optional and can be seen and edited by admins and assistants that are responsible for this semester experiment. This note is for information related to the experiment and group. Examples: Protocol received, submission until ..., etc.",
|
||||
render_kw={"class": "form-control"},
|
||||
)
|
||||
|
||||
appointments = group_experiment.appointments
|
||||
|
@ -35,6 +36,7 @@ def assistant_group_experiment_form_factory(current_user, group_experiment):
|
|||
default=appointment.date,
|
||||
validators=[DataRequired()],
|
||||
description=description,
|
||||
render_kw={"class": "form-control"},
|
||||
),
|
||||
)
|
||||
appointment_num += 1
|
||||
|
@ -45,12 +47,12 @@ def assistant_group_experiment_form_factory(current_user, group_experiment):
|
|||
setattr(
|
||||
AssistantGroupExperimentForm,
|
||||
"oral_experiment_mark_" + str(experiment_mark_num),
|
||||
mark_field("Oral", experiment_mark.oral_mark),
|
||||
selection_mark_field("Oral", experiment_mark.oral_mark),
|
||||
)
|
||||
setattr(
|
||||
AssistantGroupExperimentForm,
|
||||
"protocol_experiment_mark_" + str(experiment_mark_num),
|
||||
mark_field("Protocol", experiment_mark.protocol_mark),
|
||||
selection_mark_field("Protocol", experiment_mark.protocol_mark),
|
||||
)
|
||||
experiment_mark_num += 1
|
||||
|
||||
|
|
Loading…
Reference in a new issue