2020-12-16 02:40:41 +00:00
|
|
|
@use crate::DeleteUserState;
|
|
|
|
@use super::inputs::password_input;
|
2021-01-08 04:42:22 +00:00
|
|
|
@use hyaenidae_toolkit::{templates::{button_group, card, card_body, card_title}, Button, Card};
|
2020-12-16 02:40:41 +00:00
|
|
|
|
|
|
|
@(card_config: &Card, state: &DeleteUserState)
|
|
|
|
|
2021-01-08 04:42:22 +00:00
|
|
|
@:card(card_config, {
|
2020-12-16 02:40:41 +00:00
|
|
|
<form method="POST" action="@state.delete_user_path()">
|
2021-01-08 04:42:22 +00:00
|
|
|
@:card_title({ Delete Account })
|
2020-12-16 02:40:41 +00:00
|
|
|
@:card_body({
|
2021-01-10 01:46:31 +00:00
|
|
|
@:password_input("password", "Password", state.password(), state.password_error(), state.dark)
|
2020-12-16 02:40:41 +00:00
|
|
|
})
|
|
|
|
@:card_body({
|
|
|
|
@:button_group(&[
|
2021-01-22 05:42:48 +00:00
|
|
|
Button::primary("Delete Account").dark(state.dark),
|
2021-01-10 01:46:31 +00:00
|
|
|
Button::primary_outline("Cancel").href(&state.accounts_path()).dark(state.dark),
|
2020-12-16 02:40:41 +00:00
|
|
|
])
|
|
|
|
})
|
|
|
|
</form>
|
|
|
|
})
|