<h1>Chopwood: accounts list</h1>
-<form method=POST action='~={script}H'>
+<form method=POST action="~={script}H">
<div class=expand-outer>
<div class=expand-inner>
~={@.service}H: ~={@.friendly}:H~={@.alias}@[ (~H)~]~*~}
</select>
</table>
-<script type'text/javascript'><!--
+<script type="text/javascript"><!--
function check_accounts() {
if (elt('acct-list').selectedIndex == -1)
return 'No accounts selected.';
FORMS.acct = {
elts: ['list'],
check: function () { return null; }
- }
+ }~={allowop.set}:[
+
+ // Password setting is forbidden, so here's a stub function.
+ function check_partial_passwd() { return null; }~;~]
--></script>
</div>
<div class=expand-reference>
-<h2>Set a new password</h2>
+~={allowop.set}:[~;<h2>Set a new password</h2>
<table>
<tr>
<td class=label>
<tr>
<td colspan=3 class=whinge id=set-whinge align=center>OK
</table>
-<script type'text/javascript'><!--
+<script type="text/javascript"><!--
function check_partial_passwd() {
if (elt('set-first').value != '' ||
elt('set-second').value != '')
return null;
}
}
---></script>
+--></script>~2%~]~
-<h2>Generate a new password</h2>
+~={allowop.reset}:[~;<h2>Generate a new password</h2>
<button type=submit id=reset-submit accesskey=g
name=%act value=reset><u>G</u>enerate</button>
<span class=whinge id=reset-whinge>OK</span>
-<script type='text/javascript'><!--
+<script type="text/javascript"><!--
FORMS.reset = {
check: function () {
return check_accounts() || check_partial_passwd();
}
}
---></script>
+--></script>~2%~]~
-<h2>Clear the existing passwords</h2>
+~={allowop.clear}:[~;<h2>Clear the existing passwords</h2>
<button type=submit id=clear-submit accesskey=c
name=%act value=clear><u>C</u>lear</button>
<span class=whinge id=clear-whinge>OK</span>
-<script type='text/javascript'><!--
+<script type="text/javascript"><!--
FORMS.clear = {
check: function () {
return check_accounts() || check_partial_passwd();
}
}
---></script>
+--></script>~2%~]~
</div>
</div>
-<input type=hidden name=%nonce value='~={nonce}H'>
+<input type=hidden name=%user value="~={user}H">
+<input type=hidden name=%nonce value="~={nonce}H">
+</form>
+
+<h2>Log out of Chopwood</h2>
+
+<form method=POST action="~={script}H/logout">
+<button type=submit accesskey=o>Log <u>o</u>ut</button>
+<input type=hidden name=%user value="~={user}H">
+<input type=hidden name=%nonce value="~={nonce}H">
</form>
~1[<!------- That's all, folks ------------------------------------------>~]~