views:

144

answers:

1

I generated a custom theme by copying

plugins/sfDoctrinePlugin/data/generator/sfDoctrineModule/default"

into

plugins/sfDoctrinePlugin/data/generator/sfDoctrineModule/mytheme1"

I changed the templates to match my needs (no tables, custom errors display and so on).

./symfony doctrine:generate-module --theme=mytheme1 frontend user User 

works as I expected however if I add

$this->embedI18n(array('en','fr')); 

to the form class the generator renders the I18n embedded form with and .

Where do this come from? How can I customize it? where are the template files for i18n embedded forms located?

Thanks a lot, Massimo

A: 

Firstly it's not the best idea to overload a theme in the plugin itself. Plugin's shouldn't be touched to allow future updates. You can easily overload the theme in your application.

Secondly something seems to be missing in your post: "to the form class the generator renders the I18n embedded form with and ."

Maybe missing translation indicators are shown?

kuba
yes there's domething missing! it uses table cells and table rows even if I have stripped them away from my custom template. I cannot figure out where do they come from
Massimo
After I have fix all theese stuff I will move my theme inside my project. Thanks for your advices however!
Massimo
Is it a "T" letter between "[" and "]" ? If it is than it's just a missing translation indicator (configured and enabled in factories.yml).
kuba
No, it's a template layout problem. The form is rendered in the right way, I mean I can see all the fields. When you specify $this->embedI18n(array('it','fr'); It creates a block of code for each language. The problem is that this block of code comes from an unknown template. I need to find and customize that template. can you help me to find it?
Massimo
Second parameter for embedI18n() method is an html decorator. You can use it to change the html for embedded form.
kuba