From bca21a8fe7f3728ba2435b387ecd76cdd861274d Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Thu, 11 Jul 2024 23:16:28 +0200 Subject: [PATCH] fixup! Allow prefilling add forms --- src/frontend/item_class.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/item_class.rs b/src/frontend/item_class.rs index e73df7e..69cfbe9 100644 --- a/src/frontend/item_class.rs +++ b/src/frontend/item_class.rs @@ -169,7 +169,7 @@ async fn add_item_class(form: web::Query) -> actix_web::Result r#type: forms::InputType::Text, name: "parent", title: "Parent", - disabled: true, + disabled: form.parent.is_none(), value: form.parent.map(|id| id.to_string()), ..Default::default() })