use askama::Template; use crate::config; pub struct Base<'a> { pub lang: &'a str, pub path_prefix: &'a str, } #[derive(Template)] #[template(path = "contact_form.askama.html")] pub struct ContactForm<'a> { pub base: Base<'a>, pub was_validated: bool, pub id: u16, pub name: String, pub email: String, pub telefon: String, pub message: String, pub captcha: String, pub error_message: &'a str, pub strings: &'a config::Strings, } #[derive(Template)] #[template(path = "success.askama.html")] pub struct Success<'a> { pub base: Base<'a>, pub message: &'a str, }