user.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {% extends "layout.html" %}
  2. {% block title %}{{email}}{% endblock %}
  3. {% block description %} account information{% endblock %}
  4. {% block head %}
  5. <style>
  6. </style>
  7. {% endblock %}
  8. {% block content %}
  9. <div class="container">
  10. <div class="row justified">
  11. <div class+="content">
  12. <div class="backed col-sm-12 col-md-12 col-lg-12 center justified">
  13. <h1>Account Configuration</h1>
  14. <div class="row justified">
  15. <div class+="content">
  16. <form id="user_form">
  17. <a title="Logout of kinbrio session" class="delete_button" href="/logout">Logout</a>
  18. <hr />
  19. <h3>User Fields</h3>
  20. <label
  21. title="We will send any kinbrio configured system emails to this address - seperate from your matrix accounts configured email if needed."
  22. for="email">System Message Email</label>
  23. <input type="text" name="email" id="email" placeholder="email" value="{{user.email}}" />
  24. <div>
  25. <input title="Save Updated User Information" type="submit" class="add_button"
  26. value="Update User Information" />
  27. </div>
  28. </form>
  29. </div>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. <script>
  36. window.addEventListener('load', function () {
  37. post_form("user_form", "/users/{{user.key}}", data => {
  38. const key = "{{user.key}}";
  39. data.key = key == "" ? "00000000-0000-0000-0000-000000000000" : key;
  40. data.organization_key = "{{user.organization_key}}";
  41. data.email = data.email || "";
  42. data.secret = "";
  43. data.created = data.created || 0;
  44. data.updated = data.updated || 0;
  45. return data;
  46. }, (response_text) => {
  47. const object = JSON.parse(response_text);
  48. window.location.href = `/account`;
  49. });
  50. })
  51. </script>
  52. {% endblock %}