Added checkbox to booking form - remember customer

This commit is contained in:
2024-02-19 17:39:37 +01:00
parent aaf4cd54c3
commit 653249287d
5 changed files with 64 additions and 6 deletions
+5 -1
View File
@@ -376,7 +376,8 @@ pub struct CrReservation {
email: String,
#[validate(length(min = 1,message = "Enter your phone number"))]
phone: String,
note: String
note: String,
remember: bool
}
#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
@@ -420,6 +421,9 @@ impl CrReservation {
pub fn note(&self) -> &str {
&self.note
}
pub fn remember(&self) -> bool {
self.remember
}
}
#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq, Default)]