Changeset 8819
- Timestamp:
- 05/07/08 00:05:47 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0/lib/helper/sfRichTextEditorTinyMCE.class.php
r3284 r8819 42 42 // we need to know the id for things the rich text editor 43 43 // in advance of building the tag 44 $id = _get_option($options, 'id', $this->name);44 $id = _get_option($options, 'id', get_id_from_name($this->name, null)); 45 45 46 46 // use tinymce's gzipped js? … … 110 110 return 111 111 content_tag('script', javascript_cdata_section($tinymce_js), array('type' => 'text/javascript')). 112 content_tag('textarea', $this->content, array_merge(array('name' => $this->name, 'id' => get_id_from_name($id, null)), _convert_options($options)));112 content_tag('textarea', $this->content, array_merge(array('name' => $this->name, 'id' => $id), _convert_options($options))); 113 113 } 114 114 } branches/1.0/test/unit/helper/FormHelperTest.php
r6069 r8819 94 94 } 95 95 96 $t = new lime_test(8 5, new lime_output_color());96 $t = new lime_test(87, new lime_output_color()); 97 97 98 98 $context = sfContext::getInstance(); … … 203 203 $t->like(textarea_tag('name', 'content', array('rich' => 'TinyMCE')), '/tinyMCE\.init/', 'textarea_tag() can create a rich textarea tag based on tinyMCE'); 204 204 $t->like(textarea_tag('name', 'content', array('rich' => true)), '/tinyMCE\.init/', 'textarea_tag() can create a rich textarea tag based on tinyMCE'); 205 //regression for http://trac.symfony-project.com/ticket/3474 206 $t->like(textarea_tag('name[]', 'content', array('rich' => true)), '/elements: "name",/', 'textarea_tag() can create a rich textarea tag based on tinyMCE using correct id'); 207 $t->like(textarea_tag('name[]', 'content', array('rich' => true, 'id' => 'test')), '/elements: "test",/', 'textarea_tag() can create a rich textarea tag based on tinyMCE using correct id'); 205 208 206 209 class sfRichTextEditorSample extends sfRichTextEditor

