Beispiel #1
0
                        echo "<li>{$field->labelText} had {$nv} added at {$time}</li>";
                    } else {
                        echo "<li>{$field->labelText} set to {$nv} at {$time}</li>";
                    }
                }
            }
            echo "</ul>";
        }
        $counter++;
    }
    echo "</ul>";
} else {
    $page = $trial->getPage();
    $data = $trial->record;
    // Get data object from trial record
    $fields = $trial->getFormFields($page);
    // Get fields from DB
    $form->addID('dataEntry');
    $form->processFields($fields, $data, $trial->getUser()->getCentreUnits(), $user->getLanguage());
    // Create form from fields and data object
    if (isset($_SESSION['inputErr'])) {
        // If any errors then add them to the form
        $form->addErrors($_SESSION['inputErr']);
        unset($_SESSION['inputErr']);
    }
    if ($page === 'core' && !$user->isRoot()) {
        $form->makeReadOnly();
    }
    if ($trial->record->isSigned() || $trial->record->isPreSigned()) {
        $form->disableForm();
    }