Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
protokollsystem
proto3
Commits
9e22d0fb
Commit
9e22d0fb
authored
Mar 09, 2017
by
Administrator
Browse files
Show required date format in label
/close
#48
parent
2d49fcd3
Changes
1
Show whitespace changes
Inline
Side-by-side
views/forms.py
View file @
9e22d0fb
...
...
@@ -134,7 +134,7 @@ class MeetingReminderForm(FlaskForm):
class
NewProtocolForm
(
FlaskForm
):
protocoltype
=
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
.
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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment