{{ $config := (.Context).Value "config" }}
{{ $cfgError := ((.Context).Value "adapter").SetConfig $config }}

{{ template "header" . }}

{{ if $cfgError }}

  <h2>Configuration Error</h2>
  <span class="adapter-error">{{($cfgError).Error}}</span>

{{ else }}

  <h2>Configuration Saved</h2>
  <span class="adapter-success">The adapter configuration has been saved</span>

{{ end }}

{{ template "footer" . }}