fix installer: import_descriptor next button

Next button was grey although the descriptor form
is not empty.
This commit is contained in:
edouard committed 2022-12-08 17:30:28 +01:00
1 parent d385e99726
commit 2d788d5bff
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -393,6 +393,7 @@ impl Step for ImportDescriptor {
// descriptor forms for import or creation cannot be both empty or filled.
if !self.imported_descriptor.value.is_empty() {
if let Ok(desc) = MultipathDescriptor::from_str(&self.imported_descriptor.value) {
self.imported_descriptor.valid = true;
ctx.descriptor = Some(desc);
true
} else {
+1 -1
View File
@@ -287,7 +287,7 @@ pub fn import_descriptor<'a>(
.push(row_network)
.push(col_descriptor),
)
.push(if !imported_descriptor.value.is_empty() {
.push(if imported_descriptor.value.is_empty() {
button::primary(None, "Next").width(Length::Units(200))
} else {
button::primary(None, "Next")