Ejemplo n.º 1
0
     if ($expired) {
         unset($formData1["notes"]);
         // dont allow new notes to be added
         $renderReadOnlyValue = 'true';
         $renderNotesArrayOptions = array('label' => 'Inspection Notes', 'layout' => 'readonly');
     } else {
         $renderReadOnlyValue = NULL;
         $renderNotesArrayOptions = array('label' => 'Inspection Notes');
     }
     $form->addData($formData1, $_POST);
     $form->addHtml(renderNotes('appointment', $app_id, $renderNotesArrayOptions));
     $form->addHtml($form->addDiv($buttons));
     $form->addSeperator();
     $form->addHtml(renderContactTable($contacts, $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;
 case "Meeting":
     $formData1 = array('app_subject' => array('type' => 'text', 'label' => 'Subject', 'value' => $app["subject"], 'attributes' => array('style' => 'width:400px'), 'required' => 2), 'calendarID' => array('type' => 'select_branch_2', 'label' => 'Branch', 'value' => $app["branch"], 'attributes' => array('class' => 'medium')), 'app_user' => array('type' => 'select_user', 'label' => 'User', '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"], 'group' => 'Start Time', 'attributes' => $timeAttributes), 'app_allday' => array('type' => 'checkbox', 'label' => 'All day', 'value' => $app["allday"], 'options' => array('All day event' => 'Yes'), 'attributes' => array('onClick' => 'allDayCheck(\'app_allday[]\')'), 'group' => 'Start Time', 'last_in_group' => 1), 'app_duration' => array('type' => 'select_duration', 'label' => 'Duration', 'value' => $duration, 'attributes' => array('class' => 'medium')), 'notes' => array('type' => 'textarea', 'label' => 'Add ' . $app["type"] . ' Note', 'attributes' => array('class' => 'noteInput')));
     if ($expired) {
         unset($formData1["notes"]);
         // dont allow new notes to be added
         $renderReadOnlyValue = 'true';
         $renderNotesArrayOptions = array('label' => 'Meeting Notes', 'layout' => 'readonly');
     } else {
         $renderReadOnlyValue = NULL;
Ejemplo n.º 2
0
     $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);
     $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"]) . '\';'));
     $form->addHtml($form->addDiv($buttons));
     $form->addSeperator();
     $form->addHtml(renderVendorTable($vendors, $app_id));
     $form->addHtml(renderAttendeeTable($attendees, $app_id));
     $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;
 case "Meeting":
     $formData1 = array('app_subject' => array('type' => 'text', 'label' => 'Subject', 'value' => $app["subject"], 'attributes' => array('class' => 'wide'), 'required' => 2), 'app_notes' => array('type' => 'textarea', 'label' => 'Notes', 'value' => $app["notes"], 'attributes' => array('class' => 'wide', 'style' => 'height:50px')), 'app_user' => array('type' => 'select_user', 'label' => 'User', 'value' => $app["user"], 'attributes' => array('class' => 'medium')), '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')));
     $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, $_GET);