From c7b15dcf913c3b61dd06b3b77bb7361a07fe2efe Mon Sep 17 00:00:00 2001
From: Marius Vollmer <mvollmer@redhat.com>
Date: Wed, 21 Feb 2024 11:42:13 +0200
Subject: [PATCH] storage: Rename "Name" field to "Filesystem label" and move
 it down

Both partitions and filesystems can have "names", and people don't
know that this field is for when creating a partition.  Also, giving a
filesystem a label is optional and not very important, so having it at
the top makes it seem more important than it is.

https://bugzilla.redhat.com/show_bug.cgi?id=2264540
https://github.com/cockpit-project/cockpit/issues/19170
---
 pkg/storaged/block/format-dialog.jsx | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/pkg/storaged/block/format-dialog.jsx b/pkg/storaged/block/format-dialog.jsx
index 2c8303a4c427..7620a82eedb5 100644
--- a/pkg/storaged/block/format-dialog.jsx
+++ b/pkg/storaged/block/format-dialog.jsx
@@ -343,12 +343,6 @@ function format_dialog_internal(client, path, start, size, enable_dos_extended,
         Title: title,
         Teardown: TeardownMessage(usage),
         Fields: [
-            TextInput("name", _("Name"),
-                      {
-                          value: content_block?.IdLabel,
-                          validate: (name, vals) => validate_fsys_label(name, vals.type),
-                          visible: is_filesystem
-                      }),
             TextInput("mount_point", _("Mount point"),
                       {
                           visible: is_filesystem,
@@ -374,6 +368,12 @@ function format_dialog_internal(client, path, start, size, enable_dos_extended,
                                return create_partition;
                            }
                        }),
+            TextInput("name", _("Filesystem label"),
+                      {
+                          value: content_block?.IdLabel,
+                          validate: (name, vals) => validate_fsys_label(name, vals.type),
+                          visible: is_filesystem
+                      }),
             CheckBoxes("erase", _("Overwrite"),
                        {
                            fields: [