Index: trunk/extensions/SemanticForms/includes/SF_FormClasses.inc |
— | — | @@ -289,6 +289,11 @@ |
290 | 290 | $datatypeLabels = $smwgContLang->getDatatypeLabels(); |
291 | 291 | $string_type = $datatypeLabels['_str']; |
292 | 292 | $text_type = $datatypeLabels['_txt']; |
| 293 | + // type introduced in SMW 1.2 |
| 294 | + if (array_key_exists('_cod', $datatypeLabels)) |
| 295 | + $code_type = $datatypeLabels['_cod']; |
| 296 | + else |
| 297 | + $code_type = 'code'; |
293 | 298 | $url_type = $datatypeLabels['_uri']; |
294 | 299 | $email_type = $datatypeLabels['_ema']; |
295 | 300 | $float_type = $datatypeLabels['_num']; |
— | — | @@ -314,7 +319,7 @@ |
315 | 320 | } else { |
316 | 321 | return array('text'); |
317 | 322 | } |
318 | | - } elseif ($semantic_field_type == $text_type) { |
| 323 | + } elseif ($semantic_field_type == $text_type || $semantic_field_type == $code_type) { |
319 | 324 | return array('textarea'); |
320 | 325 | } elseif ($semantic_field_type == $bool_type) { |
321 | 326 | return array('checkbox'); |