From 9d3e3bd315af607adec6b647365d1c187f292780 Mon Sep 17 00:00:00 2001 From: catborise Date: Sat, 31 Oct 2026 17:49:19 +0300 Subject: [PATCH] feat(storages): the pool page's dialogs in the panel's dialog look The New volume, Clone image and Upload ISO dialogs of a pool set their labels in a narrow column beside the fields and closed with a grey Close; Clone image showed the volume's name in red and offered bare Convert and Metadata boxes, New volume an unlabelled meta_prealloc box. Now their labels sit above the fields, tied to them: New volume asks for the name, with what it may hold, then the size and the format side by side and "Preallocate metadata (qcow2)"; Clone image names the volume in monospace, asks for the name of the copy and offers "Convert it to another format", its format and the same preallocation; Upload ISO asks for the ISO file and says to keep the page open while the browser sends it. Each closes with Cancel and its action; the posted fields are unchanged. --- storages/forms.py | 6 +-- storages/templates/create_stg_vol_block.html | 32 +++++++------- storages/templates/storage.html | 45 +++++++++----------- storages/tests/test_pool_page.py | 14 ++++++ 4 files changed, 52 insertions(+), 45 deletions(-) diff --git a/storages/forms.py b/storages/forms.py index f6692812..3ea39be4 100644 --- a/storages/forms.py +++ b/storages/forms.py @@ -86,13 +86,13 @@ class AddStgPool(forms.Form): class CreateVolumeForm(forms.Form): - name = forms.CharField(max_length=120) + name = forms.CharField(max_length=120, help_text=_("Letters, digits, dot, dash and underscore.")) format = forms.ChoiceField( required=True, choices=(("qcow2", "qcow2 (recommended)"), ("qcow", "qcow"), ("raw", "raw")), ) size = forms.IntegerField(label=_("Size (GiB)"), min_value=1) - meta_prealloc = forms.BooleanField(required=False) + meta_prealloc = forms.BooleanField(label=_("Preallocate metadata (qcow2)"), required=False) def clean_name(self): name = self.cleaned_data["name"] @@ -112,7 +112,7 @@ class CloneImage(forms.Form): required=False, choices=(("qcow2", "qcow2 (recommended)"), ("qcow", "qcow"), ("raw", "raw")), ) - meta_prealloc = forms.BooleanField(required=False) + meta_prealloc = forms.BooleanField(label=_("Preallocate metadata (qcow2)"), required=False) def clean_name(self): name = self.cleaned_data["name"] diff --git a/storages/templates/create_stg_vol_block.html b/storages/templates/create_stg_vol_block.html index 3d4ad1dd..0e37624e 100644 --- a/storages/templates/create_stg_vol_block.html +++ b/storages/templates/create_stg_vol_block.html @@ -8,22 +8,18 @@ {% trans "Upload ISO" %} -