- 'select': array `[ value => label ]` of choices
- 'intcheckbox': value of input element
- 'select_raw': prebuild html string of `<option >` tags
-- 'yesno': array `[ 'label no', 'label yes']`
Each label should be translatable
* 'type', // define the field used in form, and the type of data.
* // one of 'checkbox', 'combobox', 'custom', 'datetime',
* // 'input', 'intcheckbox', 'password', 'radio', 'richtext'
- * // 'select', 'select_raw', 'textarea', 'yesno'
+ * // 'select', 'select_raw', 'textarea'
*
* 'label', // Translatable label of the field
* 'value', // Current value
* // select: array [ value => label ] of choices
* // intcheckbox: value of input element
* // select_raw: prebuild html string of < option > tags
- * // yesno: array [ 'label no', 'label yes']
* ]
*
* See https://github.com/friendica/friendica/wiki/Quick-Template-Guide
if (!is_null($current_storage_backend) && $current_storage_backend != '') {
foreach ($current_storage_backend->getOptions() as $name => $info) {
$type = $info[0];
+ // Backward compatibilty with yesno field description
+ if ($type == 'yesno') {
+ $type = 'checkbox';
+ // Remove translated labels Yes No from field info
+ unset($info[4]);
+ }
+
$info[0] = $storage_form_prefix . '_' . $name;
$info['type'] = $type;
$info['field'] = 'field_' . $type . '.tpl';