diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py index 159c55a..0404e71 100644 --- a/ogcp/forms/action_forms.py +++ b/ogcp/forms/action_forms.py @@ -38,6 +38,22 @@ class PartitionForm(FlaskForm): modify = SubmitField(label=_('Modify')) delete = SubmitField(label=_('Delete')) + +class NewPartitionForm(FlaskForm): + ips = HiddenField() + part_type = SelectField(label=_('Type'), + choices=[('LINUX', 'Linux'), + ('NTFS', 'NTFS'), + ('EMPTY', 'Empty')]) + fs = SelectField(label=_('Filesystem'), + choices=[('EXT4', 'EXT4'), + ('NTFS', 'NTFS'), + ('DISK', 'Disk'), + ('EMPTY', 'Empty')]) + size = IntegerField(label=_('Size (KB)')) + create = SubmitField(label=_('Create')) + + class HardwareForm(FlaskForm): ips = HiddenField() refresh = SubmitField(label=_('Refresh')) diff --git a/ogcp/templates/actions/setup.html b/ogcp/templates/actions/setup.html index 0dcd4c7..6856ed1 100644 --- a/ogcp/templates/actions/setup.html +++ b/ogcp/templates/actions/setup.html @@ -1,19 +1,82 @@ {% extends 'commands.html' %} -{% import "bootstrap/wtf.html" as wtf %} {% block content %}

{{_('Partition and Format')}}

-{% for form in forms %} + + + + + + + + + + -{{ wtf.quick_form(form, - method='post', - form_type='inline', - extra_classes='mx-5 pb-3', - button_map={'modify': 'primary', - 'delete': 'danger'}) }} + + {% for form in forms %} + + + {{ form.hidden_tag() }} + + + + + + + + + {% endfor %} + +
TypeFilesytemSize (KB)Format?
{{ form.part_type(class_="form-control") }}{{ form.fs(class_="form-control") }}{{ form.size(class_="form-control") }}{{ form.format_partition(class_="form-control") }}{{ form.modify(class_="form-control btn-primary") }}{{ form.delete(class_="form-control btn-danger") }}
-{% endfor %} + + + + {% endblock %} diff --git a/ogcp/templates/base.html b/ogcp/templates/base.html index 022801f..68e2e64 100644 --- a/ogcp/templates/base.html +++ b/ogcp/templates/base.html @@ -56,6 +56,8 @@ + +