hyaenidae/server/templates/accounts/register.rs.html

24 lines
1 KiB
HTML
Raw Normal View History

2021-01-28 22:55:42 +00:00
@use crate::templates::accounts::inputs::{text_input, password_input};
@use hyaenidae_accounts::RegisterState;
@use hyaenidae_toolkit::{templates::{button_group, card, card_body, card_title, link}, Button, Card, Link};
2020-12-16 02:40:41 +00:00
@(card_config: &Card, state: &RegisterState)
@:card(card_config, {
2020-12-16 02:40:41 +00:00
<form method="POST" action="@state.register_path()">
@:card_title({ Register })
2020-12-16 02:40:41 +00:00
@:card_body({
2021-01-10 01:46:31 +00:00
@:text_input("username", "Username", state.username(), state.username_error(), state.dark)
@:password_input("password", "Password", state.password(), None, state.dark)
@:password_input("password_confirmation", "Password Confirmation", state.confirmation(), state.confirmation_error(), state.dark)
2021-01-24 04:02:31 +00:00
@:link(&Link::current_tab(&state.login_path()), { I already have an account })
2020-12-16 02:40:41 +00:00
})
@:card_body({
@:button_group(&[
2021-01-24 21:29:10 +00:00
Button::primary("Register"),
Button::primary_outline("Cancel").href(&state.home_path()),
2020-12-16 02:40:41 +00:00
])
})
</form>
})