0

Does anyone know is it possible to have two cktext_area in one form for one row (for example description)? My rails app have two versions: english and russia. I'm using globalize3 gem and batch_translation. So in my form view i want to give administrator possibility to fill description text area for two versions. I'm using ckeditor and i can't figure out how to write two cktext_areas. If i make like this:

    <div class="ru-version" id="ru-version"> <%# move russian version to the partial like english version %>
        <div class="field titleField">
            <%= f.label :title, "Заголовок" %>
            <%= f.text_field :title %>
        </div>
        <div class="field textField">
            <%= f.label :description, "Краткое описание" %>
            <%= cktext_area :conference, :description, :input_html => { :toolbar => 'Easy' } %>
        </div>
        <div class="field textField">
            <%= f.label :content, "Текст" %>
            <%= cktext_area :conference, :content, :input_html => { :toolbar => 'Easy' } %>
        </div>
    </div>


    <div class="en-version" id="en-version">
        <%= f.globalize_fields_for :en do |builder| %>
            <div class="field titleField">
                <%= f.label :title, "Заголовок" %>
                <%= f.text_field :title %>
            </div>
            <div class="field textField">
                <%= f.label :description, "Краткое описание" %>
                <%= f.text_area :description %>
                <%= cktext_area :conference, :description, :input_html => { :toolbar => 'Easy' } %>
            </div>
            <div class="field textField">
                <%= f.label :content, "Текст" %>
                <%= f.text_area :content %>
                <%= cktext_area :conference, :content, :input_html => { :toolbar => 'Easy' } %>
            </div>
        <% end %>
    </div>

i get two absolutely the same cktext_areas with russian text and one more simple text_area with english text(

Does anyone know how to solve this problem? It's not very beautiful and comfortable to have two different text areas

Thanks

Pogoss
  • 11
  • 3

1 Answers1

0

You can use cktext_area_tag that works as text_area_tag does.

eveevans
  • 4,392
  • 2
  • 31
  • 38