Passed
Push — main ( b77d07...0a4857 )
by Jochen
07:55
created

MountpointCreateForm.set_site_id_choices()   A

Complexity

Conditions 2

Size

Total Lines 4
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 4
nop 2
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 2
rs 10
c 0
b 0
f 0
1
"""
2
byceps.blueprints.admin.snippet.forms
3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
5
:Copyright: 2006-2021 Jochen Kupperschmidt
6
:License: Revised BSD (see `LICENSE` file for details)
7
"""
8
9 1
from flask_babel import lazy_gettext
10 1
from wtforms import StringField, TextAreaField
11 1
from wtforms.validators import InputRequired
12
13 1
from ....util.l10n import LocalizedForm
14
15
16 1
class FragmentCreateForm(LocalizedForm):
17 1
    name = StringField(lazy_gettext('Name'), [InputRequired()])
18 1
    body = TextAreaField(lazy_gettext('Text'), [InputRequired()])
19
20
21 1
class FragmentUpdateForm(FragmentCreateForm):
22 1
    pass
23
24
25 1
class DocumentCreateForm(FragmentCreateForm):
26 1
    title = StringField(lazy_gettext('Title'), [InputRequired()])
27 1
    head = TextAreaField(lazy_gettext('Page header'))
28 1
    image_url_path = StringField(lazy_gettext('Image URL path'))
29
30
31 1
class DocumentUpdateForm(DocumentCreateForm):
32
    pass
33