pub to_load: String,
#[serde(rename = "to-save")]
pub to_save: String,
+ pub accept: String,
+ pub inline: String,
#[serde(rename = "option")]
pub options: Vec<ZakFormElementSelectOption>,
"zak_form_cgi_form_element_select" => { writeln!(output, r#"let mut fi = zakform::fields::FieldSelect::new("{}")"#, e.id); },
"zak_form_cgi_form_element_check" => { writeln!(output, r#"let mut fi = zakform::fields::FieldCheck::new("{}")"#, e.id); },
"zak_form_cgi_form_element_submit" => { writeln!(output, r#"let mut fi = zakform::fields::FieldButton::new("{}")"#, e.id); },
+ "zak_form_cgi_form_element_file" => { writeln!(output, r#"let mut fi = zakform::fields::FieldFile::new("{}")"#, e.id); },
_ => { continue; },
};
};
if e.placeholder != "" {
- writeln!(output, "fi.set_placeholder({})", e.placeholder);
+ writeln!(output, r#"fi.set_placeholder("{}")"#, e.placeholder);
}
if e.class != "" {
- writeln!(output, "fi.set_class({})", e.class);
+ writeln!(output, r#"fi.set_class("{}")"#, e.class);
}
for option in e.options {
None => { },
}
+ if e.editable == "FALSE" {
+ writeln!(output, "fi.set_disabled(true)");
+ }
+
if e.to_load == "FALSE" {
writeln!(output, "fi.set_to_load(false)");
}
if e.to_save == "FALSE" {
writeln!(output, "fi.set_to_save(false)");
}
- if e.editable == "FALSE" {
- writeln!(output, "fi.set_disabled(true)");
+
+ if e.inline == "TRUE" {
+ writeln!(output, "fi.set_inline(true)");
+ }
+
+ if e.accept != "" {
+ writeln!(output, r#"fi.set_accept("{}")"#, e.accept);
}
for filter in e.filters {
_ => { },
};
},
+ }
+ }
+
+ for validator in e.validators {
+ match validator.vtype.as_str() {
_ => { },
};
}