|
a |
|
b/qiita_pet/templates/user_profile.html |
|
|
1 |
{%extends sitebase.html%} |
|
|
2 |
{% block head %} |
|
|
3 |
<script type="text/javascript" src="{% raw qiita_config.portal_dir %}/static/vendor/js/jquery.validate.min.js"></script> |
|
|
4 |
<script type="text/javascript" src="{% raw qiita_config.portal_dir %}/static/js/password_validation.js"></script> |
|
|
5 |
<script type="text/javascript"> |
|
|
6 |
$( document ).ready(function() { dualpass_validator(); }); |
|
|
7 |
</script> |
|
|
8 |
{% end %} |
|
|
9 |
|
|
|
10 |
{%block content%} |
|
|
11 |
<div class="row"> |
|
|
12 |
<div class="col-lg-6"> |
|
|
13 |
<h3>User Information</h3> |
|
|
14 |
<form role="form" action="{% raw qiita_config.portal_dir %}/profile/" method="post"> |
|
|
15 |
<input type="hidden" name="action" value="profile"> |
|
|
16 |
{% for form_item in profile %} |
|
|
17 |
<div class="form-group" style="display: flex; flex-direction: column;"> |
|
|
18 |
<div style="display: inline; padding-left: 1em;"> |
|
|
19 |
{% if form_item.id.startswith('social_') %} |
|
|
20 |
<img style="height: 24px; padding-right: 5px;" src="{% raw qiita_config.portal_dir %}/static/img/logo_{% raw form_item.id %}.png"/> |
|
|
21 |
{% end %} |
|
|
22 |
{% raw form_item.label %} |
|
|
23 |
</div> |
|
|
24 |
{% raw form_item(class_='form-control', placeholder=form_item.description) %} |
|
|
25 |
{% if form_item.errors %} |
|
|
26 |
<div style='color: #ff0000; padding-left: 10px;'>{% for e in form_item.errors %}{%raw e%}<br/>{% end %}</div> |
|
|
27 |
{% end %} |
|
|
28 |
</div> |
|
|
29 |
{% end %} |
|
|
30 |
{%if creation_timestamp is not None %} |
|
|
31 |
<div style="padding-left: 1em; padding-bottom: 1em; color: grey;">account created on {{creation_timestamp}}</div> |
|
|
32 |
{% end %} |
|
|
33 |
<div style="color:{% if msg.startswith('ERROR:') %}red{% else %}darkgreen{% end %};">{{msg}}</div> |
|
|
34 |
<button type="submit" class="btn btn-success">Save Edits</button> |
|
|
35 |
</form> |
|
|
36 |
</div> |
|
|
37 |
<div class="col-lg-6"> |
|
|
38 |
<h3>Change Password</h3> |
|
|
39 |
<form role="form" action="{% raw qiita_config.portal_dir %}/profile/" method="post" id="change_pass" name="change_pass" class="dualpass"> |
|
|
40 |
<input type="hidden" name="action" value="password"> |
|
|
41 |
<div class="form-group"> |
|
|
42 |
<label for="oldpass" class="col-sm-10 control-label">Old Password</label> |
|
|
43 |
<input type="password" class="form-control" id="oldpass" name="oldpass"> |
|
|
44 |
</div> |
|
|
45 |
<div class="form-group"> |
|
|
46 |
<label for="newpass" class="col-sm-10 control-label">New Password</label> |
|
|
47 |
<input type="password" class="form-control" id="newpass" name="newpass"> |
|
|
48 |
</div> |
|
|
49 |
<div class="form-group"> |
|
|
50 |
<label for="newpass2" class="col-sm-10 control-label">Repeat New Password</label> |
|
|
51 |
<input type="password" class="form-control" id="newpass2" name="newpass2"> |
|
|
52 |
</div> |
|
|
53 |
<div style="color:red;">{{passmsg}}</div> |
|
|
54 |
<button class="btn btn-danger">Change Password</button> |
|
|
55 |
</form> |
|
|
56 |
</div> |
|
|
57 |
</div> |
|
|
58 |
{%end%} |