From f99ecb40d08f61c36d430c955354fcd0756da0f9 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Fri, 5 Jul 2013 13:54:16 +0000 Subject: [PATCH] Form as a dialog, possibility to specify an introduction message SVN:trunk[2791] --- application/forms.class.inc.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/application/forms.class.inc.php b/application/forms.class.inc.php index 6fb3b4f1a3..180203a001 100644 --- a/application/forms.class.inc.php +++ b/application/forms.class.inc.php @@ -72,7 +72,6 @@ class DesignerForm public function Render($oP, $bReturnHTML = false) { - $sReturn = ''; if ($this->oParentForm == null) { $sFormId = $this->sFormId; @@ -80,6 +79,7 @@ class DesignerForm } else { + $sReturn = ''; $sFormId = $this->oParentForm->sFormId; } $sHiddenFields = ''; @@ -250,12 +250,17 @@ EOF $oP->add($sReturn); } } - public function RenderAsDialog($oPage, $sDialogId, $sDialogTitle, $iDialogWidth, $sOkButtonLabel) + public function RenderAsDialog($oPage, $sDialogId, $sDialogTitle, $iDialogWidth, $sOkButtonLabel, $sIntroduction = null) { $sDialogTitle = addslashes($sDialogTitle); $sOkButtonLabel = addslashes($sOkButtonLabel); $sCancelButtonLabel = Dict::S('UI:Button:Cancel'); + $oPage->add("
"); + if ($sIntroduction != null) + { + $oPage->add('
'.$sIntroduction.'
'); + } $this->Render($oPage); $oPage->add('
');