. * * For more information, contact Colosa Inc, 2566 Le Jeune Rd., * Coral Gables, FL, 33134, USA, or email info@colosa.com. * * @package workflow.engine.classes **/ /** * Class XmlForm_Field_TextareaPM */class XmlForm_Field_TextareaPM extends XmlForm_Field { public $rows = 12; public $cols = 40; public $required = false; public $readOnly = false; public $wrap = 'OFF'; public $showVars = 0; public $process = ''; public $symbol = '@@'; /** * Function render * * @author Julio Cesar Laura Avendao * @access public * @param eter string value * @param eter string owner * @return string */ public function render ($value = null, $owner) { if ($this->showVars == 1) { $this->process = G::replaceDataField( $this->process, $owner->values ); $sShowVars = ' '; } else { $sShowVars = ''; } if ($this->mode === 'edit') { if ($this->readOnly) { return '' . $sShowVars; } else { return '' . $sShowVars; } } elseif ($this->mode === 'view') { return ''; } else { return ''; } } /** * Function renderGrid * * @author Julio Cesar Laura Avendano * @access public * @param eter string values * @param eter string owner * @return string */ public function renderGrid ($owner, $values = null) { $result = array (); $r = 1; foreach ($values as $v) { if ($this->showVars == 1) { $this->process = G::replaceDataField( $this->process, $owner->values ); //$sShowVars = ' ' . $this->symbol . ''; $sShowVars = ' '; } else { $sShowVars = ''; } if ($this->mode === 'edit') { if ($this->readOnly) { $result[] = 'htmlentities( $v, ENT_COMPAT, 'utf-8' ) . '\' readOnly="readOnly"/>' . $sShowVars; } else { $result[] = 'htmlentities( $v, ENT_COMPAT, 'utf-8' ) . '\' />' . $sShowVars; } } elseif ($this->mode === 'view') { if (stristr( $_SERVER['HTTP_USER_AGENT'], 'iPhone' )) { //$result[] = '
'.$this->htmlentities( $v , ENT_COMPAT, 'utf-8').'
'; $result[] = $this->htmlentities( $v, ENT_COMPAT, 'utf-8' ); } else { //$result[] = '
'.$this->htmlentities( $v , ENT_COMPAT, 'utf-8').'
'; $result[] = $this->htmlentities( $v, ENT_COMPAT, 'utf-8' ); } } else { $result[] = $this->htmlentities( $v, ENT_COMPAT, 'utf-8' ); } $r ++; } return $result; } }