import json from django import forms from django.utils.html import escape from django.utils.safestring import mark_safe from apps.account.models.role import Role, PERMISSION_CATEGORIES, ALL_PERMISSION_FIELDS CATEGORY_ICONS = { "Identity & Profiles": "badge", "Chat & Communications": "forum", "CMS & Articles": "article", "LMS & Academics": "school", "Meetings": "video_camera_front", "Events": "event", "Community Projects": "task_alt", "Donations & Charity": "volunteer_activism", "Support & Tickets": "confirmation_number", "Dynamic Forms": "dynamic_form", "Diplomacy & Institutional": "public", "Administration & Security": "admin_panel_settings", } class GroupPillSelectMultipleWidget(forms.CheckboxSelectMultiple): """ Renders Django auth Groups as modern, interactive clickable pill cards. Replaces the cumbersome dual-listbox with instant one-click toggle chips. """ def render(self, name, value, attrs=None, renderer=None): if value is None: value = [] elif isinstance(value, str): value = [value] else: value = [str(v) for v in value] attrs = attrs or {} output = [ '
Permissions are automatically inherited from the user's Assigned Role. You can selectively override any permission below.