profile.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. {% extends "base.html" %}
  2. {% block content %}
  3. <div class="mx-auto text-center">
  4. <!------ Profile Information ---------->
  5. <div class="container">
  6. <div class="row">
  7. <div class="col-md-4">
  8. <div class="card">
  9. <div class="card-body">
  10. <div class="d-flex flex-column align-items-center text-center">
  11. {% if user.profile_image %}
  12. <img src="static/uploads/{{ user.profile_image }}" class="user_profile_image_size">
  13. {% else %}
  14. <img src="static/templates/defaultprofileimg.png" class="user_profile_image_size">
  15. {% endif %}
  16. <div class="mt-3">
  17. <h4>{{ user.username }}</h4>
  18. <p class="text-secondary mb-1">{{ user.email }}</p>
  19. <hr>
  20. <!------ Upload Profile Image ---------->
  21. <div class="mt-3">
  22. <p><b>Upload Profile Image</b></p>
  23. <form action="" method="POST" enctype="multipart/form-data">
  24. {{ form2.hidden_tag() }}
  25. {{ form2.upload() }}
  26. <br />
  27. {{ form2.submit() }}
  28. <!--<input
  29. class="input-UploadProfile-Browse"
  30. type="file"
  31. id="profile_image"
  32. name="profile_image"
  33. accept="image/png, image/jpeg"
  34. onchange="form.submit()"
  35. value="Upload"
  36. src="http://example.com/path/to/image.png"
  37. >-->
  38. <p>**Accept Only <b>PNG's</b>, <b>JPEG's</b>**</p>
  39. </form>
  40. </div>
  41. </div>
  42. <!------ Change Password ---------->
  43. <form method="POST">
  44. {{ form.hidden_tag() }}
  45. <div class="card-body">
  46. <hr class="hr_size">
  47. <p><b>Change Password</b></p><br>
  48. <div class="row">
  49. <div class="col-sm-3" class="change_password_location">
  50. <h6 class="mb-0"><label for="password">Current Password</label></h6><br>
  51. </div>
  52. <div class="col-sm-9 text-secondary">
  53. {{ form.cpasswd() }}
  54. <!--<input type="text" id="password" name="password"><br>-->
  55. </div>
  56. </div>
  57. <div class="row">
  58. <div class="col-sm-3" class="change_password_location">
  59. <h6 class="mb-0"><label for="password">New Password</label></h6><br>
  60. </div>
  61. <div class="col-sm-9 text-secondary">
  62. {{ form.passwd_1() }}
  63. <!--<input type="text" id="password" name="password"><br>-->
  64. </div>
  65. </div>
  66. <div class="row">
  67. <div class="col-sm-3" class="change_password_location">
  68. <h6 class="mb-0"><label for="password_confirm">Password<br>(Confirm)</label></h6><br>
  69. </div>
  70. <div class="col-sm-9 text-secondary">
  71. {{ form.passwd_2() }}
  72. <!--<input type="text" id="password_confirm" name="password_confirm">-->
  73. </div>
  74. </div>
  75. <div class="row">
  76. <div class="col-sm-12">
  77. {{ form.submit() }}
  78. <!--<input type="submit" value="Submit" class="btn btn-grey update_password-form-btn"></a>-->
  79. </div>
  80. </div>
  81. <hr class="hr_size">
  82. <p><b>Security(Show 2FA. If the user turns on it, it will show a green tick. If not, it will show a red tick.)</b></p><br>
  83. <div class="row">
  84. <div class="col">
  85. <h6 class="mb-0">
  86. <img src="static/templates/tick_logo.jpg" alt="enable_logo" id="logo" width="12"/>
  87. <img src="static/templates/cross_logo.jpg" alt="disable_logo" id="logo" width="12"/>
  88. <label for="2FA">Two-Factor Authentication (2FA)</label>
  89. </h6>
  90. </div>
  91. </div>
  92. </div>
  93. </form>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. <!------ List of bookmarks you have created ---------->
  99. <div class="col">
  100. <div class="card">
  101. <div class="container">
  102. <ul class="nav nav-pills mb-3 nav-tabs" id="pills-tab" role="tablist">
  103. <li class="nav-item">
  104. <a class="nav-link active" id="art_by_me-tab" data-toggle="tab" href="#art_by_me" role="tab" aria-controls="art_by_me" aria-selected="true">Art By Me</a>
  105. </li>
  106. <li class="nav-item">
  107. <a class="nav-link" id="art_by_own-tab" data-toggle="tab" href="#art_by_own" role="tab" aria-controls="art_by_own" aria-selected="false">Art By Own</a>
  108. </li>
  109. <li class="nav-item">
  110. <a class="nav-link" id="bidding_record-tab" data-toggle="tab" href="#bidding_record" role="tab" aria-controls="bidding_record" aria-selected="false">Bidding Record</a>
  111. </li>
  112. </ul>
  113. <div class="tab-content" id="myTabContent">
  114. <div class="tab-pane fade show active" id="art_by_me" role="tabpanel" aria-labelledby="art_by_me-tab">
  115. <div class="row row-cols-3">
  116. {%for art in my_art%}
  117. <div class="card col-md-4 shadow p-3 mb-5 bg-white rounded" type="button" onclick="window.location.href='{{ url_for('dashboards.modal_profile')}}'">
  118. <img class="image_bid_item_size" src="static/repository/{{art.dname}}">
  119. <div class="row" id="market_item_name_left">
  120. <b>{{art.name}}</b>
  121. </div>
  122. </div>
  123. {% endfor %}
  124. </div>
  125. </div>
  126. <div class="tab-pane fade" id="art_by_own" role="tabpanel" aria-labelledby="art_by_own-tab">.
  127. <div class="row row-cols-3">
  128. {%for art in my_creation%}
  129. <div class="card col-md-4 shadow p-3 mb-5 bg-white rounded" type="button" onclick="window.location.href='{{ url_for('dashboards.modal_profile')}}'">
  130. <img class="image_bid_item_size" src="static/repository/{{art.dname}}">
  131. <div class="row" id="market_item_name_left">
  132. <b>{{art.name}}</b>
  133. </div>
  134. </div>
  135. {% endfor %}
  136. </div>
  137. </div>
  138. <div class="tab-pane fade" id="bidding_record" role="tabpanel" aria-labelledby="bidding_record-tab">
  139. <table class="table">
  140. <thead class="thead-colour">
  141. <tr>
  142. <th>Bidding Art Item Name</th>
  143. <th>Bidding Time(Order by DESC)</th>
  144. <th>Bidding Price</th>
  145. </tr>
  146. </thead>
  147. <tr>
  148. <td>The Krusty Krab</td>
  149. <td>2022-4-3 15:30:00</td>
  150. <td>150</td>
  151. </tr>
  152. <tr>
  153. <td>Chum Bucket</td>
  154. <td>2022-4-2 10:00:00</td>
  155. <td>100</td>
  156. </tr>
  157. </table>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. {% block modal %}{% endblock %}
  167. {% block script %}{% endblock %}
  168. {% endblock %}