Commit 9c668487 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Merge branch 'master' of git.fsmpi.rwth-aachen.de:protokollsystem/proto3

parents 182db760 9e22d0fb
......@@ -279,7 +279,7 @@ def edit_reminder(meetingreminder):
form.populate_obj(meetingreminder)
db.session.commit()
return redirect(request.args.get("next") or url_for("show_type", protocoltype_id=protocoltype.id))
return render_template("reminder-edit.html", form=form, protocoltype=protocoltype, meetingreminder=meetingreminder)
return render_template("reminder-edit.html", form=form, meetingreminder=meetingreminder)
@app.route("/type/reminder/delete/<int:meetingreminder_id>")
@login_required
......
......@@ -4,6 +4,6 @@
{% block content %}
<div class="container">
{{render_form(form, action_url=url_for("edit_defaultmeta", defaultmeta_id=meta.id, next=url_for("show_type", protocoltype_id=meta.protocoltype.id)), action_text="Ändern")}}
{{render_form(form, action_url=url_for("edit_defaultmeta", defaultmeta_id=defaultmeta.id, next=url_for("show_type", protocoltype_id=defaultmeta.protocoltype.id)), action_text="Ändern")}}
</div>
{% endblock %}
......@@ -4,6 +4,6 @@
{% block content %}
<div class="container">
{{render_form(form, action_url=url_for("edit_reminder", meetingreminder_id=meetingreminder.id, next=url_for("show_type", protocoltype_id=protocoltype.id)), action_text="Ändern")}}
{{render_form(form, action_url=url_for("edit_reminder", meetingreminder_id=meetingreminder.id, next=url_for("show_type", protocoltype_id=meetingreminder.protocoltype.id)), action_text="Ändern")}}
</div>
{% endblock %}
......@@ -134,7 +134,7 @@ class MeetingReminderForm(FlaskForm):
class NewProtocolForm(FlaskForm):
protocoltype_id = SelectField("Typ", choices=[], coerce=int)
date = DateField("Datum", validators=[InputRequired("Du musst ein Datum angeben.")], format="%d.%m.%Y")
date = DateField("Datum (dd.mm.yyyy)", validators=[InputRequired("Du musst ein Datum angeben.")], format="%d.%m.%Y")
def __init__(self, protocoltypes, **kwargs):
super().__init__(**kwargs)
......@@ -165,7 +165,7 @@ class NewProtocolFileUploadForm(FlaskForm):
self.protocoltype_id.choices = get_protocoltype_choices(protocoltypes, add_all=False)
class ProtocolForm(FlaskForm):
date = DateField("Datum", validators=[InputRequired("Bitte gib das Datum des Protkolls an.")], format="%d.%m.%Y")
date = DateField("Datum (dd.mm.yyyy)", validators=[InputRequired("Bitte gib das Datum des Protkolls an.")], format="%d.%m.%Y")
start_time = DateTimeField("Beginn", format="%H:%M", validators=[Optional()])
end_time = DateTimeField("Ende", format="%H:%M", validators=[Optional()])
location = StringField("Ort")
......@@ -192,7 +192,7 @@ class NewTodoForm(FlaskForm):
who = StringField("Person", validators=[InputRequired("Bitte gib an, wer das Todo erledigen soll.")])
description = StringField("Aufgabe", validators=[InputRequired("Bitte gib an, was erledigt werden soll.")])
state = SelectField("Status", choices=[], coerce=coerce_todostate, validators=[CheckTodoDateByState()])
date = DateField("Datum", format="%d.%m.%Y", validators=[Optional()])
date = DateField("Datum (dd.mm.yyyy)", format="%d.%m.%Y", validators=[Optional()])
def __init__(self, protocoltypes, **kwargs):
super().__init__(**kwargs)
......@@ -203,7 +203,7 @@ class TodoForm(FlaskForm):
who = StringField("Person")
description = StringField("Aufgabe", validators=[InputRequired("Bitte gib an, was erledigt werden soll.")])
state = SelectField("Status", choices=[], coerce=coerce_todostate, validators=[CheckTodoDateByState()])
date = DateField("Datum", format="%d.%m.%Y", validators=[Optional()])
date = DateField("Datum (dd.mm.yyyy)", format="%d.%m.%Y", validators=[Optional()])
def __init__(self, **kwargs):
super().__init__(**kwargs)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment