summaryrefslogtreecommitdiff
path: root/src/viewmodel/telephone.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/viewmodel/telephone.rs')
-rw-r--r--src/viewmodel/telephone.rs15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/viewmodel/telephone.rs b/src/viewmodel/telephone.rs
index e5f63f0..6c930a2 100644
--- a/src/viewmodel/telephone.rs
+++ b/src/viewmodel/telephone.rs
@@ -1,11 +1,9 @@
-use std::collections::HashSet;
use super::*;
use crate::view::telephone::*;
-#[derive(Clone)]
+#[derive(Clone, Debug)]
pub struct Telephone {
pub number: String,
- pub extension: String,
pub work: bool,
pub home: bool,
pub text: bool,
@@ -21,7 +19,6 @@ impl VCardPropertyInputObject<TelephoneView> for Telephone {
fn new() -> Self {
Self {
number: String::new(),
- extension: String::new(),
work: false,
home: false,
text: false,
@@ -42,13 +39,6 @@ impl VCardPropertyInputObject<TelephoneView> for Telephone {
oninput: link.callback(|e: InputData| Msg::UpdateNumber(e.value)),
value: self.number.clone(),
},
- VCardPropertyInputField::Text{
- label: "Extension".to_string(),
- id: Some("extension".to_string()),
- placeholder: None,
- oninput: link.callback(|e: InputData| Msg::UpdateExtension(e.value)),
- value: self.extension.clone(),
- },
VCardPropertyInputField::CheckBox{
label: "Work".to_string(),
id: Some("work".to_string()),
@@ -106,7 +96,6 @@ impl VCardPropertyInputObject<TelephoneView> for Telephone {
]
}
fn is_empty(&self) -> bool {
- self.number.is_empty() &&
- self.extension.is_empty()
+ self.number.is_empty()
}
} \ No newline at end of file