</label><br /><textarea name='notebody' id = 'notebody' cols='44' rows='10'><?php echo $note->body; ?> </textarea></td> </tr> <tr> <td colspan='2'> <label for="documentNoteTypeID" class="formText"><?php echo _("Note Type:"); ?> </label><br /> <span id='span_noteType'> <?php echo ' <select id="documentNoteTypeID" name="documentNoteTypeID">'; foreach ($documentNoteType->allAsArray() as $display) { if ($note->documentNoteTypeID == $display['documentNoteTypeID']) { echo "\t\t<option value='" . $display['documentNoteTypeID'] . "' selected>" . $display['shortName'] . "</option>"; } else { echo "\t\t<option value='" . $display['documentNoteTypeID'] . "'>" . $display['shortName'] . "</option>"; } } echo ' </select>'; ?> </span> <br /> <span id='span_newNoteType'><a href="javascript:newNoteType();"><?php echo _("add note type"); ?> </a></span> <br />
if (isset($_REQUEST['shortName']) && $_REQUEST['shortName'] != '') { $noteType->documentNoteTypeID = ''; $noteType->shortName = $_REQUEST['shortName']; try { $noteType->save(); } catch (Exception $e) { echo $e->getMessage(); } } /* <select name="note[documentNoteTypeID]" id="noteDocumentNoteTypeID"> <option value="1">Test Type 1</option> <option value="2">Test Type 2</option> <option value="3">Test Type 3</option> <option value="4">Test Type 4</option> </select> */ echo ' <select id="noteDocumentNoteTypeID" name="note[documentNoteTypeID]">'; foreach ($noteType->allAsArray() as $display) { echo "\t\t\t<option value='" . $display['documentNoteTypeID'] . "'>" . $display['shortName'] . "</option>"; } echo ' </select>'; break; //new signature type being added directly on signature form - returns updated drop down list //no longer used.... must add signature types from admin form //new signature type being added directly on signature form - returns updated drop down list //no longer used.... must add signature types from admin form case 'addSignatureType': if (isset($_POST['shortName']) && $_POST['shortName'] != '') { $signatureType = new SignatureType(); $signatureType->signatureTypeID = ''; $signatureType->shortName = $_POST['shortName']; try { $signatureType->save();