{{/* The profile editor. Admins normally reach it as the config-profile-modal fragment swapped into #config-profile-modal on the Configuration page; it posts via htmx so a validation error re-renders the fragment in place (modal stays open, entered values preserved) and a save sends HX-Redirect back to the config page. The full page below is the no-JS / direct-link fallback, so it carries the same form without the htmx attributes. */}} {{define "title"}}{{if .ProfileID}}Edit profile{{else}}Add profile{{end}} · {{.Org.Name}} · MeshTender{{end}} {{define "header"}}
{{.Org.Name}} · Configuration

{{if .ProfileID}}Edit profile{{else}}Add profile{{end}}

Back to configuration
{{end}} {{define "content"}} {{template "org-tabs" .Nav}} {{template "profile-editor-alerts" .}}
{{template "profile-editor-fields" .}}
Cancel
{{end}} {{/* config-profile-modal is the htmx fragment swapped into #config-profile-modal. */}} {{define "config-profile-modal"}} {{end}} {{/* profile-editor-alerts renders the validation errors and the risky-command warning, shared by the page and the modal. */}} {{define "profile-editor-alerts"}} {{if .Errors}}
Nothing was saved — fix these first:
{{end}} {{if .RiskyWarn}}
Risky commands in this profile

These can take over or brick a node — included on purpose?

{{end}} {{end}} {{/* profile-editor-fields are the form controls themselves — the
element around them differs between the page and the modal. */}} {{define "profile-editor-fields"}}
One command per line; lines starting with # are notes. Put {{"{{ region }}"}} on its own line to insert this organization's region settings there — otherwise they run after all steps.
{{end}}