X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/3027600c279ef2be4098028e3c7736a637539e97..0fc1504852e9630502651eaa35c2c04ba777bda3:/login/edit.php
diff --git a/login/edit.php b/login/edit.php
index 4e52506..6dfbfab 100644
--- a/login/edit.php
+++ b/login/edit.php
@@ -124,18 +124,32 @@ foreach ($cols as $col => &$colconf) {
200, $colconf['target'], filemtime($colconf['target'])
);
}
- print " @$colconf['type'] ?: 'text',
+ 'name' => $col,
+ 'id' => $col,
+ 'value' => htmlspecialchars(@$colconf['value']),
+ 'placeholder' => "Niet ingesteld",
+ 'readonly' => empty($colconf['target']),
+ ];
+ if (@$colconf['type'] == 'file') {
+ $attrs['accept'] = "image/jpeg";
+ }
+
+ print ' $attrval) {
+ if ($attrval === FALSE) {
+ continue;
+ }
+ print ' ' . $attr;
+ if ($attrval !== TRUE) {
+ printf('="%s"', $attrval);
+ }
+ }
+ print ' />';
}
- print ' placeholder="Niet ingesteld"';
- print " />";
if ($error = @$colwarn[$col]) {
print " $error\n";