|
1 | 1 | import { el, clear, navigate, toast } from "../util.js"; |
2 | | -import { auth, DEMO_USERS } from "../auth.js"; |
| 2 | +import { auth, DEMO_USERS, MUNICIPALITIES } from "../auth.js"; |
3 | 3 |
|
4 | 4 | export function render(root, query = {}) { |
5 | 5 | clear(root); |
@@ -106,11 +106,18 @@ function registerForm() { |
106 | 106 | ]), |
107 | 107 | el("label", { class: "field" }, [ |
108 | 108 | "Myndighed eller organisation", |
109 | | - el("input", { type: "text", name: "organization", placeholder: "f.eks. Aarhus Kommune", autocomplete: "organization" }) |
| 109 | + el("select", { name: "organization", required: true }, [ |
| 110 | + el("option", { value: "", disabled: true, selected: true }, "Vælg myndighed …"), |
| 111 | + ...MUNICIPALITIES.map(m => |
| 112 | + el("option", { value: m.name }, `${m.name} (${m.domain})`) |
| 113 | + ) |
| 114 | + ]), |
| 115 | + el("span", { class: "hint" }, "Kun whitelistede myndigheder. Kontakt os for at få din myndighed tilføjet.") |
110 | 116 | ]), |
111 | 117 | el("label", { class: "field" }, [ |
112 | 118 | "E-mail", |
113 | | - el("input", { type: "email", name: "email", required: true, autocomplete: "email" }) |
| 119 | + el("input", { type: "email", name: "email", required: true, autocomplete: "email" }), |
| 120 | + el("span", { class: "hint" }, "Skal være din arbejdsmail på myndighedens domæne (f.eks. @aarhus.dk).") |
114 | 121 | ]), |
115 | 122 | el("label", { class: "field" }, [ |
116 | 123 | "Adgangskode", |
|
0 commit comments