profile.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. {% set title = "Minha Conta" %}
  2. {% extends 'layout.html' %}
  3. {% block body %}
  4. <div class="container">
  5. <div class="panel">
  6. <div class="panel-body">
  7. {% if messages.success %}
  8. <div role="alert" class="alert alert-success">
  9. {% for success in messages.success %}
  10. <div>{{ success.msg }}</div>
  11. {% endfor %}
  12. </div>
  13. {% endif %}
  14. {% if messages.error %}
  15. <div role="alert" class="alert alert-danger">
  16. {% for error in messages.error %}
  17. <div>{{ error.msg }}</div>
  18. {% endfor %}
  19. </div>
  20. {% endif %}
  21. <form method="POST" action="/account?_method=PUT" class="form-horizontal">
  22. <legend>Informações pessoais</legend>
  23. <div class="form-group">
  24. <label for="email" class="col-sm-3">E-mail</label>
  25. <div class="col-sm-7">
  26. <input type="email" name="email" id="email" class="form-control" value="{{ user.email }}">
  27. </div>
  28. </div>
  29. <div class="form-group">
  30. <label for="email" class="col-sm-3">Username</label>
  31. <div class="col-sm-7">
  32. <input type="username" name="username" id="username" class="form-control" value="{{ user.username }}">
  33. </div>
  34. </div>
  35. <div class="form-group">
  36. <label for="name" class="col-sm-3">Nome</label>
  37. <div class="col-sm-7">
  38. <input type="text" name="name" id="name" class="form-control" value="{{ user.name }}">
  39. </div>
  40. </div>
  41. <!-- <div class="form-group">
  42. <label class="col-sm-3">Gênero</label>
  43. <div class="col-sm-3">
  44. <label class="radio-inline radio col-sm-3">
  45. <input type="radio" name="gender" value="male" {% if user.gender == 'male' %}checked{% endif %}><span>Masculino</span>
  46. </label>
  47. <label class="radio-inline col-sm-3">
  48. <input type="radio" name="gender" value="female" {% if user.gender == 'female' %}checked{% endif %}><span>Female</span>
  49. </label>
  50. </div>
  51. </div> -->
  52. <div class="form-group">
  53. <label for="location" class="col-sm-3">Local</label>
  54. <div class="col-sm-7">
  55. <input type="text" name="location" id="location" class="form-control" value="{{ user.location }}">
  56. </div>
  57. </div>
  58. <div class="form-group">
  59. <label for="website" class="col-sm-3">Website</label>
  60. <div class="col-sm-7">
  61. <input type="text" name="website" id="website" class="form-control" value="{{ user.website }}">
  62. </div>
  63. </div>
  64. <div class="form-group">
  65. <label for="website" class="col-sm-3">Imagem de Capa (URL)</label>
  66. <div class="col-sm-7">
  67. <input type="text" name="cover_picture" id="cover_picture" class="form-control" value="{{ user.cover_picture }}">
  68. </div>
  69. </div>
  70. <div class="form-group">
  71. <label class="col-sm-3">Gravatar</label>
  72. <div class="col-sm-4">
  73. <img src="{{ user.gravatar }}" class="profile" width="100" height="100">
  74. </div>
  75. </div>
  76. <div class="form-group">
  77. <div class="col-sm-offset-3 col-sm-4">
  78. <button type="submit" class="btn btn-success">Atualizar Perfil</button>
  79. </div>
  80. </div>
  81. </form>
  82. </div>
  83. </div>
  84. <div class="panel">
  85. <div class="panel-body">
  86. <form method="POST" action="/account?_method=PUT" class="form-horizontal">
  87. <legend>Redefinir Senha</legend>
  88. <div class="form-group">
  89. <label for="password" class="col-sm-3">Nova Senha</label>
  90. <div class="col-sm-7">
  91. <input type="password" name="password" id="password" class="form-control">
  92. </div>
  93. </div>
  94. <div class="form-group">
  95. <label for="confirm" class="col-sm-3">Confirmar Senha</label>
  96. <div class="col-sm-7">
  97. <input type="password" name="confirm" id="confirm" class="form-control">
  98. </div>
  99. </div>
  100. <div class="form-group">
  101. <div class="col-sm-4 col-sm-offset-3">
  102. <button type="submit" class="btn btn-success">Mudar Senha</button>
  103. </div>
  104. </div>
  105. </form>
  106. </div>
  107. </div>
  108. <div class="panel">
  109. <div class="panel-body">
  110. <div class="form-horizontal">
  111. <legend>Redes Sociais</legend>
  112. <div class="form-group">
  113. <div class="col-sm-offset-3 col-sm-4">
  114. {% if user.facebook %}
  115. <p><a href="/unlink/facebook" class="text-danger">Deslogar sua conta do Facebook</a></p>
  116. {% else %}
  117. <p><a href="/auth/facebook">Ligar sua conta do Facebook</a></p>
  118. {% endif %}
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. <div class="panel">
  125. <div class="panel-body">
  126. <form method="POST" action="/account?_method=DELETE" class="form-horizontal">
  127. <legend>Excluir Conta</legend>
  128. <div class="form-group">
  129. <p class="col-sm-offset-3 col-sm-9">Você pode excluir sua conta de usuário, mas saiba que isso não pode ser desfeito.</p>
  130. <div class="col-sm-offset-3 col-sm-9">
  131. <button type="submit" class="btn btn-danger">Deletar minha conta</button>
  132. </div>
  133. </div>
  134. </form>
  135. </div>
  136. </div>
  137. </div>
  138. {% endblock %}