diff --git a/application/dashboard.class.inc.php b/application/dashboard.class.inc.php index 8d1fa7460..4970f6c38 100644 --- a/application/dashboard.class.inc.php +++ b/application/dashboard.class.inc.php @@ -178,10 +178,10 @@ abstract class Dashboard public function RenderProperties($oPage) { // menu to pick a layout and edit other properties of the dashboard - $oPage->add('

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper.
Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim. Pellentesque congue. Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede. Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit. Ut velit mauris, egestas sed, gravida nec, ornare ut, mi. Aenean ut orci vel massa suscipit pulvinar. Nulla sollicitudin. Fusce varius, ligula non tempus aliquam, nunc turpis ullamcorper nibh, in tempus sapien eros vitae ligula. Pellentesque rhoncus nunc et augue.
Integer id felis. Curabitur aliquet pellentesque diam. Integer quis metus vitae elit lobortis egestas. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi vel erat non mauris convallis vehicula. Nulla et sapien. Integer tortor tellus, aliquam faucibus, convallis id, congue eu, quam. Mauris ullamcorper felis vitae erat. Proin feugiat, augue non elementum posuere, metus purus iaculis lectus, et tristique ligula justo vitae magna. Aliquam convallis sollicitudin purus. Praesent aliquam, enim at fermentum mollis, ligula massa adipiscing nisl, ac euismod nibh nisl eu lectus. Fusce vulputate sem at sapien. Vivamus leo. Aliquam euismod libero eu enim. Nulla nec felis sed leo placerat imperdiet.
Aenean suscipit nulla in justo. Suspendisse cursus rutrum augue. Nulla tincidunt tincidunt mi. Curabitur iaculis, lorem vel rhoncus faucibus, felis magna fermentum augue, et ultricies lacus lorem varius purus. Curabitur eu amet.
"; + $this->aProperties['text'] = Dict::S('UI:DashletPlainText:Prop-Text:Default'); } public function Render($oPage, $bEditMode = false, $aExtraParams = array()) { - $sText = $this->aProperties['text']; + $sText = htmlentities($this->aProperties['text'], ENT_QUOTES, 'UTF-8'); - $sId = 'richtext_'.($bEditMode? 'edit_' : '').$this->sId; + $sId = 'plaintext_'.($bEditMode? 'edit_' : '').$this->sId; $oPage->add('Please enter a valid OQL query
'); - } - elseif ($sGroupBy == '') - { - $oPage->add('Please select the field on which the objects will be grouped together
'); + $sAttCode = $aMatches[1]; + $sFunction = $aMatches[2]; } else { - $oFilter = DBObjectSearch::FromOQL($sQuery); - $sClassAlias = $oFilter->GetClassAlias(); - - if (preg_match('/^(.*):(.*)$/', $sGroupBy, $aMatches)) + $sAttCode = $sGroupBy; + $sFunction = null; + } + if (!MetaModel::IsValidAttCode($sClass, $sAttCode)) + { + $oPage->add(''.Dict::S('UI:DashletGroupBy:MissingGroupBy').'
'); + } + else + { + $sAttLabel = MetaModel::GetLabel($sClass, $sAttCode); + if (!is_null($sFunction)) { - $sAttCode = $aMatches[1]; $sFunction = $aMatches[2]; - switch($sFunction) { case 'hour': - $sGroupByLabel = 'Hour of '.$sAttCode. ' (0-23)'; - $sGroupByExpr = "DATE_FORMAT($sClassAlias.$sAttCode, '%H')"; // 0 -> 31 + $sGroupByLabel = Dict::Format('UI:DashletGroupBy:Prop-GroupBy:Hour', $sAttLabel); + $sGroupByExpr = "DATE_FORMAT($sClassAlias.$sAttCode, '%H')"; // 0 -> 23 break; case 'month': - $sGroupByLabel = 'Month of '.$sAttCode. ' (1 - 12)'; + $sGroupByLabel = Dict::Format('UI:DashletGroupBy:Prop-GroupBy:Month', $sAttLabel); $sGroupByExpr = "DATE_FORMAT($sClassAlias.$sAttCode, '%m')"; // 0 -> 31 break; case 'day_of_week': - $sGroupByLabel = 'Day of week for '.$sAttCode. ' (sunday to saturday)'; + $sGroupByLabel = Dict::Format('UI:DashletGroupBy:Prop-GroupBy:DayOfWeek', $sAttLabel); $sGroupByExpr = "DATE_FORMAT($sClassAlias.$sAttCode, '%w')"; break; case 'day_of_month': - $sGroupByLabel = 'Day of month for'.$sAttCode; + $sGroupByLabel = Dict::Format('UI:DashletGroupBy:Prop-GroupBy:DayOfMonth', $sAttLabel); $sGroupByExpr = "DATE_FORMAT($sClassAlias.$sAttCode, '%e')"; // 0 -> 31 break; @@ -454,10 +474,8 @@ abstract class DashletGroupBy extends Dashlet } else { - $sAttCode = $sGroupBy; - $sGroupByExpr = $sClassAlias.'.'.$sAttCode; - $sGroupByLabel = MetaModel::GetLabel($oFilter->GetClass(), $sAttCode); + $sGroupByLabel = $sAttLabel; } switch($sStyle) @@ -507,57 +525,65 @@ abstract class DashletGroupBy extends Dashlet } } + protected function GetGroupByOptions($sOql) + { + $oSearch = DBObjectSearch::FromOQL($sOql); + $sClass = $oSearch->GetClass(); + $aGroupBy = array(); + foreach(MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef) + { + if (!$oAttDef->IsScalar()) continue; // skip link sets + if ($oAttDef instanceof AttributeFriendlyName) continue; + if ($oAttDef instanceof AttributeExternalField) continue; + + $sLabel = $oAttDef->GetLabel(); + $aGroupBy[$sAttCode] = $sLabel; + + if ($oAttDef instanceof AttributeDateTime) + { + $aGroupBy[$sAttCode.':hour'] = Dict::Format('UI:DashletGroupBy:Prop-GroupBy:Select-Hour', $sLabel); + $aGroupBy[$sAttCode.':month'] = Dict::Format('UI:DashletGroupBy:Prop-GroupBy:Select-Month', $sLabel); + $aGroupBy[$sAttCode.':day_of_week'] = Dict::Format('UI:DashletGroupBy:Prop-GroupBy:Select-DayOfWeek', $sLabel); + $aGroupBy[$sAttCode.':day_of_month'] = Dict::Format('UI:DashletGroupBy:Prop-GroupBy:Select-DayOfMonth', $sLabel); + } + } + asort($aGroupBy); + return $aGroupBy; + } + public function GetPropertiesFields(DesignerForm $oForm) { - $oField = new DesignerTextField('title', 'Title', $this->aProperties['title']); + $oField = new DesignerTextField('title', Dict::S('UI:DashletGroupBy:Prop-Title'), $this->aProperties['title']); $oForm->AddField($oField); - $oField = new DesignerLongTextField('query', 'Query', $this->aProperties['query']); + $oField = new DesignerLongTextField('query', Dict::S('UI:DashletGroupBy:Prop-Query'), $this->aProperties['query']); + $oField->SetMandatory(); $oForm->AddField($oField); try { // Group by field: build the list of possible values (attribute codes + ...) - $oSearch = DBObjectSearch::FromOQL($this->aProperties['query']); - $sClass = $oSearch->GetClass(); - $aGroupBy = array(); - foreach(MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef) - { - if (!$oAttDef->IsScalar()) continue; // skip link sets + $aGroupBy = $this->GetGroupByOptions($this->aProperties['query']); - $sLabel = $oAttDef->GetLabel(); - if ($oAttDef->IsExternalKey(EXTKEY_ABSOLUTE)) - { - $sLabel = $oAttDef->GetLabel().' (strict)'; - } - - $aGroupBy[$sAttCode] = $sLabel; - - if ($oAttDef instanceof AttributeDateTime) - { - $aGroupBy[$sAttCode.':hour'] = $oAttDef->GetLabel().' (hour)'; - $aGroupBy[$sAttCode.':month'] = $oAttDef->GetLabel().' (month)'; - $aGroupBy[$sAttCode.':day_of_week'] = $oAttDef->GetLabel().' (day of week)'; - $aGroupBy[$sAttCode.':day_of_month'] = $oAttDef->GetLabel().' (day of month)'; - } - } - - $oField = new DesignerComboField('group_by', 'Group by', $this->aProperties['group_by']); + $oField = new DesignerComboField('group_by', Dict::S('UI:DashletGroupBy:Prop-GroupBy'), $this->aProperties['group_by']); + $oField->SetMandatory(); $oField->SetAllowedValues($aGroupBy); } catch(Exception $e) { - $oField = new DesignerTextField('group_by', 'Group by', $this->aProperties['group_by']); + $oField = new DesignerTextField('group_by', Dict::S('UI:DashletGroupBy:Prop-GroupBy'), $this->aProperties['group_by']); + $oField->SetReadOnly(); } $oForm->AddField($oField); $aStyles = array( - 'pie' => 'Pie chart', - 'bars' => 'Bar chart', - 'table' => 'Table', + 'pie' => Dict::S('UI:DashletGroupByPie:Label'), + 'bars' => Dict::S('UI:DashletGroupByBars:Label'), + 'table' => Dict::S('UI:DashletGroupByTable:Label'), ); - $oField = new DesignerComboField('style', 'Style', $this->aProperties['style']); + $oField = new DesignerComboField('style', Dict::S('UI:DashletGroupBy:Prop-Style'), $this->aProperties['style']); + $oField->SetMandatory(); $oField->SetAllowedValues($aStyles); $oForm->AddField($oField); } @@ -616,10 +642,11 @@ abstract class DashletGroupBy extends Dashlet static public function GetInfo() { + // Note: no need to translate, should never be visible to the end-user! return array( 'label' => 'Objects grouped by...', 'icon' => 'images/dashlet-object-grouped.png', - 'description' => 'Grouped objects dashlet', + 'description' => 'Grouped objects dashlet (abstract)', ); } @@ -628,44 +655,32 @@ abstract class DashletGroupBy extends Dashlet return true; } - public function GetPropertiesFieldsFromOQL(DesignerForm $oForm, $sOQL) + public function GetPropertiesFieldsFromOQL(DesignerForm $oForm, $sOQL = null) { - $oField = new DesignerTextField('title', 'Title', ''); + $oField = new DesignerTextField('title', Dict::S('UI:DashletGroupBy:Prop-Title'), ''); $oForm->AddField($oField); - $oField = new DesignerHiddenField('query', 'Query', $sOQL); + $oField = new DesignerHiddenField('query', Dict::S('UI:DashletGroupBy:Prop-Query'), $sOQL); + $oField->SetMandatory(); $oForm->AddField($oField); - try + if (!is_null($sOQL)) { - // Group by field: build the list of possible values (attribute codes + ...) - $oSearch = DBObjectSearch::FromOQL($this->aProperties['query']); - $sClass = $oSearch->GetClass(); - $aGroupBy = array(); - foreach(MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef) - { - if (!$oAttDef->IsScalar()) continue; // skip link sets - if ($oAttDef->IsExternalKey(EXTKEY_ABSOLUTE)) continue; // skip external keys - $aGroupBy[$sAttCode] = $oAttDef->GetLabel(); - - if ($oAttDef instanceof AttributeDateTime) - { - //date_format(start_date, '%d') - $aGroupBy['date_of_'.$sAttCode] = 'Day of '.$oAttDef->GetLabel(); - } - - } - $oField = new DesignerComboField('group_by', 'Group by', $this->aProperties['group_by']); + $oField = new DesignerComboField('group_by', Dict::S('UI:DashletGroupBy:Prop-GroupBy'), null); + $aGroupBy = $this->GetGroupByOptions($sOQL); $oField->SetAllowedValues($aGroupBy); } - catch(Exception $e) + else { - $oField = new DesignerTextField('group_by', 'Group by', $this->aProperties['group_by']); + // Creating a form for reading parameters! + $oField = new DesignerTextField('group_by', Dict::S('UI:DashletGroupBy:Prop-GroupBy'), null); } + $oField->SetMandatory(); $oForm->AddField($oField); $oField = new DesignerHiddenField('style', '', $this->aProperties['style']); + $oField->SetMandatory(); $oForm->AddField($oField); } } @@ -681,69 +696,9 @@ class DashletGroupByPie extends DashletGroupBy static public function GetInfo() { return array( - 'label' => 'Pie Chart', + 'label' => Dict::S('UI:DashletGroupByPie:Label'), 'icon' => 'images/dashlet-pie-chart.png', - 'description' => 'Pie Chart', - ); - } -} -class DashletGroupByPie2 extends DashletGroupByPie -{ - public function Render($oPage, $bEditMode = false, $aExtraParams = array()) - { - $sTitle = addslashes($this->aProperties['title']); - - $sQuery = $this->aProperties['query']; - $sGroupBy = $this->aProperties['group_by']; - - $oSearch = DBObjectSearch::FromOQL($sQuery); - $sClassAlias = $oSearch->GetClassAlias(); - $aQueryParams = array(); - - $aGroupBy = array(); - $oGroupByExp = Expression::FromOQL($sClassAlias.'.'.$sGroupBy); - $aGroupBy['grouped_by_1'] = $oGroupByExp; - $sSql = MetaModel::MakeGroupByQuery($oSearch, $aQueryParams, $aGroupBy); - $aRes = CMDBSource::QueryToArray($sSql); - - $aGroupBy = array(); - $aLabels = array(); - $iTotalCount = 0; - foreach ($aRes as $aRow) - { - $sValue = $aRow['grouped_by_1']; - $aLabels[] = ($sValue == '') ? 'Empty (%%.%%)' : $sValue.' (%%.%%)'; //TODO: localize - $aGroupBy[] = (int) $aRow['_itop_count_']; - $iTotalCount += $aRow['_itop_count_']; - } - - $aURLs = array(); - $sContext = ''; //TODO get the context ?? - foreach($aGroupBy as $sValue => $iValue) - { - // Build the search for this subset - $oSubsetSearch = clone $oSearch; - $oCondition = new BinaryExpression($oGroupByExp, '=', new ScalarExpression($sValue)); - $oSubsetSearch->AddConditionExpression($oCondition); - // Todo - à finir - $aURLs[] = 'http://www.combodo.com/itop'; //utils::GetAbsoluteUrlAppRoot()."pages/UI.php?operation=search&format=html{$sContext}&filter=".urlencode($oSubsetSearch->serialize()); - } - - $sJSValues = json_encode($aGroupBy); - $sJSHrefs = json_encode($aURLs); - $sJSLabels = json_encode($aLabels); - - $sId = 'chart_'.($bEditMode? 'edit_' : '').$this->sId; - $oPage->add(''); - $oPage->add_ready_script("$('#chart_{$sId}').pie_chart({chart_label: '$sTitle', values: $sJSValues, labels: $sJSLabels, hrefs: $sJSHrefs });"); - } - - static public function GetInfo() - { - return array( - 'label' => 'Pie (Raphael)', - 'icon' => 'images/dashlet-pie-chart.png', - 'description' => 'Pure JS Pie Chart', + 'description' => Dict::S('UI:DashletGroupByPie:Description'), ); } } @@ -760,9 +715,9 @@ class DashletGroupByBars extends DashletGroupBy static public function GetInfo() { return array( - 'label' => 'Bar Chart', + 'label' => Dict::S('UI:DashletGroupByBars:Label'), 'icon' => 'images/dashlet-bar-chart.png', - 'description' => 'Bar Chart', + 'description' => Dict::S('UI:DashletGroupByBars:Description'), ); } } @@ -778,9 +733,9 @@ class DashletGroupByTable extends DashletGroupBy static public function GetInfo() { return array( - 'label' => 'Group By (table)', + 'label' => Dict::S('UI:DashletGroupByTable:Label'), + 'description' => Dict::S('UI:DashletGroupByTable:Description'), 'icon' => 'images/dashlet-groupby-table.png', - 'description' => 'List (Grouped by a field)', ); } } @@ -791,8 +746,10 @@ class DashletHeaderStatic extends Dashlet public function __construct($sId) { parent::__construct($sId); - $this->aProperties['title'] = 'Contacts'; - $this->aProperties['icon'] = 'itop-config-mgmt-1.0.0/images/contact.png'; + $this->aProperties['title'] = Dict::S('UI:DashletHeaderStatic:Prop-Title:Default'); + $sIcon = MetaModel::GetClassIcon('Contact', false); + $sIcon = str_replace(utils::GetAbsoluteUrlModulesRoot(), '', $sIcon); + $this->aProperties['icon'] = $sIcon; } public function Render($oPage, $bEditMode = false, $aExtraParams = array()) @@ -814,10 +771,10 @@ class DashletHeaderStatic extends Dashlet public function GetPropertiesFields(DesignerForm $oForm) { - $oField = new DesignerTextField('title', 'Title', $this->aProperties['title']); + $oField = new DesignerTextField('title', Dict::S('UI:DashletHeaderStatic:Prop-Title'), $this->aProperties['title']); $oForm->AddField($oField); - $oField = new DesignerIconSelectionField('icon', 'Icon', $this->aProperties['icon']); + $oField = new DesignerIconSelectionField('icon', Dict::S('UI:DashletHeaderStatic:Prop-Icon'), $this->aProperties['icon']); $aAllIcons = self::FindIcons(APPROOT.'env-'.utils::GetCurrentEnvironment()); ksort($aAllIcons); $aValues = array(); @@ -832,9 +789,9 @@ class DashletHeaderStatic extends Dashlet static public function GetInfo() { return array( - 'label' => 'Header', + 'label' => Dict::S('UI:DashletHeaderStatic:Label'), 'icon' => 'images/dashlet-header.png', - 'description' => 'Header with stats (grouped by...)', + 'description' => Dict::S('UI:DashletHeaderStatic:Description'), ); } @@ -869,9 +826,11 @@ class DashletHeaderDynamic extends Dashlet public function __construct($sId) { parent::__construct($sId); - $this->aProperties['title'] = 'Contacts'; - $this->aProperties['icon'] = 'itop-config-mgmt-1.0.0/images/contact.png'; - $this->aProperties['subtitle'] = 'Contacts'; + $this->aProperties['title'] = Dict::S('UI:DashletHeaderDynamic:Prop-Title:Default'); + $sIcon = MetaModel::GetClassIcon('Contact', false); + $sIcon = str_replace(utils::GetAbsoluteUrlModulesRoot(), '', $sIcon); + $this->aProperties['icon'] = $sIcon; + $this->aProperties['subtitle'] = Dict::S('UI:DashletHeaderDynamic:Prop-Subtitle:Default'); $this->aProperties['query'] = 'SELECT Contact'; $this->aProperties['group_by'] = 'status'; $this->aProperties['values'] = array('active', 'inactive'); @@ -939,10 +898,10 @@ class DashletHeaderDynamic extends Dashlet public function GetPropertiesFields(DesignerForm $oForm) { - $oField = new DesignerTextField('title', 'Title', $this->aProperties['title']); + $oField = new DesignerTextField('title', Dict::S('UI:DashletHeaderDynamic:Prop-Title'), $this->aProperties['title']); $oForm->AddField($oField); - $oField = new DesignerIconSelectionField('icon', 'Icon', $this->aProperties['icon']); + $oField = new DesignerIconSelectionField('icon', Dict::S('UI:DashletHeaderDynamic:Prop-Icon'), $this->aProperties['icon']); $aAllIcons = DashletHeaderStatic::FindIcons(APPROOT.'env-'.utils::GetCurrentEnvironment()); ksort($aAllIcons); $aValues = array(); @@ -953,10 +912,11 @@ class DashletHeaderDynamic extends Dashlet $oField->SetAllowedValues($aValues); $oForm->AddField($oField); - $oField = new DesignerTextField('subtitle', 'Subtitle', $this->aProperties['subtitle']); + $oField = new DesignerTextField('subtitle', Dict::S('UI:DashletHeaderDynamic:Prop-Subtitle'), $this->aProperties['subtitle']); $oForm->AddField($oField); - $oField = new DesignerTextField('query', 'Query', $this->aProperties['query']); + $oField = new DesignerTextField('query', Dict::S('UI:DashletHeaderDynamic:Prop-Query'), $this->aProperties['query']); + $oField->SetMandatory(); $oForm->AddField($oField); try @@ -971,16 +931,18 @@ class DashletHeaderDynamic extends Dashlet $sLabel = $oAttDef->GetLabel(); $aGroupBy[$sAttCode] = $sLabel; } - $oField = new DesignerComboField('group_by', 'Group by', $this->aProperties['group_by']); + $oField = new DesignerComboField('group_by', Dict::S('UI:DashletHeaderDynamic:Prop-GroupBy'), $this->aProperties['group_by']); + $oField->SetMandatory(); $oField->SetAllowedValues($aGroupBy); } catch(Exception $e) { - $oField = new DesignerTextField('group_by', 'Group by', $this->aProperties['group_by']); + $oField = new DesignerTextField('group_by', Dict::S('UI:DashletHeaderDynamic:Prop-GroupBy'), $this->aProperties['group_by']); + $oField->SetMandatory(); } $oForm->AddField($oField); - $oField = new DesignerComboField('values', 'Values (CSV list)', $this->aProperties['values']); + $oField = new DesignerComboField('values', Dict::S('UI:DashletHeaderDynamic:Prop-Values'), $this->aProperties['values']); $oField->MultipleSelection(true); if (MetaModel::IsValidAttCode($sClass, $this->aProperties['group_by'])) { @@ -1032,9 +994,9 @@ class DashletHeaderDynamic extends Dashlet static public function GetInfo() { return array( - 'label' => 'Header with statistics', + 'label' => Dict::S('UI:DashletHeaderDynamic:Label'), 'icon' => 'images/dashlet-header-stats.png', - 'description' => 'Header with stats (grouped by...)', + 'description' => Dict::S('UI:DashletHeaderDynamic:Description'), ); } } @@ -1092,7 +1054,7 @@ class DashletBadge extends Dashlet } - $oField = new DesignerIconSelectionField('class', 'Class', $this->aProperties['class']); + $oField = new DesignerIconSelectionField('class', Dict::S('UI:DashletBadge:Prop-Class'), $this->aProperties['class']); ksort($aClasses); $aValues = array(); foreach($aClasses as $sClass => $sClass) @@ -1106,7 +1068,7 @@ class DashletBadge extends Dashlet // The icon does not exist, leet's use a transparent one of the same size. $sIconUrl = utils::GetAbsoluteUrlAppRoot().'images/transparent_32_32.png'; } - $aValues[] = array('value' => $sClass, 'label' => $sClass, 'icon' => $sIconUrl); + $aValues[] = array('value' => $sClass, 'label' => MetaModel::GetName($sClass), 'icon' => $sIconUrl); } } $oField->SetAllowedValues($aValues); @@ -1117,292 +1079,10 @@ class DashletBadge extends Dashlet static public function GetInfo() { return array( - 'label' => 'Badge', + 'label' => Dict::S('UI:DashletBadge:Label'), 'icon' => 'images/dashlet-badge.png', - 'description' => 'Object Icon with new/search', - ); - } -} - - -class DashletProto extends Dashlet -{ - public function __construct($sId) - { - parent::__construct($sId); - $this->aProperties['class'] = 'Foo'; - } - - protected $aValues1; - protected $aValues2; - protected $aStats; - protected $sGroupByLabel1; - protected $sGroupByLabel2; - protected $iTotalCount; - - public function Render($oPage, $bEditMode = false, $aExtraParams = array()) - { - $this->Compute(); - - //$sHtmlTitle = $this->aProperties['title']; - $sHtmlTitle = "Group by made on two dimensions"; - - // Build the output - $oPage->add('| '); - foreach ($this->aValues2 as $sValue2 => $sDisplayValue2) - { - $oPage->add(' | '.$sDisplayValue2.' | '); - } - $oPage->add('
| '.$sDisplayValue1.' | '); - foreach ($this->aValues2 as $sValue2 => $sDisplayValue2) - { - @$aResData = $this->aStats[$sValue1][$sValue2]; - if (is_array($aResData)) - { - $sRes = ''.$aResData['count'].''; - } - else - { - // Missing result => 0 - $sRes = '-'; - } - $oPage->add(''.$sRes.' | '); - } - $oPage->add('
'; diff --git a/application/forms.class.inc.php b/application/forms.class.inc.php index 387131495..d70c5432a 100644 --- a/application/forms.class.inc.php +++ b/application/forms.class.inc.php @@ -92,7 +92,9 @@ class DesignerForm $aRow = $oField->Render($oP, $sFormId); if ($oField->IsVisible()) { - $aDetails[] = array('label' => $aRow['label'], 'value' => $aRow['value']); + $sValidation = ' '.$this->GetValidationArea($oField->GetCode()).''; + $sField = $aRow['value'].$sValidation; + $aDetails[] = array('label' => $aRow['label'], 'value' => $sField); } else { @@ -152,7 +154,7 @@ class DesignerForm $sFormId = $this->sFormId; $sReturn = '