make it work with changed db model, but no select yet
This commit is contained in:
		| @@ -293,8 +293,6 @@ async fn update( | ||||
|     data: Form<UserEditForm<'_>>, | ||||
|     admin: ManageUserUser, | ||||
| ) -> Flash<Redirect> { | ||||
|     println!("{data:#?}"); | ||||
|  | ||||
|     let user = User::find_by_id(db, data.id).await; | ||||
|     Log::create( | ||||
|         db, | ||||
|   | ||||
| @@ -79,25 +79,12 @@ | ||||
|                         <div class="w-full grid gap-3 mt-3"> | ||||
|                             <input type="hidden" name="id" value="{{ user.id }}" /> | ||||
|                             <div class="grid sm:grid-cols-2 lg:grid-cols-4 gap-3"> | ||||
|                                 {% for cluster, r in roles | group_by(attribute="cluster") %} | ||||
| 				{{ cluster }} | ||||
| 				<label for="{{ cluster }}" class="flex items-center cursor-pointer text-black dark:text-white hover:text-gray-900 dark:hover:text-gray-100"> | ||||
|     <select id="{{ cluster }}" name="{{ cluster }}" class="h-8 accent-primary-600 dark:accent-primary-200 mr-2"> | ||||
|         <option value="">None</option> | ||||
| 					{% for role in r %} | ||||
|         <option value="{{ role.id }}">{{ role.name }}</option> | ||||
|  | ||||
| 				    	{% endfor %} | ||||
|     </select> | ||||
| </label> | ||||
|                                 {% 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 #} | ||||
|                                 <hr class="sm:col-span-2 lg:col-span-4 my-3" /> | ||||
|                                 {% if user.membership_pdf %} | ||||
|                                     <a href="/admin/user/{{ user.id }}/membership" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user