} $formData1 = array('fee_outcome' => array('type' => 'radio', 'label' => 'Outcome', 'value' => $fee_outcome, 'required' => 2, 'options' => db_enum("feedback", "fee_outcome", "array")), 'fee_notes' => array('type' => 'textarea', 'label' => 'Notes', 'value' => $fee_notes, 'attributes' => array('class' => 'wide', 'style' => 'height:50px'))); // build table $render = ' <table cellpadding="2" cellspacing="2" border="0"> <tr> <td class="label" valign="top" width="158">Date/Time</td> <td>' . date('l jS F Y G:i', strtotime($app["start"])) . '</td> </tr> <tr> <td class="label" valign="top" width="158">Negotiator</td> <td>' . $app["user_name"] . '</td> </tr> </table> '; $render .= renderViewerTable($viewers, $app_id, 'readonly'); if ($app["notes"]) { $render .= ' <table cellpadding="2" cellspacing="2" border="0"> <tr> <td class="label" valign="top" width="158">Notes</td> <td>' . $app["notes"] . '</td> </tr> </table> '; } $render .= renderAttendeeTable($attendees, $app_id, 'readonly'); $render .= renderDealTable($deals, $app_id, 'feedback'); $form = new Form(); $form->addForm("app_form", "POST", $PHP_SELF); $form->addHtml("<div id=\"standard_form\">\n");
} $formData1 = array('calendarID' => array('type' => 'select_branch_2', 'label' => 'Branch', 'value' => $app["branch"], 'attributes' => array('class' => 'medium')), 'app_user' => array('type' => 'select_user', 'label' => 'Negotiator', 'value' => $app["user"], 'attributes' => array('class' => 'medium'), 'options' => array('' => '(unassigned)')), 'app_date' => array('type' => 'datetime', 'label' => 'Date', 'value' => $app["date"], 'attributes' => array('class' => 'medium', 'readonly' => 'readonly')), 'app_time' => array('type' => 'time', 'label' => 'Start Time', 'value' => $app["time"]), 'app_duration' => array('type' => 'select_duration', 'label' => 'Duration', 'value' => $duration, 'attributes' => array('class' => 'medium'), 'options' => array('format' => 'long')), 'notes' => array('type' => 'textarea', 'label' => 'Add ' . $app["type"] . ' Note', 'value' => $app["notes"], 'attributes' => array('class' => 'noteInput'), 'tooltip' => 'Only notes relating to the viewer(s). Notes that relate to a specific property should be entered on the confirmation page')); if ($expired) { unset($formData1["notes"]); // dont allow new notes to be added $renderReadOnlyValue = 'true'; $renderNotesArrayOptions = array('label' => 'Viewing Notes', 'layout' => 'readonly'); } else { $renderReadOnlyValue = NULL; $renderNotesArrayOptions = array('label' => 'Viewing Notes'); } $form->addData($formData1, $_POST); $form->addHtml(renderNotes('appointment', $app_id, $renderNotesArrayOptions)); $form->addHtml($form->addDiv($buttons)); $form->addSeperator(); $form->addHtml(renderViewerTable($viewers, $app_id, $renderReadOnlyValue)); $form->addHtml(renderAttendeeTable($attendees, $app_id, $renderReadOnlyValue)); $form->addHtml(renderDealTable($deals, $app_id, $in_past)); if (!$expired) { $form->addHtml($form->addDiv($form->makeField("button", $formName, "", "Add Properties", array('class' => 'submit', 'onClick' => 'javascript:document.location.href=\'viewing_add.php?stage=viewing_address&app_id=' . $app_id . '&return=' . urlencode($_GET["searchLink"]) . '\';')))); } $form->addHtml("</fieldset>\n"); $form->addHtml('</div>'); break; /* Valuation many deals(link_deal_to_appointment), many clients(viewer - cli2app), many attendees(use2app) property (link_deal_to_appointment) vendors (link_client_to_instruction) viewers (cli2app) attendees (use2app)
$form = new Form(); $form->addForm("app_form", "POST", $PHP_SELF); $form->addHtml("<div id=\"standard_form\">\n"); $form->addField("hidden", "action", "", "update"); $form->addField("hidden", "app_id", "", $app_id); $form->addField("hidden", "searchLink", "", urlencode($searchLink)); $form->addHtml("<fieldset>\n"); $form->addHtml('<div class="block-header">' . $app["type"] . '</div>'); $form->addData($formData1, $_POST); $form->addHtml(renderNotes('appointment', $app_id, array('label' => 'Viewing Notes'))); $buttons = $form->makeField("submit", $formName, "", "Save Changes", array('class' => 'submit')); $buttons .= $form->makeField("button", "", "", "View in Calendar", array('class' => 'button', 'onClick' => 'javascript:document.location.href=\'calendar.php?app_id=' . $app_id . '&return=' . urlencode($_GET["searchLink"]) . '\';')); $buttons .= $form->makeField("button", "", "", "Delete", array('class' => 'button', 'onClick' => 'javascript:document.location.href=\'appointment_delete.php?app_id=' . $app_id . '&return=' . urlencode($_GET["searchLink"]) . '\';')); $form->addHtml($form->addDiv($buttons)); $form->addSeperator(); $form->addHtml(renderViewerTable($viewers, $app_id)); $form->addHtml(renderAttendeeTable($attendees, $app_id)); if ($in_past) { $form->addHtml(renderDealTable($deals, $app_id, 'feedback')); } else { $form->addHtml(renderDealTable($deals, $app_id)); } $form->addHtml($form->addDiv($form->makeField("button", $formName, "", "Add Properties", array('class' => 'submit', 'onClick' => 'javascript:document.location.href=\'viewing_add.php?stage=viewing_address&app_id=' . $app_id . '&return=' . urlencode($_GET["searchLink"]) . '\';')))); $form->addHtml("</fieldset>\n"); $form->addHtml('</div>'); break; /* Valuation many deals(link_deal_to_appointment), many clients(viewer - cli2app), many attendees(use2app) property (link_deal_to_appointment) vendors (link_client_to_instruction)