La version 5 de Planète Casio. Regroupe le forum, les programmes, les tutoriel, les sprites et tous les autres outils développés par nos soins.
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.

edit_account.html 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. {% extends "base/base.html" %}
  2. {% block title %}
  3. <a href="{{ url_for('adm') }}">Panneau d'administration</a> » <h1>Édition du compte de {{ user.name }}</h1>
  4. {% endblock %}
  5. {% block content %}
  6. <section class="form">
  7. <a href="/user/{{ user.name }}">Visiter la page de profil de {{ user.name }}</a>
  8. <form action="{{ url_for('adm_edit_account', user_id=user.id) }}" method="post" enctype="multipart/form-data">
  9. {{ form.hidden_tag() }}
  10. <h2>Informations</h2>
  11. <div>
  12. {{ form.avatar.label }}
  13. <div>
  14. <img class="avatar" src="{{ url_for('static', filename=user.avatar) }}" meta="{{ user.avatar }}" />
  15. {{ form.avatar }}
  16. </div>
  17. </div>
  18. <div>
  19. {{ form.username.label }}
  20. {{ form.username(placeholder=user.name) }}
  21. {% for error in form.username.errors %}
  22. <span class="msgerror">{{ error }}</span>
  23. {% endfor %}
  24. </div>
  25. <div>
  26. {{ form.email.label }}
  27. {{ form.email(placeholder=user.email) }}
  28. {% for error in form.email.errors %}
  29. <span class="msgerror">{{ error }}</span>
  30. {% endfor %}
  31. </div>
  32. <div>
  33. {{ form.email_validate.label }}
  34. {{ form.email_validate(checked=True) }}
  35. <div class=desc>{{ form.email_validate.description }}</div>
  36. </div>
  37. <div>
  38. {{ form.password.label }}
  39. <div class=desc>{{ form.password.description }}</div>
  40. {{ form.password(placeholder='************') }}
  41. {% for error in form.password.errors %}
  42. <span class="msgerror">{{ error }}</span>
  43. {% endfor %}
  44. </div>
  45. <h2>Participation</h2>
  46. <div>
  47. {{ form.xp.label }}
  48. {{ form.xp(placeholder=user.xp) }}
  49. {% for error in form.xp.errors %}
  50. <span class="msgerror">{{ error }}</span>
  51. {% endfor %}
  52. </div>
  53. <h2>À propos</h2>
  54. <div>
  55. {{ form.birthday.label }}
  56. {{ form.birthday(value=user.birthday) }}
  57. {% for error in form.birthday.errors %}
  58. <span class="msgerror">{{ error }}</span>
  59. {% endfor %}
  60. </div>
  61. <div>
  62. {{ form.signature.label }}
  63. <textarea id="{{ form.signature.name }}" name="{{ form.signature.name }}">{{ user.signature }}</textarea>
  64. {% for error in form.signature.errors %}
  65. <span class="msgerror">{{ error }}</span>
  66. {% endfor %}
  67. </div>
  68. <div>
  69. {{ form.biography.label }}
  70. <textarea id="{{ form.biography.name }}" name="{{ form.biography.name }}">{{ user.bio }}</textarea>
  71. {% for error in form.biography.errors %}
  72. <span class="msgerror">{{ error }}</span>
  73. {% endfor %}
  74. </div>
  75. <h2>Préférences</h2>
  76. <div>
  77. {{ form.newsletter.label }}
  78. {{ form.newsletter(checked=user.newsletter) }}
  79. <div class=desc>{{ form.newsletter.description }}</div>
  80. {% for error in form.newsletter.errors %}
  81. <span class="msgerror">{{ error }}</span>
  82. {% endfor %}
  83. </div>
  84. <div>{{ form.submit(class_="bg-green") }}</div>
  85. </form>
  86. <hr>
  87. <form action="{{ url_for('adm_edit_account', user_id=user.id) }}" method="post">
  88. {{ trophy_form.hidden_tag() }}
  89. <h2>Trophées</h2>
  90. <div class="trophies-panel">
  91. {% for id, input in trophy_form.__dict__.items() %}
  92. {% if id[0] == "t" %}
  93. <div>
  94. {# TODO: add trophies icons #}
  95. {{ input(checked=id in user_owned) }}
  96. {{ input.label }}
  97. </div>
  98. {% endif %}
  99. {% endfor %}
  100. </div>
  101. <div>{{ trophy_form.submit(class_="bg-green") }}</div>
  102. </form>
  103. <hr>
  104. <h2 style="margin-top:30px;">Supprimer le compte</h2>
  105. <a href="{{ url_for('adm_delete_account', user_id=user.id) }}" class="button bg-red">Supprimer le compte</a>
  106. </section>
  107. {% endblock %}