You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this code in the resource update processor will remove the values of existing TVs that are not sent in $scriptProperties['tvs']:
foreach ($tvs as $tv) {
/* set value of TV */
if ($tv->get('type') != 'checkbox') {
$value = isset($scriptProperties['tv'.$tv->get('id')]) ? $scriptProperties['tv'.$tv->get('id')] : $tv->get('default_text');
} else {
$value = isset($scriptProperties['tv'.$tv->get('id')]) ? $scriptProperties['tv'.$tv->get('id')] : '';
}
If the user sends only TVs 1 and 3, TV2 will have its value changed to ''. We could require that all TVs be sent in the argument, but it seems inefficient to make up an array containing all TVs and then process them all when a user only wants to change one or two on a page with many TVs.
The text was updated successfully, but these errors were encountered:
The logic is there mainly to help deal with checkboxes, which don't submit their value if unchecked. This would require a large rewrite of how TV checkboxes are handled; postponing until 2.2.1 or so.
bobray created Redmine issue ID 5965
I believe this code in the resource update processor will remove the values of existing TVs that are not sent in $scriptProperties['tvs']:
foreach ($tvs as $tv) {
/* set value of TV */
if ($tv->get('type') != 'checkbox') {
$value = isset($scriptProperties['tv'.$tv->get('id')]) ? $scriptProperties['tv'.$tv->get('id')] : $tv->get('default_text');
} else {
$value = isset($scriptProperties['tv'.$tv->get('id')]) ? $scriptProperties['tv'.$tv->get('id')] : '';
}
If the user sends only TVs 1 and 3, TV2 will have its value changed to ''. We could require that all TVs be sent in the argument, but it seems inefficient to make up an array containing all TVs and then process them all when a user only wants to change one or two on a page with many TVs.
The text was updated successfully, but these errors were encountered: