github.com/navikt/knorten@v0.0.0-20240419132333-1333f46ed8b6/templates/team/new.tmpl (about)

     1  {{ define "team/new" }}
     2      {{ template "head" . }}
     3      <article class="bg-white rounded-md p-4">
     4          <h2 class="pb-4">Nytt team</h2>
     5          {{ with .errors }}
     6              {{ . }}
     7          {{ end }}
     8          <form class="flex flex-col gap-4 w-80" action="" method="POST">
     9              <div class="">
    10                  <label for="team" class="navds-form-field__label navds-label">Teamnavn</label>
    11                  <input type="text" name="team" id="team" value="{{ or .team "" }}"
    12                         placeholder="Små bokstaver med bindestrek"
    13                         class="navds-text-field__input navds-body-short navds-body-medium"
    14                  />
    15              </div>
    16              <fieldset id="users">
    17                  <legend class="navds-form-field__label navds-label">Brukere</legend>
    18                  <button type="button" class="mb-4 navds-button navds-button--secondary navds-button--small"
    19                          onClick="addElement()">
    20                      Legg til flere brukere
    21                  </button>
    22              </fieldset>
    23  
    24              <fieldset class="flex gap-2 items-center">
    25                  <button id="submit" type="submit" class="navds-button navds-button--primary bg-surface-action">
    26                          <span class="navds-label">
    27                              Lagre
    28                          </span>
    29                  </button>
    30                  <a href="/oversikt" class="navds-link">Avbryt</a>
    31              </fieldset>
    32          </form>
    33      </article>
    34      <script>
    35          {{ template "team/script" }}
    36          {{ range .form.Users }}
    37          addElement("{{ . }}")
    38          {{ end }}
    39      </script>
    40      {{ template "footer" }}
    41  {{ end }}