Child: [04356a] (diff)

Download this file

user_preferences.html    108 lines (104 with data), 4.3 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="master_one_col.html" />
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
<title>$c.user.username / Preferences</title>
</head>
<body>
<h1 class="title">User Preferences for $c.user.username</h1>
<div class="content">
<div class="row">
<div class="column grid_12">
<h2>API Token</h2>
<py:if test="api_token">
<p>
<b>API Key:</b><br/>
$api_token.api_key<br/>
<b>Secret Key:</b><br/>
$api_token.secret_key<br/>
</p>
<form method="POST" action="del_api_token">
<input type="submit" value="Delete API Token"
/>
</form>
</py:if>
<py:if test="not api_token">
No API token generated
</py:if>
<form method="POST" action="gen_api_token">
<input type="submit" value="(Re)generate API Token"
/>
</form>
<div style="clear:both"/>
<h2>Subscriptions</h2>
${c.form.display(action='update_subscriptions', value=dict(subscriptions=subscriptions))}
<br/>
<form action="update" method="post">
<ol>
<li>
<label>Display Name</label>
<input type="text" value="$c.user.display_name" name="display_name"/>
</li>
<li>
<label>Email Format</label>
<select name="preferences.email_format">
<option value="plain" selected="${c.user.preferences.email_format == 'plain' or None}">Plain Text</option>
<option value="html" selected="${c.user.preferences.email_format == 'html' or None}">HTML</option>
<option value="both" selected="${c.user.preferences.email_format == 'both' or None}">Combined</option>
</select>
</li>
</ol>
<!-- <input py:for="i,a in enumerate(c.user.email_addresses)"
name="addr-${i}.ord" value="$i" type="hidden"/>
<fieldset>
<legend>Email Addresses</legend>
<table>
<tr>
<th>Primary?</th>
<th>Address</th>
<th>Confirmed</th>
<th></th>
</tr>
<tr py:for="i, a in enumerate(c.user.email_addresses)"
py:with="obj=c.user.address_object(a)">
<td>${radio_button('primary_addr', None, a, c.user.preferences.email_address)}</td>
<td>$a</td>
<td py:if="obj">
<py:if test="obj.confirmed">yes</py:if>
<py:if test="not obj.confirmed">no
(<a href="${g.url('/auth/send_verification_link', a=a)}">verify</a>)
</py:if>
</td>
<td py:if="not obj">Unknown addr obj $a</td>
<td>${submit_button('Delete', 'addr-%s.delete' % i)}</td>
</tr>
</table>
${text_field('new_addr.addr', 'New Address')}
${submit_button('Claim Address', name='new_addr.claim')}
</fieldset> -->
<fieldset>
<legend>OpenIDs Claimed</legend>
<table>
<tr>
<th>OpenID</th>
<th></th>
</tr>
<tr py:for="i, oid in enumerate(c.user.open_ids)"
py:with="obj=c.user.openid_object(oid)">
<td>$oid</td>
<td>${submit_button('Delete', 'oid-%s.delete' % i)}</td>
</tr>
</table>
<a href="/auth/claim_oid">Claim New OpenID</a>
</fieldset>
${submit_button('Save Changes')}
</form>
</div>
</div>
</div>
</body>
</html>