Añade componentes básicos traducibles Html/Text

This commit is contained in:
Manuel Cillero 2023-05-30 19:13:13 +02:00
parent 6c76e3519c
commit 1d83bbc80a
20 changed files with 243 additions and 369 deletions

View file

@ -42,7 +42,7 @@ impl ModuleTrait for User {
async fn login(request: server::HttpRequest) -> ResultPage<Markup, FatalError> {
Page::new(request)
.with_title(L10n::n("Identificación del usuario"))
.with_title(Text::n("Identificación del usuario"))
.with_this_in(
"region-content",
Container::new()
@ -58,9 +58,9 @@ fn form_login() -> Form {
.with_element(
form_element::Input::textfield()
.with_name("name")
.with_label(L10n::t("username", &LOCALE_USER))
.with_label(Text::t("username", &LOCALE_USER))
.with_help_text(
L10n::t("username_help", &LOCALE_USER)
Text::t("username_help", &LOCALE_USER)
.with_arg("app", config::SETTINGS.app.name.to_owned()),
)
.with_autofocus(true),
@ -68,8 +68,8 @@ fn form_login() -> Form {
.with_element(
form_element::Input::password()
.with_name("pass")
.with_label(L10n::t("password", &LOCALE_USER))
.with_help_text(L10n::t("password_help", &LOCALE_USER)),
.with_label(Text::t("password", &LOCALE_USER))
.with_help_text(Text::t("password_help", &LOCALE_USER)),
)
.with_element(form_element::Button::submit(L10n::t("login", &LOCALE_USER)))
.with_element(form_element::Button::submit(Text::t("login", &LOCALE_USER)))
}