diff --git a/advlabdb/forms.py b/advlabdb/forms.py index 4a332ab..cd4b2fe 100644 --- a/advlabdb/forms.py +++ b/advlabdb/forms.py @@ -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