From ce874e1d30142cda0be4b7636f9457cee8582d70 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Wed, 25 Oct 2023 22:52:03 -0400 Subject: [PATCH] Fix the form to string conversion and set up the Delete form --- file-service/src/html.rs | 2 +- file-service/src/pages.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/file-service/src/html.rs b/file-service/src/html.rs index 5f5e2cd..1be10bc 100644 --- a/file-service/src/html.rs +++ b/file-service/src/html.rs @@ -74,7 +74,7 @@ impl Html for Form { None => "".to_owned(), }; format!( - "
\n", + "\n{elements}\n
\n", path = self.path, method = self.method, encoding = encoding, diff --git a/file-service/src/pages.rs b/file-service/src/pages.rs index e68aabe..589f6b7 100644 --- a/file-service/src/pages.rs +++ b/file-service/src/pages.rs @@ -106,9 +106,8 @@ pub fn thumbnail(info: &FileInfo) -> Container { ) .with_html( Form::new() - .with_path(&format!("/{}", *info.id)) + .with_path(&format!("/delete/{}", *info.id)) .with_method("post") - .with_html(Input::new("hidden", "_method").with_value("delete")) .with_html(Button::new("Delete")), ), )