Fix cktext_area and removing of files and links
This commit is contained in:
parent
0be8a74fa8
commit
fd432f30ba
|
@ -194,7 +194,7 @@
|
|||
<div class="controls">
|
||||
<div class="textarea">
|
||||
<%= f.fields_for :text_translations do |f| %>
|
||||
<%= f.cktext_area locale, rows: 5, class: "input-block-level", id: "content_#{locale}", name: "content_#{locale}", :value => (@bulletin.text_translations[locale] rescue nil) %>
|
||||
<%= f.cktext_area locale, rows: 5, class: "input-block-level", :value => (@bulletin.text_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -40,14 +40,16 @@
|
|||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
<span class="delete_file add-on btn" title="<%= form_file.new_record? ? t(:remove) : t(:delete_) %>">
|
||||
<% if form_file.new_record? %>
|
||||
<% if form_file.new_record? %>
|
||||
<span class="delete_file add-on btn" title="<%= t(:delete_) %>">
|
||||
<a class="icon-trash"></a>
|
||||
<% else %>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="remove_existing_record add-on btn" title="<%= t(:remove) %>">
|
||||
<%= f.hidden_field :id %>
|
||||
<a class="remove_existing_record icon-remove"></a>
|
||||
<a class="icon-remove"></a>
|
||||
<%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
|
@ -11,13 +11,16 @@
|
|||
</span>
|
||||
<% end %>
|
||||
</span>
|
||||
<span class="delete_link add-on btn" title="<%= form_link.new_record? ? t(:remove) : t(:delete_) %>">
|
||||
<% if form_link.new_record? %>
|
||||
|
||||
<% if form_link.new_record? %>
|
||||
<span class="delete_link add-on btn" title="<%= t(:delete_) %>">
|
||||
<a class="icon-trash"></a>
|
||||
<% else %>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="remove_existing_record add-on btn" title="<%= t(:remove) %>">
|
||||
<%= f.hidden_field :id %>
|
||||
<a class="remove_existing_record icon-remove"></a>
|
||||
<%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -50,15 +50,17 @@
|
|||
<%= hidden_field_tag 'archive_file[archive_file_multiples_attributes][0][choose_lang][]', '' %>
|
||||
</span>
|
||||
|
||||
<span class="delete_file add-on btn" title="<%= t(:delete) %>">
|
||||
<% if form_file.new_record? %>
|
||||
<% if form_file.new_record? %>
|
||||
<span class="delete_file add-on btn" title="<%= t(:delete_) %>">
|
||||
<a class="icon-trash"></a>
|
||||
<% else %>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="remove_existing_record add-on btn" title="<%= t(:remove) %>">
|
||||
<%= f.hidden_field :id %>
|
||||
<a class="remove_existing_record icon-remove"></a>
|
||||
<a class=" icon-remove"></a>
|
||||
<%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<div class="controls">
|
||||
<div class="textarea">
|
||||
<%= f.fields_for :context_translations do |f| %>
|
||||
<%= f.cktext_area locale, rows: 5, class: "input-block-level", id: "content_#{locale}", name: "content_#{locale}", :value => (@page_context.context_translations[locale] rescue nil) %>
|
||||
<%= f.cktext_area locale, rows: 5, class: "input-block-level", :value => (@page_context.context_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Reference in New Issue