]> saetta.ns0.it Git - rust/zakform/commitdiff
c2rs: form_element_email to text (for now).
authorAndrea Zagli <azagli@libero.it>
Fri, 10 May 2024 06:57:43 +0000 (08:57 +0200)
committerAndrea Zagli <azagli@libero.it>
Fri, 10 May 2024 06:57:43 +0000 (08:57 +0200)
src/bin/c2rs.rs

index 7d105381d74a47e654a6d5418819460f21cb24c0..084f7271a2e6864c24888cf276b572f13311304b 100644 (file)
@@ -170,7 +170,8 @@ fn main() {
                writeln!(output, "");
 
                match e.etype.as_str() {
-                       "zak_form_cgi_form_element_text" => { writeln!(output, r#"let mut fi = zakform::fields::FieldText::new("{}");"#, e.id); },
+                       "zak_form_cgi_form_element_text"
+                               | "zak_form_cgi_form_element_email" => { writeln!(output, r#"let mut fi = zakform::fields::FieldText::new("{}");"#, e.id); },
                        "zak_form_cgi_form_element_text_area" => { writeln!(output, r#"let mut fi = zakform::fields::FieldTextArea::new("{}");"#, e.id); },
                        "zak_form_cgi_form_element_radio" => { writeln!(output, r#"let mut fi = zakform::fields::FieldRadio::new("{}");"#, e.id); },
                        "zak_form_cgi_form_element_select" => { writeln!(output, r#"let mut fi = zakform::fields::FieldSelect::new("{}");"#, e.id); },