login/edit: reconfigure size attribute
[minimedit.git] / login / edit.inc.php
1 <?php
2 $cols = [
3         'username' => [
4                 'label' => 'login',
5                 'value' => $user->login,
6                 'target' => NULL,
7                 'attr' => [
8                         'pattern' => "[a-z0-9-]+",
9                         'size' => 10,
10                 ],
11         ],
12         'name'  => [
13                 'label' => 'volledige naam',
14                 'explain' => "Alleen zichtbaar voor andere leden.",
15                 'filter' => ["\n", '; '],
16                 'attr' => [
17                         'size' => 30,
18                 ],
19                 'filename' => 'name.txt',
20         ],
21         'email' => [
22                 'label' => 'e-mailadres',
23                 'type' => 'email',
24                 'explain' => "Voor contact van of met deze site. Wij zullen dit nooit vrij- of doorgeven.",
25                 'attr' => [
26                         'size' => 30,
27                 ],
28                 'filename' => 'email.txt',
29         ],
30         'avatar' => [
31                 'label' => 'portretfoto',
32                 'type' => 'file',
33                 'attr' => [
34                         'accept' => "image/jpeg",
35                 ],
36                 'filename' => 'avatar.jpg',
37         ],
38         'tags' => [
39                 'label' => 'groepen',
40                 'filename' => 'profile/.tags',
41                 'values' => [],
42                 'visible' => 'admin',
43         ],
44 ];
45
46 if (isset($user->pass)) {
47         $cols['newpass'] = [
48                 'label' => 'wachtwoord',
49                 'input' => <<<'EOT'
50                         <input type="password" name="oldpass" value="" placeholder="Huidig wachtwoord" />
51                         <input type="password" id="newpass" name="newpass" value="" placeholder="Nieuw wachtwoord" />
52                         <input type="password" name="passconf" value="" placeholder="Nogmaals" />
53 EOT
54                 ,
55                 'hide'  => 'pass',
56         ];
57 }