From: Andrea Zagli Date: Wed, 20 Sep 2023 14:20:01 +0000 (+0200) Subject: libzakform conversion: added select option. X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=2f8d5467626020b8f406689d7439988b683bdf46;p=rust%2Fzakform libzakform conversion: added select option. --- diff --git a/src/main.rs b/src/main.rs index 1662fb1..d305a73 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,6 +37,9 @@ pub struct ZakFormElement { pub to_save: String, pub placeholder: String, + #[yaserde(rename = "option")] + pub options: Vec, + #[yaserde(rename = "zak-cgi-options")] pub zakcgi_options: Option, @@ -80,6 +83,14 @@ pub struct ZakFormElementValidator { pub vtype: String, } +#[derive(Default, Debug, Clone, PartialEq, YaDeserialize)] +#[yaserde(rename = "option")] +pub struct ZakFormElementSelectOption { + pub id: String, + #[yaserde(text)] + pub text: String, +} + #[derive(Default, Debug, Clone, PartialEq, YaDeserialize)] #[yaserde(rename = "zak-cgi-options")] pub struct ZakFormElementRadioOptions {