From f3c991c2125c574f7317dcbb11b210091d8db7bc Mon Sep 17 00:00:00 2001 From: omar Date: Mon, 12 May 2003 07:32:41 +0000 Subject: [PATCH] Added email address dropdown functionality --- presentation/lookAndFeel/knowledgeTree/documentmanagement/emailBL.php | 8 +++++--- presentation/lookAndFeel/knowledgeTree/documentmanagement/emailUI.inc | 20 ++++++++++++++++---- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/emailBL.php b/presentation/lookAndFeel/knowledgeTree/documentmanagement/emailBL.php index 7cd1068..effc254 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/emailBL.php +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/emailBL.php @@ -55,7 +55,8 @@ if (checkSession()) { $oPatternCustom = & new PatternCustom(); - $oPatternCustom->setHtml(getDocumentEmailPage($oDocument)); + $oUserArray = User::getList(); + $oPatternCustom->setHtml(getDocumentEmailPage($oDocument,$oUserArray)); $main->setErrorMessage("The email address you entered was invalid. Please enter
" . "an email address of the form someone@somewhere.some postfix"); $main->setFormAction($_SERVER["PHP_SELF"] . "?fDocumentID=$fDocumentID&fSendEmail=1"); @@ -67,9 +68,10 @@ if (checkSession()) { //ask for an email address require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); - + + $oUserArray = User::getList(); $oPatternCustom = & new PatternCustom(); - $oPatternCustom->setHtml(getDocumentEmailPage($oDocument)); + $oPatternCustom->setHtml(getDocumentEmailPage($oDocument,$oUserArray)); $main->setCentralPayload($oPatternCustom); $main->setFormAction($_SERVER["PHP_SELF"] . "?fDocumentID=$fDocumentID&fSendEmail=1"); $main->render(); diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/emailUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/emailUI.inc index 2d8aa8f..f3de496 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/emailUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/emailUI.inc @@ -28,13 +28,25 @@ function getDocumentPath($oDocument) { return "
$sDocumentPath
\n"; } -function getDocumentEmailPage($oDocument) { +function getDocumentEmailPage($oDocument,$oUserArray) { global $default; $sToRender = renderHeading("Email document link"); $sToRender .= getDocumentPath($oDocument) . "\n
\n"; - $sToRender .= "\n"; - $sToRender .= "\n"; - $sToRender .= "\n"; + $sToRender .= "
Recipient name:
Email address:(separate multiple addresses with a semicolon)
\n"; + $sToRender .= "\n"; + $sToRender .= "\n"; + $sToRender .= ""; $sToRender .= "\n"; $sToRender .= "\n"; $sToRender .= "
Recipient name:\n"; + $sToRender .= "
Email address:graphicsUrl/widgets/clear.gif\" onclick=\"document.getElementsByName('fToEmail')[0].value='';document.getElementsByName('UserSelect')[0].selectedIndex=0\" onmouseover=\"this.style.cursor='hand'\">
(separate multiple addresses with a semicolon)
  
graphicsUrl/widgets/email.gif\" border=\"0\"/>rootUrl/control.php?action=viewDocument&fDocumentID=" . $oDocument->getID() . "\">graphicsUrl/widgets/cancel.gif\" border=\"0\"/>
\n"; -- libgit2 0.21.4