'; $num = 0; $additionals = $dbo->fetchArray('SELECT * FROM zz_group_module WHERE idmodule='.prepare($record['id']).' ORDER BY `id` ASC'); foreach ($additionals as $num => $additional) { $editable = !($additional['default'] && $enable_readonly); echo '
{[ "type": "textarea", "label": "'.tr('Query').'", "name": "query['.$num.']", "value": "'.prepareToField($additional['clause']).'"'; if (!$editable) { echo ', "readonly": '.(!$editable).''; } echo ' ]}
{[ "type": "text", "label": "'.tr('Name').'", "name": "name['.$num.']", "value": "'.$additional['name'].'" ]}
{[ "type": "select", "label": "'.tr('Gruppo').'", "name": "gruppo['.$num.']", "values": "query=SELECT id, nome AS descrizione FROM zz_groups ORDER BY id ASC", "value": "'.$additional['idgruppo'].'", "readonly": '.(!$editable).' ]}
{[ "type": "select", "label": "'.tr('Posizione').'", "name": "position['.$num.']", "values": "list=\"0\":\"'.tr('WHERE').'\",\"1\": \"'.tr('HAVING').'\"", "value": "'.$additional['position'].'", "readonly": '.(!$editable).' ]}
'; } echo '
'; echo '

'.tr('Nuovo filtro').'

{[ "type": "textarea", "label": "'.tr('Query').'", "name": "query[-id-]" ]}
{[ "type": "text", "label": "'.tr('Nome').'", "name": "name[-id-]" ]}
{[ "type": "select", "label": "'.tr('Gruppo').'", "name": "gruppo[-id-]", "values": "query=SELECT id, nome AS descrizione FROM zz_groups ORDER BY id ASC" ]}
{[ "type": "select", "label": "'.tr('Posizione').'", "name": "position[-id-]", "values": "list=\"0\":\"'.tr('WHERE').'\",\"1\": \"'.tr('HAVING').'\"" ]}
'; echo ' ';