<TR><TD align="center">' . lang('current_template_draft') . '</TD></TR></TABLE> </TD> </TR> <TR> <TD valign="top" bgcolor="' . $color['list_shade1'] . '">'; if ($item_name == 'profile_form_public') { participant__show_inner_form($edit, array(), false, 'current_template'); } elseif ($item_name == 'profile_form_admin_part') { echo participant__get_inner_admin_form($edit, array(), 'current_template'); } echo ' </TD> <TD valign="top">'; echo '<textarea id="current_draft" name="current_draft" cols=50 rows=40 wrap=virtual>' . $t['item_details']['current_draft'] . '</textarea>'; echo ' </TD><TD valign="top" bgcolor="' . $color['list_shade2'] . '">'; if ($item_name == 'profile_form_public') { participant__show_inner_form($edit, array(), false, 'current_draft'); } elseif ($item_name == 'profile_form_admin_part') { echo participant__get_inner_admin_form($edit, array(), 'current_draft'); } echo ' </TD> </TR> <TR><TD></TD> <TD align="center"> <INPUT class="button" name="edit" type="submit" value="' . lang('save') . '"> </TD> <TD></TD> </TR> </table> </FORM> <BR>'; // hide active button when textarea is changed
function participant__show_admin_form($edit, $button_title = "", $errors, $extra = "") { global $lang, $settings, $color; $out = array(); if (!isset($edit['participant_id'])) { $edit['participant_id'] = ''; } if (!isset($edit['subpool_id'])) { $edit['subpool_id'] = 1; } $subpool = orsee_db_load_array("subpools", $edit['subpool_id'], "subpool_id"); if (!$subpool['subpool_id']) { $subpool = orsee_db_load_array("subpools", 1, "subpool_id"); } $edit['subpool_id'] = $subpool['subpool_id']; $pools = subpools__get_subpools(); foreach ($pools as $p => $pool) { $out['is_subjectpool_' . $p] = false; } $out['is_subjectpool_' . $subpool['subpool_id']] = true; echo '<FORM action="' . thisdoc() . '" method="POST">'; echo '<table border="0">'; echo '<TR><TD valign="top">'; echo '<TABLE class="or_formtable" style="width: 100%; height: 100%; max-width: 100%"><TR><TD>'; // get the participant form participant__show_inner_form($edit, $errors, true); echo '</TD></TR></TABLE>'; echo '</TD><TD valign="top">'; echo '<TABLE class="or_formtable" style="width: 100%; height: 100%; max-width: 100%; background: ' . $color['list_shade2'] . '"><TR><TD>'; echo '<INPUT type="hidden" name="participant_id" value="' . $edit['participant_id'] . '">'; global $hide_header; if (isset($hide_header) && $hide_header) { echo '<INPUT type="hidden" name="hide_header" value="true">'; } $adminformoutput = participant__get_inner_admin_form($edit, $errors); if ($adminformoutput) { echo '<TABLE width="100%"> <TR><TD valign="top" bgcolor="' . $color['list_shade1'] . '">'; echo $adminformoutput; echo '</TD></TR></TABLE>'; } echo '<BR>'; // then show the rest // initialize if (!isset($edit['participant_id'])) { $edit['participant_id'] = '???'; } if (!isset($edit['participant_id_crypt'])) { $edit['participant_id_crypt'] = '???'; } if (isset($edit['creation_time'])) { $tout['creation_time'] = ortime__format($edit['creation_time'], '', lang('lang')); } else { $tout['creation_time'] = ''; } if (!isset($edit['rules_signed'])) { $edit['rules_signed'] = ''; } if (!isset($edit['session_id'])) { $edit['session_id'] = ''; } if (!isset($edit['remarks'])) { $edit['remarks'] = ''; } echo '<table width="100%">'; echo ' <tr><td>' . lang('subpool') . '</td> <td>' . subpools__select_field("subpool_id", $edit['subpool_id']) . '</td></tr>'; echo '<tr><td colspan=2> </td></tr>'; echo ' <tr><td>' . lang('id') . '</td> <td>' . $edit['participant_id'] . ' (' . $edit['participant_id_crypt'] . ')</td></tr> <tr><td>' . lang('creation_time') . '</td> <td>'; if (isset($edit['creation_time'])) { echo ortime__format($edit['creation_time'], '', lang('lang')); } else { echo '???'; } echo ' </td></tr>'; if ($settings['enable_rules_signed_tracking'] == 'y') { echo '<tr><td>' . lang('rules_signed') . '</td> <td>' . participant__rules_signed_form_field($edit['rules_signed']) . '</td></tr>'; } echo '<tr><td valign="top">' . lang('remarks') . '</td> <td>' . participant__remarks_form_field($edit['remarks']) . '</td></tr>'; echo '<tr><td colspan=2> </td></tr>'; echo '<tr><td colspan=2 align=left> ' . participant__add_to_session_checkbox() . ' ' . lang('register_sub_for_session') . '<BR> ' . participant__add_to_session_select($edit['session_id'], $edit['participant_id']) . ' </td></tr>'; echo '</td></tr></table>'; echo '</TD></TR><TR><TD valign="bottom" bgcolor="' . $color['list_shade2'] . '">'; echo '<table> <tr style="outline: 2px solid red;"> <td> <B>' . lang('participant_status') . '</B>: '; if (check_allow('participants_change_status')) { if (!isset($_REQUEST['status_id'])) { $_REQUEST['status_id'] = ""; } if ($_REQUEST['status_id'] == '0') { $hide = array(); } else { $hide = array('0'); } echo '<INPUT type="hidden" name="old_status_id" value="' . $_REQUEST['status_id'] . '">' . participant_status__select_field('status_id', $_REQUEST['status_id'], $hide); } elseif (!$edit['participant_id']) { $default_status = participant_status__get("is_default_active"); $statuses = participant_status__get_statuses(); echo '<INPUT type="hidden" name="status_id" value="' . $default_status . '">' . $statuses[$default_status]['name']; } else { echo participant_status__get_name($_REQUEST['status_id']); } echo '</td></tr></table>'; echo '</td></tr></table>'; echo '</td></tr>'; if (!$button_title) { $button_title = lang('change'); } echo '<tr><td colspan="2" align="center"> <INPUT class="button" name="add" type="submit" value="' . $button_title . '"> </td></tr>'; echo '</table></form>'; }