| | |
| | | // add some labels to client |
| | | $OUTPUT->add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubjectwarning', 'cancel', |
| | | 'nobodywarning', 'notsentwarning', 'notuploadedwarning', 'savingmessage', 'sendingmessage', |
| | | 'messagesaved', 'converting', 'editorwarning', 'searching', 'uploading', 'fileuploaderror'); |
| | | 'messagesaved', 'converting', 'editorwarning', 'searching', 'uploading', 'fileuploaderror', |
| | | 'autocompletechars'); |
| | | |
| | | // add config parameters to client script |
| | | if (!empty($CONFIG['drafts_mbox'])) { |
| | |
| | | $OUTPUT->set_env('mailbox', $IMAP->get_mailbox_name()); |
| | | $OUTPUT->set_env('sig_above', $CONFIG['sig_above']); |
| | | $OUTPUT->set_env('top_posting', $CONFIG['top_posting']); |
| | | $OUTPUT->set_env('autocomplete_min_length', $CONFIG['autocomplete_min_length']); |
| | | |
| | | // get reference message and set compose mode |
| | | if ($msg_uid = $_SESSION['compose']['param']['reply_uid']) |
| | |
| | | $out .= $msgtype->show(); |
| | | |
| | | // If desired, set this textarea to be editable by TinyMCE |
| | | if ($isHtml) $attrib['class'] = 'mce_editor'; |
| | | $textarea = new html_textarea($attrib); |
| | | $out .= $textarea->show($MESSAGE_BODY); |
| | | if ($isHtml) { |
| | | $attrib['class'] = 'mce_editor'; |
| | | $textarea = new html_textarea($attrib); |
| | | $out .= $textarea->show($MESSAGE_BODY); |
| | | } |
| | | else { |
| | | $textarea = new html_textarea($attrib); |
| | | $out .= $textarea->show(''); |
| | | // quote plain text, inject into textarea |
| | | $table = get_html_translation_table(HTML_SPECIALCHARS); |
| | | $MESSAGE_BODY = strtr($MESSAGE_BODY, $table); |
| | | $out = substr($out, 0, -11) . $MESSAGE_BODY . '</textarea>'; |
| | | } |
| | | |
| | | $out .= $form_end ? "\n$form_end" : ''; |
| | | |
| | | $OUTPUT->set_env('composebody', $attrib['id']); |