diff --git a/app/src/components/add_group_member.rs b/app/src/components/add_group_member.rs index 61b9938..0ac4e23 100644 --- a/app/src/components/add_group_member.rs +++ b/app/src/components/add_group_member.rs @@ -149,18 +149,19 @@ impl Component for AddGroupMemberComponent { } fn view(&self) -> Html { + let link = &self.common; if let Some(user_list) = &self.user_list { let to_add_user_list = self.get_selectable_user_list(user_list); #[allow(unused_braces)] let make_select_option = |user: User| { html_nested! { - + } }; html! {
- { to_add_user_list .into_iter() @@ -172,8 +173,8 @@ impl Component for AddGroupMemberComponent {
diff --git a/app/src/components/add_user_to_group.rs b/app/src/components/add_user_to_group.rs index 3d7d3f0..1130ffb 100644 --- a/app/src/components/add_user_to_group.rs +++ b/app/src/components/add_user_to_group.rs @@ -162,18 +162,19 @@ impl Component for AddUserToGroupComponent { } fn view(&self) -> Html { + let link = &self.common; if let Some(group_list) = &self.group_list { let to_add_group_list = self.get_selectable_group_list(group_list); #[allow(unused_braces)] let make_select_option = |group: Group| { html_nested! { - + } }; html! {
- { to_add_group_list .into_iter() @@ -185,8 +186,8 @@ impl Component for AddUserToGroupComponent {
diff --git a/app/src/components/app.rs b/app/src/components/app.rs index e20fed7..69ef406 100644 --- a/app/src/components/app.rs +++ b/app/src/components/app.rs @@ -128,7 +128,7 @@ impl Component for App {
- render = Router::render(move |s| Self::dispatch_route(s, &link, is_admin, password_reset_enabled)) + render={Router::render(move |s| Self::dispatch_route(s, &link, is_admin, password_reset_enabled))} />
@@ -198,7 +198,7 @@ impl App { ) -> Html { match switch { AppRoute::Login => html! { - + }, AppRoute::CreateUser => html! { @@ -206,7 +206,7 @@ impl App { AppRoute::Index | AppRoute::ListUsers => html! {
- + {"Create a user"} @@ -218,20 +218,20 @@ impl App { AppRoute::ListGroups => html! {
- + {"Create a group"}
}, AppRoute::GroupDetails(group_id) => html! { - + }, AppRoute::UserDetails(username) => html! { - + }, AppRoute::ChangePassword(username) => html! { - + }, AppRoute::StartResetPassword => match password_reset_enabled { Some(true) => html! { }, @@ -242,7 +242,7 @@ impl App { None => html! {}, }, AppRoute::FinishResetPassword(token) => match password_reset_enabled { - Some(true) => html! { }, + Some(true) => html! { }, Some(false) => { App::dispatch_route(AppRoute::Login, link, is_admin, password_reset_enabled) } @@ -252,6 +252,7 @@ impl App { } fn view_banner(&self) -> Html { + let link = &self.link; html! {
@@ -266,7 +267,7 @@ impl App {
  • + route={AppRoute::ListUsers}> {"Users"} @@ -274,7 +275,7 @@ impl App {
  • + route={AppRoute::ListGroups}> {"Groups"} @@ -312,13 +313,13 @@ impl App {
  • + route={AppRoute::UserDetails(user_id.clone())}> {"View details"}
  • - +
  • diff --git a/app/src/components/change_password.rs b/app/src/components/change_password.rs index dd43369..6b08822 100644 --- a/app/src/components/change_password.rs +++ b/app/src/components/change_password.rs @@ -212,6 +212,7 @@ impl Component for ChangePasswordForm { fn view(&self) -> Html { let is_admin = self.common.is_admin; + let link = &self.common; type Field = yew_form::Field; html! { <> @@ -239,14 +240,14 @@ impl Component for ChangePasswordForm {
    + oninput={link.callback(|_| Msg::FormUpdate)} />
    {&self.form.field_message("old_password")}
    @@ -262,14 +263,14 @@ impl Component for ChangePasswordForm {
    + oninput={link.callback(|_| Msg::FormUpdate)} />
    {&self.form.field_message("password")}
    @@ -284,14 +285,14 @@ impl Component for ChangePasswordForm {
    + oninput={link.callback(|_| Msg::FormUpdate)} />
    {&self.form.field_message("confirm_password")}
    @@ -301,14 +302,14 @@ impl Component for ChangePasswordForm { + route={AppRoute::UserDetails(self.common.username.clone())}> {"Back"} diff --git a/app/src/components/create_group.rs b/app/src/components/create_group.rs index d3e9b45..8dcafec 100644 --- a/app/src/components/create_group.rs +++ b/app/src/components/create_group.rs @@ -97,6 +97,7 @@ impl Component for CreateGroupForm { } fn view(&self) -> Html { + let link = &self.common; type Field = yew_form::Field; html! {
    @@ -113,13 +114,13 @@ impl Component for CreateGroupForm {
    + oninput={link.callback(|_| Msg::Update)} />
    {&self.form.field_message("groupname")}
    @@ -129,8 +130,8 @@ impl Component for CreateGroupForm { diff --git a/app/src/components/create_user.rs b/app/src/components/create_user.rs index b7ece1c..ba39b97 100644 --- a/app/src/components/create_user.rs +++ b/app/src/components/create_user.rs @@ -190,6 +190,7 @@ impl Component for CreateUserForm { } fn view(&self) -> Html { + let link = &self.common; type Field = yew_form::Field; html! {
    @@ -206,13 +207,13 @@ impl Component for CreateUserForm {
    + oninput={link.callback(|_| Msg::Update)} />
    {&self.form.field_message("username")}
    @@ -227,14 +228,14 @@ impl Component for CreateUserForm {
    + oninput={link.callback(|_| Msg::Update)} />
    {&self.form.field_message("email")}
    @@ -247,13 +248,13 @@ impl Component for CreateUserForm {
    + oninput={link.callback(|_| Msg::Update)} />
    {&self.form.field_message("display_name")}
    @@ -266,13 +267,13 @@ impl Component for CreateUserForm {
    + oninput={link.callback(|_| Msg::Update)} />
    {&self.form.field_message("first_name")}
    @@ -285,13 +286,13 @@ impl Component for CreateUserForm {
    + oninput={link.callback(|_| Msg::Update)} />
    {&self.form.field_message("last_name")}
    @@ -304,14 +305,14 @@ impl Component for CreateUserForm {
    + oninput={link.callback(|_| Msg::Update)} />
    {&self.form.field_message("password")}
    @@ -324,14 +325,14 @@ impl Component for CreateUserForm {
    + oninput={link.callback(|_| Msg::Update)} />
    {&self.form.field_message("confirm_password")}
    @@ -340,9 +341,9 @@ impl Component for CreateUserForm {
    diff --git a/app/src/components/delete_group.rs b/app/src/components/delete_group.rs index 881f55f..0934976 100644 --- a/app/src/components/delete_group.rs +++ b/app/src/components/delete_group.rs @@ -109,12 +109,13 @@ impl Component for DeleteGroup { } fn view(&self) -> Html { + let link = &self.common; html! { <> {self.show_modal()} @@ -125,14 +126,15 @@ impl Component for DeleteGroup { impl DeleteGroup { fn show_modal(&self) -> Html { + let link = &self.common; html! {