1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-11-08 21:21:06 +00:00

Replace render_kw

This commit is contained in:
Mo 2022-09-24 16:17:03 +02:00
parent ffcbda905d
commit b895d1f8f1
3 changed files with 6 additions and 9 deletions

View file

@ -6,7 +6,7 @@ from .model_dependent_funs import selection_mark_field
class AssistantGroupExperimentFormBase(FlaskForm): class AssistantGroupExperimentFormBase(FlaskForm):
submit = SubmitField(label="Save", render_kw={"class": "btn btn-primary btn-block"}) submit = SubmitField(label="Save")
def assistant_group_experiment_form_factory(current_user, group_experiment): def assistant_group_experiment_form_factory(current_user, group_experiment):
@ -15,7 +15,6 @@ def assistant_group_experiment_form_factory(current_user, group_experiment):
"Note", "Note",
default=group_experiment.note, default=group_experiment.note,
validators=[Optional()], validators=[Optional()],
render_kw={"class": "form-control"},
) )
appointments = group_experiment.appointments appointments = group_experiment.appointments
@ -35,7 +34,6 @@ def assistant_group_experiment_form_factory(current_user, group_experiment):
default=appointment.date, default=appointment.date,
validators=[DataRequired()], validators=[DataRequired()],
description=description, description=description,
render_kw={"class": "form-control"},
), ),
) )
appointment_num += 1 appointment_num += 1

View file

@ -54,7 +54,6 @@ def selection_mark_field(mark_type: str, default):
default=default, default=default,
choices=choices, choices=choices,
validators=[DataRequired()], validators=[DataRequired()],
render_kw={"class": "form-control", "style": "width:auto;"},
) )

View file

@ -83,7 +83,7 @@
{% for appointment_field in appointment_fields %} {% for appointment_field in appointment_fields %}
<tr> <tr>
<td> <td>
{{ appointment_field }} {{ appointment_field(class="form-control") }}
</td> </td>
<td> <td>
{{ appointment_field.description }} {{ appointment_field.description }}
@ -128,10 +128,10 @@
{{ student }} {{ student }}
</th> </th>
<td> <td>
{{ oral_experiment_mark }} {{ oral_experiment_mark(class="form-control", style="width: auto;") }}
</td> </td>
<td> <td>
{{ protocol_experiment_mark }} {{ protocol_experiment_mark(class="form-control", style="width: auto;") }}
</td> </td>
<td> <td>
{% if final_experiment_mark is none %} {% if final_experiment_mark is none %}
@ -159,13 +159,13 @@
<div class="form-group form-row"> <div class="form-group form-row">
<label for={{ form.note.id }} class="col-form-label">{{ form.note.label }}³</label> <label for={{ form.note.id }} class="col-form-label">{{ form.note.label }}³</label>
<div class="col"> <div class="col">
{{ form.note }} {{ form.note(class="form-control") }}
</div> </div>
</div> </div>
<br> <br>
{{ form.submit }} {{ form.submit(class="btn btn-primary btn-block") }}
</form> </form>
<hr> <hr>