[BUGFIX] checkboxes name
This commit is contained in:
		| @@ -39,9 +39,9 @@ | |||||||
|       <input type="hidden" name="id" value="{{ user.id }}" /> |       <input type="hidden" name="id" value="{{ user.id }}" /> | ||||||
|       <div class="font-bold mb-1">{{ user.name }}</div> |       <div class="font-bold mb-1">{{ user.name }}</div> | ||||||
|       <div class="grid md:grid-cols-3"> |       <div class="grid md:grid-cols-3"> | ||||||
|         {{ macros::checkbox(label='Gast', name='is_guest' ~  loop.index , checked=user.is_guest) }} |         {{ macros::checkbox(label='Gast', name='is_guest', index=loop.index , checked=user.is_guest) }} | ||||||
|         {{ macros::checkbox(label='Steuerberechtigter', name='is_cox' ~  loop.index , checked=user.is_cox) }} |         {{ macros::checkbox(label='Steuerberechtigter', name='is_cox', index=loop.index , checked=user.is_cox) }} | ||||||
|         {{ macros::checkbox(label='Admin', name='is_admin' ~  loop.index , checked=user.is_admin) }} |         {{ macros::checkbox(label='Admin', name='is_admin', index=loop.index , checked=user.is_admin) }} | ||||||
|       </div> |       </div> | ||||||
|        {% if user.pw %} |        {% if user.pw %} | ||||||
|         <a class="inline-block mt-1 text-primary-600 hover:text-primary-900 underline" href="/admin/user/{{ user.id }}/reset-pw">Passwort zurücksetzen</a> |         <a class="inline-block mt-1 text-primary-600 hover:text-primary-900 underline" href="/admin/user/{{ user.id }}/reset-pw">Passwort zurücksetzen</a> | ||||||
|   | |||||||
| @@ -29,8 +29,8 @@ | |||||||
|   <input id="{{ name }}" name="{{ name }}" type="{{ type }}" {% if required %} required {% endif %} class="relative block w-full rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:z-10 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6" placeholder="{{ label }}"> |   <input id="{{ name }}" name="{{ name }}" type="{{ type }}" {% if required %} required {% endif %} class="relative block w-full rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:z-10 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6" placeholder="{{ label }}"> | ||||||
| {% endmacro input %} | {% endmacro input %} | ||||||
|  |  | ||||||
| {% macro checkbox(label, name, checked=false) %} | {% macro checkbox(label, name, id='', checked=false) %} | ||||||
|   <label for="{{ name }}" class="flex items-center cursor-pointer hover:text-gray-900"> |   <label for="{{ name }}{{ id }}" class="flex items-center cursor-pointer hover:text-gray-900"> | ||||||
|     <input type="checkbox" id="{{ name }}" name="{{ name }}"  {% if checked %} checked {% endif %}  class="h-4 w-4 accent-primary-600 mr-2"/> {{ label }} |     <input type="checkbox" id="{{ name }}{{ id }}" name="{{ name }}"  {% if checked %} checked {% endif %}  class="h-4 w-4 accent-primary-600 mr-2"/> {{ label }} | ||||||
|   </label> |   </label> | ||||||
| {% endmacro checkbox %} | {% endmacro checkbox %} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Marie Birner
					Marie Birner