if ($_SESSION["do_crm_action_permission"]->action_permitted('add',8) === true) { ?> <div id="add_note"> <?php echo _('Add Note (use : for loading the emoji and @ for users)'); ?> <br /> <?php $e_add_notes = new Event("Notes->eventAddNotes"); $e_add_notes->addParam("idmodule",$module_id); $e_add_notes->addParam("module",$module); $e_add_notes->addParam("sqrecord",$sqcrm_record_id); echo '<form class="form-horizontal" id="Notes__eventAddNotes" name="Notes__eventAddNotes" method="post" enctype="multipart/form-data">'; echo $e_add_notes->getFormEvent(); ?> <?php FieldType200::display_field('entity_notes','','expand_text_area'); ?> <br /><br /> <?php FieldType21::display_field('note_files'); ?> <br /><br /> <div id="notes_submit"> <input type="submit" class="btn btn-primary" value="<?php echo _('Save');?>"/> </div> </form> </div> <hr class="form_hr"> <?php } ?> <?php
/** * event function to display the note edit form * @param object $evctl * @see class/fields/fieltype/FieldType20.class.php */ function eventAjaxDisplayUpdateNoteField(\EventControler $evctl) { if ((int) $evctl->idnotes > 0) { $this->getId((int) $evctl->idnotes); if ($_SESSION["do_cpaneluser"]->idcpanel_user === $this->idcpanel_user) { $notes = $this->notes; $html = \FieldType200::display_field('entity_notes_edit_' . $this->idnotes, $notes, 'expand_text_area'); $html .= '<br /><input type="button" onclick="edit_notes(\'' . $this->idnotes . '\')" class="btn btn-primary" value="' . _('update') . '"/>'; $html .= ' <input type="button" onclick="close_edit_notes(\'' . $this->idnotes . '\')" class="btn btn-inverse" value="' . _('cancel') . '"/>'; echo $html; } else { echo '0'; } } }