Development

#5461 (sfWidgetFormTextareaTinyMCE in admin generator doesn't work properly)

You must first sign up to be able to contribute.

Ticket #5461 (closed defect: invalid)

Opened 6 months ago

Last modified 6 months ago

sfWidgetFormTextareaTinyMCE in admin generator doesn't work properly

Reported by: murena Assigned to: fabien
Priority: major Milestone:
Component: sfFormExtraPlugin Version: 1.2.1
Keywords: sfWidgetFormTextareaTinyMCE value Cc:
Qualification: Unreviewed

Description

I have generated an admin interface to a Model that contains i18n. Then in the form class I embedded i18n. If I use normal textarea everything works, if I switch to sfWidgetFormTextareaTinyMCE the textarea is always starting blank even when there is a value to show. Also when I insert a new object the value on textarea is taken blank.

This is schema.yml

Game:
  actAs:
    Timestampable: ~
    Sluggable:
      fields:  [name]
    I18n:
      fields: [body, box_content]
  columns:
    category_id:  { type: integer, notnull: true }
    name:         { type: string, length: 255, unique: true }
    body:         clob
    box_content:  clob
    active:       { type: boolean, notnull: true, default: false }
  relations:
    Category:
      local:        category_id
      foreign:      id
      foreignAlias: Games

Here is GameForm?.class.php

class GameForm extends BaseGameForm
{
  public function configure()
  {
    unset($this['created_at'], $this['updated_at']);
    
    $this->embedI18n(sfConfig::get('app_languages_list'));
      
  }
}

Here is GameTranslationForm?.class.php

class GameTranslationForm extends BaseGameTranslationForm
{
  public function configure()
  {
    
    $this->widgetSchema['body'] = new sfWidgetFormTextareaTinyMCE(array(
      'width' => 650,
      'height' => 450,
      ), 
      array('class' => 'tinymce',)
    );
    
    $this->widgetSchema['box_content'] = new sfWidgetFormTextareaTinyMCE(array(
      'width' => 450,
      'height' => 450,
      ), 
      array('class' => 'tinymce',)
    );
       
  }
}

Change History

12/25/08 15:39:53 changed by murena

  • version changed from 1.2.0 to 1.2.1.

01/06/09 13:51:43 changed by murena

  • status changed from new to closed.
  • resolution set to invalid.

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.