|
|
 |
 |
 |
mainresponder.discuss.editmessageForm
Increase the size (maximum length) of the subject field in the edit Message form from 40 (60) to 70 (100).
| on editMessageForm (msgNum, flLinkToReferer=false, flShowFileList=false, flShowFileUpload=false, fileprompt=nil, subjectPrompt=nil, bodyPrompt=nil, actionURL="", flLimitSubjectLength=true) |
| |
«Display the edit message form. |
| |
local (pta = html.getPageTableAddress ()) |
| |
«workspace.pt = pta^; edit (@workspace.pt) //debugging |
| |
local (htmlText = "", indentLevel = 0) |
| |
local (flWysEditor = false, flTagEditor = true) |
| |
bundle //figure out which editing tool is preferred |
| |
on translateToEntities (s) |
| |
local (adrMsg = mainResponder.discuss.getMessageTable (msgNum, pta:pta)) |
| |
local (s = string (adrMsg^.body)) |
| |
«bundle //PBS 12/14/00: if this was edited in Radio, return the OPML |
| |
bundle //PBS 05/23/01: if this was edited in Radio, present a warning |
| |
s = translateToEntities (s) //PBS 01/31/00: convert quotes, ampersands, and left carets to HTML entities. |
| |
local (editorText = mainResponder.discuss.getHtmlEditor (s, pta)) |
| |
if not (mainResponder.discuss.memberCanEdit (adrMsg, pta^.adrMemberInfo)) //PBS 6/9/99 |
| |
«if string.lower (adrMsg^.member) != string.lower (nameOf (pta^.adrmemberinfo^)) |
| |
local (enctypeAttrib = "") |
| |
if (editorText == "") or (flTagEditor) |
| |
log.add(tryError, "DABdebug") «08/03/10, 14:09:29 by DAB |
| |
add ("<form name=\"editMessageForm\" method=\"POST\"" + enctypeAttrib + " action=\"" + actionURL + "\" onsubmit=\"setMode(true);document.editMessageForm.body.value = document.frames('idEdit').document.body.innerHTML;\">"); indentLevel++ |
| |
add ("<input type=\"hidden\" name=\"body\">") |
| |
add ("<input type=\"hidden\" name=\"msgNum\" value=\"" + msgNum + "\">") |
| |
local (subject = adrMsg^.subject) |
| |
subject = translateToEntities (subject) //PBS 01/31/00: convert quotes, ampersands, and left carets to HTML entities. |
| |
if subjectprompt == nil //JES 04/10/00: get the default subjectprompt |
| |
else //no subject length limit |
| |
«PBS 02/15/00: possibly add the HTML editor buttons and menus. |
| |
if bodyprompt == nil //JES 04/10/00: get the default bodyprompt |
| |
else //add the HTML editor |
| |
if flOpml //PBS 12/14/00: let mainResponder know that it's an OPML document |
| |
add ("<p><input type=\"submit\" value=\"" + mainResponder.getString ("discuss.postChangesButtonText") + "\">") |
| |
add ("</form>"); indentLevel-- |
| |
«html.setPageTableAddress (@workspace.pt) |
| |
«editMessageForm (22, subjectPrompt:"Subject", bodyPrompt:"Body") |
| |
«html.deletePageTableAddress () |
Relative to Frontier version 9.7b10
|