Browse Source

Portal: enable adding dependent attributes in the request creation form

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2270 a333f486-631f-4898-b8df-5754b55c2be0
romainq 12 years ago
parent
commit
148be21e4c
2 changed files with 7 additions and 4 deletions
  1. 4 2
      application/portalwebpage.class.inc.php
  2. 3 2
      portal/index.php

+ 4 - 2
application/portalwebpage.class.inc.php

@@ -218,8 +218,10 @@ EOF
 	}
 EOF
 );
-		
-	}
+
+		// For Wizard helper to process the ajax replies
+		$this->add('<div id="ajax_content"></div>');
+}
 
 	public function SetCurrentTab($sTabLabel = '')
 	{

+ 3 - 2
portal/index.php

@@ -250,8 +250,9 @@ EOF
 			}
 			$aArgs = array('this' => $oRequest);
 				
-			$aFieldsMap[$sAttCode] = 'attr_'.$sAttCode;
-			$sValue = $oRequest->GetFormElementForField($oP, get_class($oRequest), $sAttCode, $oAttDef, $value, '', 'attr_'.$sAttCode, '', $iFlags, $aArgs);
+			$sInputId = 'attr_'.$sAttCode;
+			$aFieldsMap[$sAttCode] = $sInputId;
+			$sValue = "<span id=\"field_{$sInputId}\">".$oRequest->GetFormElementForField($oP, get_class($oRequest), $sAttCode, $oAttDef, $value, '', 'attr_'.$sAttCode, '', $iFlags, $aArgs).'</span>';
 			$aDetails[] = array('label' => $oAttDef->GetLabel(), 'value' => $sValue);
 		}
 		$aDetails[] = array('label' => Dict::S('Class:Ticket/Attribute:ticket_log'), 'value' => '<textarea id="attr_moreinfo" class="resizable ui-resizable" cols="40" rows="8" name="attr_moreinfo" title="" style="margin: 0px; resize: none; position: static; display: block; height: 145px; width: 339px;">'.$sDescription.'</textarea>');