summaryrefslogtreecommitdiff
path: root/data/tpl/useredit
blob: f9db7c618c6bcb12ad84d024cd3faa33ac833eb8 (plain)
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
[[= ttabs('u', $d{u}, 'edit') ]]
<h2>[[: $p{PageTitle} ]]</h2>

-[[ if($d{done}) { ]]
<span class="msg">
 Settings succesfully saved.
</span>
[[ } ]]
-[[= cform( [
 { type => 'error' },
 { type => 'startform', action => '/u'.$d{user}.'/edit' },

 { type => 'sub', title => 'General info', short => 'info' },
 { type => 'static', name => 'Username', text => _hchar($d{form}{username}) },
 { type => 'input', name => 'Email', short => 'mail' },

 { type => 'sub', title => 'Change password', short => 'pass' },
 { type => 'static', text => 'Leave blank to keep your current password.' },
 { type => 'pass', name => 'Password', short => 'pass1' },
 { type => 'pass', name => 'Confirm', short => 'pass2' },

 { type => 'sub', title => 'Miscellaneous options', short => 'misc' },
 { type => 'check', short => 'plist',  name => sprintf 'Allow other people to see my visual novel list (<a href="/u%d/list">/u%1$d/list</a>)', $d{user}  },
 { type => 'check', short => 'pign_nsfw', name => 'Disable warnings for images that are not safe for work.' },

 $d{adm} ? (
   { type => 'sub', title => 'Admin', short => 'adm' },
   { type => 'input', name => 'Username', short => 'username' },
   { type => 'select', name => 'Rank', short => 'rank', options => [
     map { { name => $VNDB::VNDBopts{ranks}[0][0][$_], short => $_ } } 1..($#{$VNDB::VNDBopts{ranks}}-1) ] },
 ) : (),

 { type => 'submit', text => 'Save' },
 { type => 'endform' },
], $d{form}) ]]