if ($existing_record && $user_rights['lock_record_multiform'] && $user_rights['lock_record'] > 0) { //Show link "Lock all forms" print "\t<div style='text-align:center;padding:20px 0 5px;max-width:700px;'>\n\t\t\t\t\t\t<img src='" . APP_PATH_IMAGES . "lock.png'>\n\t\t\t\t\t\t<a style='color:#A86700;font-weight:bold;font-size:12px' href='javascript:;' onclick=\"\n\t\t\t\t\t\t\tlockUnlockForms('{$id}','" . RCView::escape($_GET['id']) . "','','" . $arm . "','1','lock');\n\t\t\t\t\t\t\">{$lang['grid_28']} </a>\n\t\t\t\t\t</div>"; //Show link "Unlock all forms" print "\t<div style='text-align:center;padding:5px 0 0;max-width:700px;'>\n\t\t\t\t\t\t<img src='" . APP_PATH_IMAGES . "lock_open.png'>\n\t\t\t\t\t\t<a style='color:#666;font-weight:bold;font-size:12px' href='javascript:;' onclick=\"\n\t\t\t\t\t\t\tlockUnlockForms('{$id}','" . RCView::escape($_GET['id']) . "','','" . $arm . "','1','unlock');\n\t\t\t\t\t\t\">{$lang['grid_29']}</a>\n\t\t\t\t\t</div>"; } /* ## FORM LOCKING POP-UP FOR E-SIGNATURE if ($user_rights['lock_record'] > 1) { include APP_PATH_DOCROOT . "Locking/esignature_popup.php"; } */ } else { // Get total record count $num_records = Records::getRecordCount(); // Get extra record count in user's data access group, if they are in one if ($user_rights['group_id'] != "") { $sql = "select count(distinct(record)) from redcap_data where project_id = " . PROJECT_ID . " and field_name = '{$table_pk}'" . " and record != '' and record in (" . pre_query("select record from redcap_data where project_id = " . PROJECT_ID . " and field_name = '__GROUPID__' and value = '{$user_rights['group_id']}'") . ")"; $num_records_group = db_result(db_query($sql), 0); } // If more records than a set number exist, do not render the drop-downs due to slow rendering. $search_text_label = $lang['grid_35'] . " " . RCView::escape($table_pk_label); if ($num_records > $maxNumRecordsHideDropdowns) { // If using auto-numbering, then bring back text box so users can auto-suggest to find existing records . // The negative effect of this is that it also allows users to [accidentally] bypass the auto-numbering feature. if ($auto_inc_set) { $search_text_label = $lang['data_entry_121'] . " " . RCView::escape($table_pk_label); } // Give extra note about why drop-down is not being displayed $search_text_label .= RCView::div(array('style' => 'padding:10px 0 0;font-size:10px;font-weight:normal;color:#555;'), $lang['global_03'] . $lang['colon'] . " " . $lang['data_entry_172'] . " " . User::number_format_user($maxNumRecordsHideDropdowns, 0) . " " . $lang['data_entry_173'] . $lang['period']);