{% extends "admin/base.html" %} {# A custom admin page, and the demo of the shadcn components that the generated CRUD screens have no use for: RadioGroup, Switch, and Slider. A ModelAdmin form is built from field types, so it reaches for a and a checkbox; a hand-written page like this is exactly where the richer controls earn their place. See plan/shadcnui-usage.md ยง8 and docs/routing.md. Everything here styles itself through the `ui` global, so this page follows the active theme (and dark mode) with no color literals of its own. #} {% from "admin/components/ui/radio-group.html" import radio_group %} {% from "admin/components/ui/switch.html" import switch %} {% from "admin/components/ui/slider.html" import slider %} {% block title %}Broadcast Message{% endblock %} {% block content %} Broadcast a message Sends a one-off notice to every active user -- a stand-in for a department-facing wizard that isn't resource CRUD. {% if error %} {{ error }} {% endif %} Message {{ radio_group( "urgency", "Urgency", choices=[ {"value": "normal", "label": "Normal", "help": "Queued with everything else."}, {"value": "high", "label": "High", "help": "Jumps the queue and pings on-call."}, ], selected="normal", ) }} {{ switch("also_email", "Also send by email", checked=False, help="In-app only when off.") }} {{ slider("rate", "Throttle", min=10, max=500, step=10, value=100, suffix="/min") }} Send broadcast {% endblock %}
Sends a one-off notice to every active user -- a stand-in for a department-facing wizard that isn't resource CRUD.
{{ error }}