Changeset 8820
- Timestamp:
- 05/07/08 00:11:22 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/helper/sfRichTextEditorTinyMCE.class.php
r7757 r8820 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.1/test/unit/helper/FormHelperTest.php
r7757 r8820 43 43 } 44 44 45 $t = new lime_test(8 5, new lime_output_color());45 $t = new lime_test(87, new lime_output_color()); 46 46 47 47 $context = sfContext::getInstance(array( … … 159 159 $t->like(textarea_tag('name', 'content', array('rich' => 'TinyMCE')), '/tinyMCE\.init/', 'textarea_tag() can create a rich textarea tag based on tinyMCE'); 160 160 $t->like(textarea_tag('name', 'content', array('rich' => true)), '/tinyMCE\.init/', 'textarea_tag() can create a rich textarea tag based on tinyMCE'); 161 //regression for http://trac.symfony-project.com/ticket/3474 162 $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'); 163 $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'); 161 164 162 165 class sfRichTextEditorSample extends sfRichTextEditor

