Development

Changeset 909

You must first sign up to be able to contribute.

Changeset 909

Show
Ignore:
Timestamp:
02/27/06 11:34:34 (7 years ago)
Author:
fabien
Message:

fixed ticket #93

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/helper/FormHelper.php

    r907 r909  
    236236  } 
    237237 
     238  // we need to know the id for things the rich text editor 
     239  // in advance of building the tag 
     240  if (isset($options['id'])) 
     241  { 
     242    $id = $options['id']; 
     243    unset($options['id']); 
     244  } 
     245  else 
     246  { 
     247    $id = $name; 
     248  } 
     249 
    238250  if ($rich == 'tinymce') 
    239251  { 
     
    279291  mode: "exact", 
    280292  language: "en", 
    281   elements: "'.$name.'", 
     293  elements: "'.$id.'", 
    282294  plugins: "table,advimage,advlink,flash", 
    283295  theme: "advanced", 
     
    297309    return 
    298310      content_tag('script', javascript_cdata_section($tinymce_js), array('type' => 'text/javascript')). 
    299       content_tag('textarea', $content, array_merge(array('name' => $name, 'id' => $name), _convert_options($options))); 
     311      content_tag('textarea', $content, array_merge(array('name' => $name, 'id' => $id), _convert_options($options))); 
    300312  } 
    301313  elseif ($rich === 'fck') 
     
    351363  else 
    352364  { 
    353     return content_tag('textarea', htmlspecialchars((is_object($content)) ? $content->__toString() : $content), array_merge(array('name' => $name, 'id' => $name), _convert_options($options))); 
     365    return content_tag('textarea', htmlspecialchars((is_object($content)) ? $content->__toString() : $content), array_merge(array('name' => $name, 'id' => $id), _convert_options($options))); 
    354366  } 
    355367}