profile.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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 class="col-sm-3">Gravatar</label>
  66. <div class="col-sm-4">
  67. <img src="{{ user.gravatar }}" class="profile" width="100" height="100">
  68. </div>
  69. </div>
  70. <div class="form-group">
  71. <div class="col-sm-offset-3 col-sm-4">
  72. <button type="submit" class="btn btn-success">Atualizar Perfil</button>
  73. </div>
  74. </div>
  75. </form>
  76. </div>
  77. </div>
  78. <div class="panel">
  79. <div class="panel-body">
  80. <form method="POST" action="/account?_method=PUT" class="form-horizontal">
  81. <legend>Redefinir Senha</legend>
  82. <div class="form-group">
  83. <label for="password" class="col-sm-3">Nova Senha</label>
  84. <div class="col-sm-7">
  85. <input type="password" name="password" id="password" class="form-control">
  86. </div>
  87. </div>
  88. <div class="form-group">
  89. <label for="confirm" class="col-sm-3">Confirmar Senha</label>
  90. <div class="col-sm-7">
  91. <input type="password" name="confirm" id="confirm" class="form-control">
  92. </div>
  93. </div>
  94. <div class="form-group">
  95. <div class="col-sm-4 col-sm-offset-3">
  96. <button type="submit" class="btn btn-success">Mudar Senha</button>
  97. </div>
  98. </div>
  99. </form>
  100. </div>
  101. </div>
  102. <div class="panel">
  103. <div class="panel-body">
  104. <div class="form-horizontal">
  105. <legend>Redes Sociais</legend>
  106. <div class="form-group">
  107. <div class="col-sm-offset-3 col-sm-4">
  108. {% if user.facebook %}
  109. <p><a href="/unlink/facebook" class="text-danger">Deslogar sua conta do Facebook</a></p>
  110. {% else %}
  111. <p><a href="/auth/facebook">Ligar sua conta do Facebook</a></p>
  112. {% endif %}
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. <div class="panel">
  119. <div class="panel-body">
  120. <form method="POST" action="/account?_method=DELETE" class="form-horizontal">
  121. <legend>Excluir Conta</legend>
  122. <div class="form-group">
  123. <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>
  124. <div class="col-sm-offset-3 col-sm-9">
  125. <button type="submit" class="btn btn-danger">Deletar minha conta</button>
  126. </div>
  127. </div>
  128. </form>
  129. </div>
  130. </div>
  131. </div>
  132. {% endblock %}