summaryrefslogtreecommitdiffstats
path: root/ogcp/forms/action_forms.py
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-05-10 17:03:11 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-05-12 14:59:53 +0200
commit6034ba2537368f7da0569e7614bd2c7f110457b1 (patch)
tree6c9f353596a6c78adcc0f37d897c3011f950841b /ogcp/forms/action_forms.py
parenta04ef4e421ec29a3fb2f8181b5c7af381767001c (diff)
Make partition id non editable in partition form
Show the partition id as a non editable label in each partition of the Partition and Format form. Assign sequential partition id from top to down and recalculate every partition id when a partition is removed.
Diffstat (limited to 'ogcp/forms/action_forms.py')
-rw-r--r--ogcp/forms/action_forms.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py
index 1b77795..f2a3602 100644
--- a/ogcp/forms/action_forms.py
+++ b/ogcp/forms/action_forms.py
@@ -30,8 +30,8 @@ class WOLForm(FlaskForm):
submit = SubmitField(label=_l('Submit'))
class PartitionForm(FlaskForm):
- partition = SelectField(label=_l('Partition'),
- choices=range(1,10))
+ partition = IntegerField(label=_l('Partition'),
+ render_kw={'readonly': True})
part_type = SelectField(label=_l('Type'),
choices=[('LINUX', 'Linux'),
('NTFS', 'NTFS'),