settings.eta 864 B

123456789101112131415161718192021222324252627
  1. <% layout("/sk/layout") %>
  2. <%~ include("/sk/partials/topbar") %>
  3. <h2>nastavenia</h2>
  4. <% const errorValue = it.error?.split('.').reduce((a, b) => a[b], it.lang.settings?.errors)?.(it?.errorDetails) %>
  5. <% if (typeof errorValue === "string") { %>
  6. <div class="message error">
  7. <p><%= errorValue %></p>
  8. </div>
  9. <% } %>
  10. <form action="/settings" method="post">
  11. <div>
  12. <input type="checkbox" id="postDataEnabled" name="postDataEnabled" <%= it.postDataEnabled !== "false" ? `checked` : `` %> value="true">
  13. <label for="postDataEnabled">odosielať dáta</label>
  14. </div>
  15. <div>
  16. <label for="cloudURL">cloud url</label>
  17. <input type="text" id="cloudURL" name="cloudURL" placeholder="wss://meteostanica.com" value="<%= it.cloudURL ?? `wss://meteostanica.com` %>">
  18. </div>
  19. <button type="submit">uložiť</button>
  20. </form>