echo $field['title']; ?> </td> <?endforeach?> <td><?php echo Loc::getMessage('SALE_LOCATION_E_HEADER_EXT_REMOVE'); ?> </td> </tr> <?if(is_array($formData['EXTERNAL']) && !empty($formData['EXTERNAL'])):?> <?foreach($formData['EXTERNAL'] as $id => $ext):?> <tr> <?foreach($externalMap as $code => $field):?> <?$value = Helper::makeSafeDisplay($ext[$code], $code);?> <td> <?if($code == 'SERVICE_ID'):?> <select name="element[EXTERNAL][<?php echo $ext['ID']; ?> ][<?php echo $code; ?> ]"> <?foreach($services as $sId => $serv):?> <option value="<?php echo intval($serv['ID']); ?> "<?php echo $serv['ID'] == $value ? ' selected' : '';
#### PAGE INTERFACE GENERATION ##################################### if(empty($fatal)) { $headers = array(); foreach(Helper::getListGridColumns() as $code => $fld) $headers[] = array("id" => $code, "content" => $columns[$code]['title'], "default" => $fld['DEFAULT'], "sort" => $code); $lAdmin->AddHeaders($headers); while($elem = $adminResult->NavNext(true, "f_")) { foreach($columns as $code => $fld) { if(isset($elem[$code])) Helper::makeSafeDisplay($elem[$code], $code); } // urls $editUrl = Helper::getEditUrl($elem['ID']); $copyUrl = Helper::getEditUrl(false, array('copy_id' => $elem['ID'])); $listUrl = Helper::getListUrl($elem['ID'], array()); $row =& $lAdmin->AddRow($f_ID, $elem, $listUrl, Loc::getMessage('SALE_LOCATION_L_VIEW_CHILDREN')); foreach($columns as $code => $fld) { if($code == 'ID') $row->AddViewField($code, '<a href="'.$editUrl.'" title="'.Loc::getMessage('SALE_LOCATION_L_EDIT_ITEM').'">'.$f_ID.'</a>'); elseif($code == 'TYPE_ID') $row->AddSelectField($code, Helper::getTypeList());
/** * Move data read from database to a specially formatted $arResult * @return void */ protected function formatResult() { $this->arResult =& $this->dbResult; $this->arResult['ERRORS'] =& $this->errors; $this->arResult['FORM_ID'] = 'CRM_LOC_EDIT_FORM'; $this->arResult['GRID_ID'] = 'CRM_LOC_EDIT_GRID'; foreach ($this->componentData['FORM_ROWS'] as $code => $row) { $this->arResult['FIELDS'][] = array('id' => $code, 'name' => $row['title'], 'value' => Helper::makeSafeDisplay($this->arResult['FORM_DATA'][$code], $code), 'required' => $row['required'], 'type' => 'text'); } if ($this->checkIsNonemptyArray($this->arResult['EXTERNAL_SERVICES'])) { $this->arResult['FIELDS'][] = array('id' => 'EXTERNAL', 'required' => false); } $this->arResult['EXTERNAL_TABLE_COLUMNS'] = Helper::getExternalMap(); unset($this->componentData); }