163 |
if ($obj == '') { |
if ($obj == '') { |
164 |
$obj = " "; |
$obj = " "; |
165 |
} |
} |
166 |
|
// if item is an Array we will replace it with an link or contained form object |
167 |
|
elseif( is_array($obj) ) { |
168 |
|
$cur_row_index = $this->_datasource->get_cur_data_index(); |
169 |
|
$parent_guid = $this->_datasource->_data[$cur_row_index]['guid']; |
170 |
|
foreach($obj as $key => $value) { |
171 |
|
if(is_numeric($key)) { |
172 |
|
$guid = $value['guid']; |
173 |
|
$list[$key] = $guid; |
174 |
|
} |
175 |
|
} |
176 |
|
if(is_array($list) ) { |
177 |
|
$container = container( |
178 |
|
form_open($obj[guid], $_SERVER["PHP_SELF"] ), |
179 |
|
form_select("guid", $list), |
180 |
|
form_hidden("ap", "oedit"), |
181 |
|
form_hidden("guid", $obj['guid']), |
182 |
|
form_hidden("class", $col_name), |
183 |
|
form_submit("submit","view" ), |
184 |
|
form_close() |
185 |
|
); |
186 |
|
$obj = $container; |
187 |
|
} else { |
188 |
|
$obj = html_a($_SERVER["PHP_SELF"] . "?ap=oedit&guid=" . $obj['guid'] . "&class=" . $col_name, "view"); |
189 |
|
} |
190 |
|
} |
191 |
|
|
192 |
|
|
193 |
//make sure we don't put a right border on the last |
//make sure we don't put a right border on the last |
194 |
//column we are working on. |
//column we are working on. |
308 |
if ($cnt == 1) { |
if ($cnt == 1) { |
309 |
$container->push(form_hidden($this->_search_fieldVar, $field)); |
$container->push(form_hidden($this->_search_fieldVar, $field)); |
310 |
} |
} |
311 |
|
|
312 |
|
$hidden_fields = $this->get_hidden_fields(); |
313 |
|
if(is_array($hidden_fields)) { |
314 |
|
foreach($hidden_fields as $key => $value) { |
315 |
|
$container->push(form_hidden($key, $value)); |
316 |
|
} |
317 |
|
} |
318 |
|
|
319 |
|
$container->push(form_close() ); |
320 |
|
|
321 |
return $container; |
return $container; |
322 |
} |
} |
323 |
|
|
324 |
|
|
325 |
|
function get_hidden_fields() { |
326 |
|
user_error("DefaulGUIDataList::get_hidden_fields() - ". |
327 |
|
"child class must override this method ". |
328 |
|
"this function should return a hash for hidden fields, if not needed just return" ); |
329 |
|
} |
330 |
|
|
331 |
} |
} |
332 |
|
|
333 |
/** |
/** |