+ elseif (isset($colconf['values'])) {
+ foreach ($colconf['values'] as $tag => $val) {
+ printf(
+ "\n\t\t" .
+ '<input type="hidden" name="%1$s" value="" />' .
+ '<input type="checkbox" name="%s" value="1" id="%s"%s%s />' .
+ '<label for="%2$s"> %s</label>',
+ "tags[$tag]", "tag-$tag",
+ $val['value'] ? ' checked' : '',
+ isset($val['target']) ? '' : ' readonly',
+ ucfirst($tag)
+ );
+ }
+ }
+ else {
+ $attrs = [
+ 'type' => @$colconf['type'] ?: 'text',
+ 'name' => $col,
+ 'id' => $col,
+ 'value' => htmlspecialchars(@$colconf['value']),
+ 'placeholder' => "Niet ingesteld",
+ 'readonly' => empty($colconf['target']),
+ 'pattern' => @$colconf['pattern'] ?: FALSE,
+ ];
+ if (@$colconf['type'] == 'file') {
+ $attrs['accept'] = "image/jpeg";
+ }