From 9c75c847203f5f42aa8370cb6a48079791771dd3 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 1ad0760..00c5135 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 65997e3..e5ae6ab 100644 --- a/file-service/src/pages.rs +++ b/file-service/src/pages.rs @@ -102,9 +102,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")), ), )