Explorar o código

Form as a dialog, possibility to specify an introduction message

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2791 a333f486-631f-4898-b8df-5754b55c2be0
romainq %!s(int64=12) %!d(string=hai) anos
pai
achega
fefea6ffe7
Modificáronse 1 ficheiros con 7 adicións e 2 borrados
  1. 7 2
      application/forms.class.inc.php

+ 7 - 2
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("<div id=\"$sDialogId\">");
+		if ($sIntroduction != null)
+		{
+			$oPage->add('<div class="ui-dialog-header">'.$sIntroduction.'</div>');
+		}
 		$this->Render($oPage);
 		$oPage->add('</div>');