🚚 Rename add_element() to more descriptive name
This commit is contained in:
parent
aba7c4d8ce
commit
5840dc215e
2 changed files with 4 additions and 4 deletions
|
|
@ -43,7 +43,7 @@ async fn login(request: HttpRequest) -> ResultPage<Markup, ErrorPage> {
|
|||
fn form_login() -> Form {
|
||||
Form::new()
|
||||
.with_id("user-login")
|
||||
.with_element(
|
||||
.add_element(
|
||||
form::Input::textfield()
|
||||
.with_name("name")
|
||||
.with_label(L10n::t("username", &LOCALES_USER))
|
||||
|
|
@ -53,11 +53,11 @@ fn form_login() -> Form {
|
|||
)
|
||||
.with_autofocus(true),
|
||||
)
|
||||
.with_element(
|
||||
.add_element(
|
||||
form::Input::password()
|
||||
.with_name("pass")
|
||||
.with_label(L10n::t("password", &LOCALES_USER))
|
||||
.with_help_text(L10n::t("password_help", &LOCALES_USER)),
|
||||
)
|
||||
.with_element(form::ActionButton::submit().with_value(L10n::t("login", &LOCALES_USER)))
|
||||
.add_element(form::ActionButton::submit().with_value(L10n::t("login", &LOCALES_USER)))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ impl Form {
|
|||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub fn with_element(mut self, element: impl ComponentTrait) -> Self {
|
||||
pub fn add_element(mut self, element: impl ComponentTrait) -> Self {
|
||||
self.stuff.alter_value(ArcAnyOp::Add(ArcAnyComponent::new(element)));
|
||||
self
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue