From 9881627186f03c01ef490bdd24c3d9d306daff65 Mon Sep 17 00:00:00 2001 From: philipp Date: Fri, 11 Oct 2024 10:18:53 +0200 Subject: [PATCH] make it work with changed db model, but no select yet --- src/tera/admin/user.rs | 2 -- templates/admin/user/index.html.tera | 23 +++++------------------ 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/tera/admin/user.rs b/src/tera/admin/user.rs index 3cd9337..3c7564d 100644 --- a/src/tera/admin/user.rs +++ b/src/tera/admin/user.rs @@ -293,8 +293,6 @@ async fn update( data: Form>, admin: ManageUserUser, ) -> Flash { - println!("{data:#?}"); - let user = User::find_by_id(db, data.id).await; Log::create( db, diff --git a/templates/admin/user/index.html.tera b/templates/admin/user/index.html.tera index 82c2ebf..05cd9e5 100644 --- a/templates/admin/user/index.html.tera +++ b/templates/admin/user/index.html.tera @@ -79,25 +79,12 @@
- {% for cluster, r in roles | group_by(attribute="cluster") %} - {{ cluster }} - - {% endfor %} - - - {% for role in roles %} - {% if not role.cluster %} + {# for cluster, r in roles | group_by(attribute="cluster") #} + {# cluster #} + {% for role in roles %} {{ macros::checkbox(label=role.name, name="roles[" ~ role.id ~ "]", id=loop.index , checked=role.name in user.roles, disabled=allowed_to_edit == false) }} - {% endif %} - {% endfor %} + {% endfor %} + {# endfor #}
{% if user.membership_pdf %}