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

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