summaryrefslogtreecommitdiff
path: root/src/render/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/mod.rs')
-rw-r--r--src/render/mod.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/render/mod.rs b/src/render/mod.rs
index 8575e9b..fe0053a 100644
--- a/src/render/mod.rs
+++ b/src/render/mod.rs
@@ -13,6 +13,7 @@ impl Renderer {
info!("Rendering page with context: {:?}", self);
let login_box: Box<RenderBox> = match self.user {
Some(ref user) => box_html!{
+ : "Logged in as ";
: user;
: " (";
a(href="logout") { // TODO get base url from context
@@ -57,9 +58,14 @@ impl Renderer {
}).into_string().unwrap()
}
- pub fn login_page(&self) -> String {
+ pub fn login_page(&self, is_retry: bool) -> String {
self.render_in_page(box_html! {
h1 { : "Log in" }
+ @ if is_retry {
+ p {
+ : "Incorrect username or password. Try again."
+ }
+ }
form(method="post") {
p { : "Username" }
input(type="text", name="username") {}