summaryrefslogtreecommitdiffstats
path: root/ogcp/forms/action_forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/forms/action_forms.py')
-rw-r--r--ogcp/forms/action_forms.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py
index 5a2a4b1..b97ff4d 100644
--- a/ogcp/forms/action_forms.py
+++ b/ogcp/forms/action_forms.py
@@ -35,6 +35,7 @@ class PartitionForm(FlaskForm):
render_kw={'readonly': True},
default=1)
part_type = SelectField(label=_l('Type'),
+ validators=[InputRequired()],
choices=[('LINUX', 'Linux'),
('NTFS', 'NTFS'),
('CACHE', 'CACHE'),
@@ -52,6 +53,7 @@ class PartitionForm(FlaskForm):
('EMPTY', 'Empty')],
default='EMPTY')
fs = SelectField(label=_l('Filesystem'),
+ validators=[InputRequired()],
choices=[('EXT4', 'EXT4'),
('NTFS', 'NTFS'),
('CACHE', 'CACHE'),
@@ -59,23 +61,23 @@ class PartitionForm(FlaskForm):
('FAT32', 'FAT32'),
('EMPTY', 'Empty')],
default='EMPTY')
- size = IntegerField(label=_l('Size (KB)'))
+ size = IntegerField(label=_l('Size (KB)'), validators=[InputRequired()],)
class SelectClientForm(FlaskForm):
ips = HiddenField()
selected_client = SelectField(label=_l('Select one client as reference to '
'define the partition scheme'))
- ok = SubmitField(label=_l('Submit'))
+ submit = SubmitField(label=_l('Select'))
class SetupForm(FlaskForm):
ips = HiddenField()
- disk = HiddenField()
+ disk = SelectField(label='Disk', validate_choice=False)
disk_type = SelectField(label=_l('Type'),
choices=[('MSDOS', 'MBR'),
('GPT', 'GPT')])
partitions = FieldList(FormField(PartitionForm),
min_entries=1,
- max_entries=10)
+ max_entries=16)
class HardwareForm(FlaskForm):
ips = HiddenField()