From fd5b054fe655c81533c8a1138ba55a82a7b9d085 Mon Sep 17 00:00:00 2001 From: jelemux Date: Fri, 5 Feb 2021 18:05:16 +0100 Subject: add date properties --- src/viewmodel/address.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/viewmodel/address.rs') diff --git a/src/viewmodel/address.rs b/src/viewmodel/address.rs index 6fd3173..26e168a 100644 --- a/src/viewmodel/address.rs +++ b/src/viewmodel/address.rs @@ -29,6 +29,7 @@ impl VCardPropertyInputObject for Address { } } fn get_input_fields(&self, link: &ComponentLink) -> Vec { + let typ = String::from("text"); vec![ VCardPropertyInputField::Text{ label: "Post Office Box".to_string(), @@ -36,6 +37,7 @@ impl VCardPropertyInputObject for Address { placeholder: None, oninput: link.callback(|e: InputData| Msg::UpdatePostOfficeBox(e.value)), value: self.post_office_box.clone(), + typ: typ.clone(), }, VCardPropertyInputField::Text{ label: "Extension".to_string(), @@ -43,6 +45,7 @@ impl VCardPropertyInputObject for Address { placeholder: None, oninput: link.callback(|e: InputData| Msg::UpdateExtension(e.value)), value: self.extension.clone(), + typ: typ.clone(), }, VCardPropertyInputField::Text{ label: "Street".to_string(), @@ -50,6 +53,7 @@ impl VCardPropertyInputObject for Address { placeholder: None, oninput: link.callback(|e: InputData| Msg::UpdateStreet(e.value)), value: self.street.clone(), + typ: typ.clone(), }, VCardPropertyInputField::Text{ label: "Locality".to_string(), @@ -57,6 +61,7 @@ impl VCardPropertyInputObject for Address { placeholder: None, oninput: link.callback(|e: InputData| Msg::UpdateLocality(e.value)), value: self.locality.clone(), + typ: typ.clone(), }, VCardPropertyInputField::Text{ label: "Region".to_string(), @@ -64,6 +69,7 @@ impl VCardPropertyInputObject for Address { placeholder: None, oninput: link.callback(|e: InputData| Msg::UpdateRegion(e.value)), value: self.region.clone(), + typ: typ.clone(), }, VCardPropertyInputField::Text{ label: "Code".to_string(), @@ -71,6 +77,7 @@ impl VCardPropertyInputObject for Address { placeholder: None, oninput: link.callback(|e: InputData| Msg::UpdateCode(e.value)), value: self.code.clone(), + typ: typ.clone(), }, VCardPropertyInputField::Text{ label: "Country".to_string(), @@ -78,6 +85,7 @@ impl VCardPropertyInputObject for Address { placeholder: None, oninput: link.callback(|e: InputData| Msg::UpdateCountry(e.value)), value: self.country.clone(), + typ, }, VCardPropertyInputField::CheckBox{ label: "Work".to_string(), -- cgit v1.2.3