login/edit: generic setup of input attributes
[minimedit.git] / login / edit.inc.php
index b94fa7cd786a63bc4707bafc1ff374b6aaabbad6..77bfc9b5bd246df94271defa965a27a992841265 100644 (file)
@@ -4,8 +4,10 @@ $cols = [
                'label' => 'login',
                'value' => $user['name'],
                'target' => NULL,
-               'pattern' => "[a-z0-9-]+",
-               'size' => 10,
+               'attr' => [
+                       'pattern' => "[a-z0-9-]+",
+                       'size' => 10,
+               ],
        ],
        'name'  => [
                'label' => 'volledige naam',
@@ -24,6 +26,9 @@ $cols = [
        'avatar' => [
                'label' => 'portretfoto',
                'type' => 'file',
+               'attr' => [
+                       'accept' => "image/jpeg",
+               ],
                'filename' => 'avatar.jpg',
        ],
        'tags' => [