summaryrefslogtreecommitdiff
path: root/src/viewmodel/address.rs
diff options
context:
space:
mode:
authorjelemux <jeremias.weber@protonmail.com>2021-02-05 18:05:16 +0100
committerjelemux <jeremias.weber@protonmail.com>2021-02-05 18:05:16 +0100
commitfd5b054fe655c81533c8a1138ba55a82a7b9d085 (patch)
tree2d90466a05356490ed3d15fa19e8dc0fe763499e /src/viewmodel/address.rs
parent87007b8785be959ca7687e2bec7401514e92581d (diff)
downloadwasm-card-fd5b054fe655c81533c8a1138ba55a82a7b9d085.tar.gz
wasm-card-fd5b054fe655c81533c8a1138ba55a82a7b9d085.tar.bz2
add date properties
Diffstat (limited to 'src/viewmodel/address.rs')
-rw-r--r--src/viewmodel/address.rs8
1 files changed, 8 insertions, 0 deletions
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<AddressView> for Address {
}
}
fn get_input_fields(&self, link: &ComponentLink<AddressView>) -> Vec<VCardPropertyInputField> {
+ let typ = String::from("text");
vec![
VCardPropertyInputField::Text{
label: "Post Office Box".to_string(),
@@ -36,6 +37,7 @@ impl VCardPropertyInputObject<AddressView> 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<AddressView> 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<AddressView> 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<AddressView> 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<AddressView> 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<AddressView> 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<AddressView> for Address {
placeholder: None,
oninput: link.callback(|e: InputData| Msg::UpdateCountry(e.value)),
value: self.country.clone(),
+ typ,
},
VCardPropertyInputField::CheckBox{
label: "Work".to_string(),