anonym_put.tmpl.html 1.0 KB

1234567891011121314151617181920212223242526
  1. {{ define "anonym_put" }}
  2. {{ template "header" }}
  3. <h1>Анонимная запись</h1>
  4. {{ template "links" }}
  5. {{ template "anonym_links" }}
  6. <!-- Помещение в хранилище анонимно -->
  7. <form action="/anonym/put" method="post">
  8. <div class="mb-3">
  9. <label for="key" class="form-label">key</label>
  10. <input type="input" name="key" class="form-control" id="key" aria-describedby="Ключ хранения"
  11. hx-post="/anonym/put_check_key" hx-trigger="input changed delay:500ms" hx-target="#keyHelp">
  12. <div id="keyHelp" class="form-text">Ключ не может быть пустым</div>
  13. </div>
  14. <div class="mb-3">
  15. <label for="val" class="form-label">val</label>
  16. <input name="val" type="input" class="form-control" id="val">
  17. </div>
  18. <button type="submit" class="btn btn-primary">Отправить</button>
  19. <div id="valHelp" class="form-text"></div>
  20. </form>
  21. <br>
  22. {{ if .res}}
  23. res={{.res}}
  24. {{end}}
  25. {{ template "footer" }}
  26. {{ end }}