Skip to content
Browse files

w3c validation cleanup

  • Loading branch information...
1 parent 836e930 commit 8e97ab66051f04dcc7d5d9fe9fe5b1b37661e834 @cover committed Nov 24, 2010
View
8 app/views/tolk/locales/all.html.erb
@@ -25,10 +25,10 @@
<% if phrase.translations.primary %>
<tr>
<td class="translation">
- <%= hidden_field_tag :"translations[][id]", phrase.translation.id %>
- <%= hidden_field_tag :"translations[][locale_id]", phrase.translation.locale_id %>
- <%= text_area_tag :"translations[][text]", format_i18n_text_area_value(phrase.translation.text), :class => 'locale',
- :onfocus => "$(this).up('tr').addClassName('active');", :onblur => "$(this).up('tr').removeClassName('active');" %>
+ <%= hidden_field_tag :"translations[][id]", phrase.translation.id, :id => "id_#{phrase.translation.object_id}" %>
+ <%= hidden_field_tag :"translations[][locale_id]", phrase.translation.locale_id, :id => "locale_id_#{phrase.translation.object_id}" %>
+ <%= text_area_tag :"translations[][text]", format_i18n_text_area_value(phrase.translation.text), :class => 'locale', :id => "text_#{phrase.translation.object_id}",
+ :onfocus => "$(this).up('tr').addClassName('active');", :onblur => "$(this).up('tr').removeClassName('active');", :rows => 5, :cols => 50 %>
</td>
<td class="phrase">
View
2 app/views/tolk/locales/index.html.erb
@@ -23,7 +23,7 @@
<div class="submit">
<%= f.error_messages %>
<p>
- <%= f.label "Add a new Locale" %>
+ <%= f.label "Add a new Locale", :for => 'select_tolk_locale_name' %>
<select id="select_tolk_locale_name" name="tolk_locale[name]">
<%= options_for_select tolk_locale_selection %>
</select>
View
8 app/views/tolk/locales/show.html.erb
@@ -29,10 +29,10 @@
<tr>
<% translation = Tolk::Translation.new(:locale => @locale, :phrase => phrase) %>
<td class="translation">
- <%= hidden_field_tag :"translations[][id]", translation.id, :id => "#{translation.object_id}_id" unless translation.id.blank? %>
- <%= hidden_field_tag :"translations[][phrase_id]", phrase.id, :id => "#{translation.object_id}_phrase_id" %>
- <%= hidden_field_tag :"translations[][locale_id]", translation.locale_id, :id => "#{translation.object_id}_locale_id" %>
- <%= text_area_tag :"translations[][text]", format_i18n_text_area_value(translation.text), :class => "locale", :id => "#{translation.object_id}_text", :onfocus => "$(this).up('tr').addClassName('active');", :onblur => "$(this).up('tr').removeClassName('active');" %>
+ <%= hidden_field_tag :"translations[][id]", translation.id, :id => "id_#{translation.object_id}" unless translation.id.blank? %>
+ <%= hidden_field_tag :"translations[][phrase_id]", phrase.id, :id => "phrase_id_#{translation.object_id}" %>
+ <%= hidden_field_tag :"translations[][locale_id]", translation.locale_id, :id => "locale_id_#{translation.object_id}" %>
+ <%= text_area_tag :"translations[][text]", format_i18n_text_area_value(translation.text), :class => "locale", :id => "text_#{translation.object_id}", :onfocus => "$(this).up('tr').addClassName('active');", :onblur => "$(this).up('tr').removeClassName('active');", :rows => 5, :cols => 50 %>
</td>
<td class="phrase">
<span class="to_translate <%= 'primary' if @alternate_locale and phrase.translations.for(@alternate_locale) %>">
View
8 app/views/tolk/searches/show.html.erb
@@ -25,10 +25,10 @@
<% if translation = phrase.translations.find_by_locale_id(@locale.id) || Tolk::Translation.new(:locale => @locale, :phrase => phrase) %>
<tr>
<td class="translation">
- <%= hidden_field_tag :"translations[][id]", translation.id, :id => "#{translation.object_id}_id" %>
- <%= hidden_field_tag :"translations[][phrase_id]", phrase.id, :id => "#{translation.object_id}_phrase_id" %>
- <%= hidden_field_tag :"translations[][locale_id]", translation.locale_id, :id => "#{translation.object_id}_locale_id" %>
- <%= text_area_tag :"translations[][text]", format_i18n_text_area_value(translation.text), :class => "locale", :id => "#{translation.object_id}_text", :onfocus => "$(this).up('tr').addClassName('active');", :onblur => "$(this).up('tr').removeClassName('active');" %>
+ <%= hidden_field_tag :"translations[][id]", translation.id, :id => "id_#{translation.object_id}" %>
+ <%= hidden_field_tag :"translations[][phrase_id]", phrase.id, :id => "phrase_id_#{translation.object_id}" %>
+ <%= hidden_field_tag :"translations[][locale_id]", translation.locale_id, :id => "locale_id_#{translation.object_id}" %>
+ <%= text_area_tag :"translations[][text]", format_i18n_text_area_value(translation.text), :class => "locale", :id => "text_#{translation.object_id}", :onfocus => "$(this).up('tr').addClassName('active');", :onblur => "$(this).up('tr').removeClassName('active');", :rows => 5, :cols => 50 %>
</td>
<td class="phrase">
<% if params[:q].present? -%>

0 comments on commit 8e97ab6

Please sign in to comment.
Something went wrong with that request. Please try again.