]> saetta.ns0.it Git - rust/zakform/commitdiff
c2rs: added to_load/to_save/editable.
authorAndrea Zagli <azagli@libero.it>
Sat, 23 Sep 2023 13:11:52 +0000 (15:11 +0200)
committerAndrea Zagli <azagli@libero.it>
Sat, 23 Sep 2023 13:11:52 +0000 (15:11 +0200)
src/bin/c2rs.rs

index 5ec3489e97c556b96a50d5f39187b764755d11cc..86793ab277e6c552bc39b901a9464c6d6783b8c0 100644 (file)
@@ -164,6 +164,16 @@ fn main() {
                        None => { },
                }
 
+               if e.to_load == "FALSE" {
+                       println!("fi.set_to_load(false)");
+               }
+               if e.to_save == "FALSE" {
+                       println!("fi.set_to_save(false)");
+               }
+               if e.editable == "FALSE" {
+                       println!("fi.set_disabled(true)");
+               }
+
                for filter in e.filters {
                        match filter.ftype.as_str() {
                                "zak_form_element_filter_trim" => { println!("fi.add_filter(zakform::filters::filter_trim);"); },