contact-form/src/templates.rs

21 lines
438 B
Rust
Raw Normal View History

2022-11-01 19:45:06 +00:00
use askama::Template;
2022-10-29 15:12:43 +00:00
2022-11-01 19:45:06 +00:00
#[derive(Template)]
#[template(path = "contact_form.askama.html")]
2022-10-31 01:13:42 +00:00
pub struct ContactForm<'a> {
2022-10-29 15:12:43 +00:00
pub path_prefix: &'a str,
pub was_validated: bool,
pub id: u16,
pub name: &'a str,
pub email: &'a str,
pub telefon: &'a str,
pub message: &'a str,
pub captcha: &'a str,
}
2022-11-01 19:45:06 +00:00
#[derive(Template)]
#[template(path = "success.askama.html")]
pub struct Success<'a> {
pub message: &'a str,
}