| 165 | | 165 | |
| 166 | fn login_body(csrf: &str, error: Option<&str>) -> Markup { | 166 | fn login_body(csrf: &str, error: Option<&str>) -> Markup { |
| 167 | html! { | 167 | html! { |
| 168 | div class="form-narrow" { | 168 | div class="auth-wrap" { |
| 169 | h1 { "Sign in" } | 169 | div class="auth-card" { |
| 170 | @if let Some(err) = error { | 170 | h1 { "Sign in" } |
| 171 | div class="notice notice-error" { (err) } | 171 | @if let Some(err) = error { |
| 172 | } | 172 | div class="notice notice-error" { (err) } |
| 173 | form method="post" action="/login" { | 173 | } |
| 174 | input type="hidden" name="_csrf" value=(csrf); | 174 | form method="post" action="/login" { |
| 175 | label for="username" { "Username" } | 175 | input type="hidden" name="_csrf" value=(csrf); |
| 176 | input type="text" id="username" name="username" autocomplete="username" required; | 176 | label for="username" { "Username" } |
| 177 | label for="password" { "Password" } | 177 | input type="text" id="username" name="username" autocomplete="username" required; |
| 178 | input type="password" id="password" name="password" | 178 | label for="password" { "Password" } |
| 179 | autocomplete="current-password" required; | 179 | input type="password" id="password" name="password" |
| 180 | p { button class="btn btn-primary" type="submit" { "Sign in" } } | 180 | autocomplete="current-password" required; |
| | 181 | button class="btn btn-primary" type="submit" { "Sign in" } |
| | 182 | } |
| 181 | } | 183 | } |
| 182 | } | 184 | } |
| 183 | } | 185 | } |
| 307 | let _ = invite; | 309 | let _ = invite; |
| 308 | let (jar, chrome) = build_chrome(&state, jar, None, uri.path().to_string()); | 310 | let (jar, chrome) = build_chrome(&state, jar, None, uri.path().to_string()); |
| 309 | let body = html! { | 311 | let body = html! { |
| 310 | div class="form-narrow" { | 312 | div class="auth-wrap" { |
| 311 | h1 { "Set your password" } | 313 | div class="auth-card" { |
| 312 | p class="muted" { "Choose a password to activate your account." } | 314 | h1 { "Set your password" } |
| 313 | form method="post" action={ "/invite/" (token) } { | 315 | p class="muted" { "Choose a password to activate your account." } |
| 314 | input type="hidden" name="_csrf" value=(chrome.csrf); | 316 | form method="post" action={ "/invite/" (token) } { |
| 315 | label for="password" { "Password" } | 317 | input type="hidden" name="_csrf" value=(chrome.csrf); |
| 316 | input type="password" id="password" name="password" | 318 | label for="password" { "Password" } |
| 317 | autocomplete="new-password" required minlength="8"; | 319 | input type="password" id="password" name="password" |
| 318 | label for="confirm" { "Confirm password" } | 320 | autocomplete="new-password" required minlength="8"; |
| 319 | input type="password" id="confirm" name="confirm" | 321 | label for="confirm" { "Confirm password" } |
| 320 | autocomplete="new-password" required; | 322 | input type="password" id="confirm" name="confirm" |
| 321 | p { button class="btn btn-primary" type="submit" { "Activate account" } } | 323 | autocomplete="new-password" required; |
| | 324 | button class="btn btn-primary" type="submit" { "Activate account" } |
| | 325 | } |
| 322 | } | 326 | } |
| 323 | } | 327 | } |
| 324 | }; | 328 | }; |