Skip to content

Commit

Permalink
Ticket #4148 - Build-in API support: Reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLV committed Nov 9, 2023
1 parent 7767da2 commit 6679dca
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions template/scripts/BxBaseReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,17 @@ public function __construct($sSystem, $iId, $iInit = true, $oTemplate = false)
'show_counter' => true,
'show_counter_only' => true
);
$this->_aElementDefaultsApi = array_merge($this->_aElementDefaults, [
'show_counter' => true,
]);
$this->_aElementParamsApi = ['is_reported'];
if($this->_bApi) {
$aTypes = BxDolFormQuery::getDataItems($this->_sTypesPreList);

$this->_aElementDefaultsApi = array_merge($this->_aElementDefaults, [
'show_counter' => true,
'types' => array_map(function($sType) use ($aTypes) {
return ['name' => $sType, 'title' => $aTypes[$sType]];
}, $this->_aTypes)
]);
$this->_aElementParamsApi = ['is_reported', 'types'];
}

$this->_sTmplContentElementBlock = $this->_oTemplate->getHtml('report_element_block.html');
$this->_sTmplContentElementInline = $this->_oTemplate->getHtml('report_element_inline.html');
Expand Down

0 comments on commit 6679dca

Please sign in to comment.