-?>
- <div id="pass"<?php if ($hide) print ' hidden'; ?>>
- <label for="newpass">Wachtwoord:</label>
- <input type="password" name="oldpass" value="" placeholder="Huidig wachtwoord" />
- <input type="password" name="newpass" value="" placeholder="Nieuw wachtwoord" />
- <input type="password" name="passconf" value="" placeholder="Nogmaals" />
-<?php
- if ($error = @$colwarn['pass']) {
+ else {
+ $attrs = [
+ 'type' => @$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 '<input';
+ foreach ($attrs as $attr => $attrval) {
+ if ($attrval === FALSE) {
+ continue;
+ }
+ print ' ' . $attr;
+ if ($attrval !== TRUE) {
+ printf('="%s"', $attrval);
+ }
+ }
+ print ' />';
+ }
+
+ if ($hide) {
+ print '</span>';
+ }
+
+ if ($error = @$colwarn[$col]) {