Code source de Planète Casio https://planet-casio.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

account.html 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. {% extends "base/base.html" %}
  2. {% block title %}
  3. <h1>Gestion du compte</h1>
  4. {% endblock %}
  5. {% block content %}
  6. <section class="form">
  7. <form action="{{ url_for('edit_account') }}" method="post" enctype="multipart/form-data">
  8. {{ form.hidden_tag() }}
  9. <h2>Général</h2>
  10. <div>
  11. {{ form.avatar.label }}
  12. <div>
  13. <img class="avatar" src="{{ url_for('static', filename=current_user.avatar) }}" meta="{{ current_user.avatar }}" />
  14. {{ form.avatar }}
  15. </div>
  16. </div>
  17. <div>
  18. {{ form.email.label }}
  19. {{ form.email(placeholder=current_user.email) }}
  20. {% for error in form.email.errors %}
  21. <span class="msgerror">{{ error }}</span>
  22. {% endfor %}
  23. </div>
  24. <div>
  25. {{ form.password.label }}
  26. {{ form.password(placeholder='************') }}
  27. {% for error in form.password.errors %}
  28. <span class="msgerror">{{ error }}</span>
  29. {% endfor %}
  30. </div>
  31. <div>
  32. {{ form.password2.label }}
  33. {{ form.password2(placeholder='************') }}
  34. {% for error in form.password2.errors %}
  35. <span class="msgerror">{{ error }}</span>
  36. {% endfor %}
  37. </div>
  38. <div>
  39. {{ form.old_password.label }}
  40. {{ form.old_password(placeholder='************') }}
  41. {% for error in form.old_password.errors %}
  42. <span class="msgerror">{{ error }}</span>
  43. {% endfor %}
  44. </div>
  45. <h2>À propos</h2>
  46. <div>
  47. {{ form.birthday.label }}
  48. {{ form.birthday(value=current_user.birthday) }}
  49. {% for error in form.birthday.errors %}
  50. <span class="msgerror">{{ error }}</span>
  51. {% endfor %}
  52. </div>
  53. <div>
  54. {{ form.signature.label }}
  55. <textarea id="{{ form.signature.name }}" name="{{ form.signature.name }}">{{ current_user.signature }}</textarea>
  56. {% for error in form.signature.errors %}
  57. <span class="msgerror">{{ error }}</span>
  58. {% endfor %}
  59. </div>
  60. <div>
  61. {{ form.biography.label }}
  62. <textarea id="{{ form.biography.name }}" name="{{ form.biography.name }}">{{ current_user.bio }}</textarea>
  63. {% for error in form.biography.errors %}
  64. <span class="msgerror">{{ error }}</span>
  65. {% endfor %}
  66. </div>
  67. <h2>Préférences</h2>
  68. <div>
  69. {{ form.newsletter.label }}
  70. {{ form.newsletter(checked=current_user.newsletter) }}
  71. <div style="font-size:80%;color:rgba(0,0,0,.5)">{{ form.newsletter.description }}</div>
  72. {% for error in form.newsletter.errors %}
  73. <span class="msgerror">{{ error }}</span>
  74. {% endfor %}
  75. </div>
  76. <div>{{ form.submit(class_="bg-green") }}</div>
  77. </form>
  78. <h2 style="margin-top:30px;">Supprimer le compte</h2>
  79. <a href="{{ url_for('delete_account') }}" class="button bg-red">Supprimer le compte</a>
  80. </section>
  81. {% endblock %}