} if (PATH_COUNT == 1 && ACTION == 'create') { // URL: /columns?create // Create a new column. define('TAB_SELECTED', 'setup'); define('PAGE_TITLE', 'Create new custom ' . (!empty($_POST['category']) ? strtolower($_POST['category']) : '') . ' data column'); define('LOG_EVENT', 'ColCreate'); // Require manager clearance. lovd_requireAUTH(LEVEL_MANAGER); require ROOT_PATH . 'inc-lib-form.php'; // Let user pick column type first. if (empty($_POST['category'])) { $_T->printHeader(); $_T->printTitle(); $aOptionsList = array('width' => 950, 'options' => array(array('onclick' => 'javascript:$(\'#optionForm input\').attr(\'value\', \'Individual\'); $(\'#optionForm\').submit();', 'option_text' => '<B>Information on the individual, not related to disease</B>, not changing over time, such as date of birth'), array('onclick' => 'javascript:$(\'#optionForm input\').attr(\'value\', \'Phenotype\'); $(\'#optionForm\').submit();', 'option_text' => '<B>Information on the phenotype, related to disease</B>, possibly changing over time, such as blood pressure'), array('onclick' => 'javascript:$(\'#optionForm input\').attr(\'value\', \'Screening\'); $(\'#optionForm\').submit();', 'option_text' => '<B>Information on the detection of new variants</B>, such as detection technique or laboratory conditions'), array('onclick' => 'javascript:$(\'#optionForm input\').attr(\'value\', \'VariantOnGenome\'); $(\'#optionForm\').submit();', 'option_text' => '<B>Information on the variant(s) found, in general or on the genomic level</B>, such as restriction site change'), array('onclick' => 'javascript:$(\'#optionForm input\').attr(\'value\', \'VariantOnTranscript\'); $(\'#optionForm\').submit();', 'option_text' => '<B>Information on the variant(s) found, specific for the transcript level</B>, such as predicted effect on protein level'))); print ' You\'re about to create a new custom data column. This will allow you to define what kind of information you would like to store in the database. Please note that <I>defining</I> this type of information, does not automatically make LOVD store this information. You will need to <I>enable</I> it after defining it, so it actually gets added to the data entry form.<BR><BR>' . "\n" . ' Firstly, please choose what kind of category the new type of data belongs:<BR><BR>' . "\n\n" . ' <FORM id="optionForm" action="' . CURRENT_PATH . '?' . ACTION . '" method="post">' . "\n" . lovd_buildOptionTable($aOptionsList) . ' <INPUT name="category" type="hidden" value="">' . "\n" . ' </FORM>' . "\n\n"; $_T->printFooter(); exit; } require ROOT_PATH . 'class/object_columns.php'; $_DATA = new LOVD_Column(); // Generate a unique workID, that is sortable. if (!isset($_POST['workID'])) { $nTime = gettimeofday(); $_POST['workID'] = $nTime['sec'] . $nTime['usec']; } if (count($_POST) > 2) { lovd_errorClean(); $_DATA->checkFields($_POST); if (!lovd_error()) { // Fields to be used.
$aOptionsList['options'][3]['onclick'] = 'javascript:alert(\'You cannot finish your submission, because no variants were added to this screening!\')'; $aOptionsList['options'][3]['option_text'] = '<B>I want to finish this submission</B>'; } elseif ($sSubmitType == 'individual') { $aOptionsList['options'][3]['onclick'] = 'javascript:if(window.confirm(\'Are you sure you are done with submitting the variants found with this screening?\')){document.location.href=\'submit/individual/' . $zData['individualid'] . '\';}'; $aOptionsList['options'][3]['type'] = 'l'; $aOptionsList['options'][3]['option_text'] = '<B>Back to the individual</B>'; if ($zData['variants_found'] && $zData['variants']) { // If at least one variant has already been submitted, then we can finish as well from here. $aOptionsList['options'][4]['onclick'] = 'submit/finish/individual/' . $zData['individualid']; $aOptionsList['options'][4]['option_text'] = '<B>I want to finish this submission</B>'; } } else { $aOptionsList['options'][3]['onclick'] = 'submit/finish/screening/' . $nID; $aOptionsList['options'][3]['option_text'] = '<B>I want to finish this submission</B>'; } print lovd_buildOptionTable($aOptionsList); /*require ROOT_PATH . 'class/object_genome_variants.php'; $_GET['page_size'] = 10; $_DATA = new LOVD_GenomeVariant(); $_DATA->setRowLink($sViewListID, 'variants/' . $_DATA->sRowID . '?edit&submission=' . $nID); $_GET['search_screeningids'] = $nID; $_GET['search_created_by'] = $_AUTH['id']; print(' <DIV id="container"><BR>' . "\n"); // Extra div is to prevent "No entries in the database yet!" error to show up if there are no genes in the database yet. lovd_showInfoTable('Please select a variant you would like to edit', 'information'); $_DATA->viewList($sViewListID, array('id_', 'owned_by_', 'status'), true); print(' </DIV>' . "\n" . ' <SCRIPT type="text/javascript">' . "\n" . ' $("#container").hide();' . "\n" . ' </SCRIPT>' . "\n");*/ $_T->printFooter(); exit;