![]() |
Xataface 2.0
Xataface Application Framework
|
00001 <?php 00002 $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES']['htmlarea'] = array('HTML/QuickForm/htmlarea.php', 'HTML_QuickForm_htmlarea'); 00006 class Dataface_FormTool_htmlarea { 00007 function &buildWidget(&$record,&$field, &$form, $formFieldName, $new=false){ 00008 if ( is_string($field) ) throw new Exception("buildWidget expects field to be a structure but recieved a string: $field", E_USER_ERROR); 00009 00010 $table =& $record->_table; 00011 00012 $widget =& $field['widget']; 00013 00014 $factory =& Dataface_FormTool::factory(); 00015 $el =& $factory->addElement('htmlarea', $formFieldName, $widget['label'],array('class'=>$widget['class'], 'id'=>$field['name']) ); 00016 00017 if ( method_exists($el, 'setWysiwygOptions') ){ 00018 $el->setWysiwygOptions($widget); 00019 00020 if ( isset($widget['editor']) ){ 00021 $el->editorName = $widget['editor']; 00022 } 00023 } 00024 return $el; 00025 } 00026 00027 }
1.7.4