[accessibility] adding hidden labels for invited and attended

user checkboxes
pull/6827/head
Romano Licker 13 years ago
parent 2463398422
commit b84407ef46
  1. 22
      app/views/meetings/_form.html.erb
  2. 4
      config/locales/de.yml
  3. 4
      config/locales/en.yml

@ -18,12 +18,24 @@
<tr class="<%= cycle("odd", "even")%>"> <tr class="<%= cycle("odd", "even")%>">
<td><%=h user %></td> <td><%=h user %></td>
<% if @meeting.participants.present? && participant = @meeting.participants.detect{|p| p.user_id == user.id} -%> <% if @meeting.participants.present? && participant = @meeting.participants.detect{|p| p.user_id == user.id} -%>
<%= hidden_field_tag "meeting[participants_attributes][][id]", participant.id %> <%= hidden_field_tag "meeting[participants_attributes][][id]", participant.id %>
<td class="checkox" align="center"><%= check_box_tag "meeting[participants_attributes][][invited]", 1, participant.invited? %></td> <td class="checkox" align="center">
<td class="checkox" align="center"><%= check_box_tag "meeting[participants_attributes][][attended]", 1, participant.attended? %></td> <%= label_tag "checkbox_invited_#{user.id}", user.name + " " + l(:description_invite), :class => "hidden-for-sighted" %>
<%= check_box_tag "meeting[participants_attributes][][invited]", 1, participant.invited?, :id => "checkbox_invited_#{user.id}" %>
</td>
<td class="checkox" align="center">
<%= label_tag "checkbox_attended_#{user.id}", user.name + " " + l(:description_attended), :class => "hidden-for-sighted" %>
<%= check_box_tag "meeting[participants_attributes][][attended]", 1, participant.attended?, :id => "checkbox_attended_#{user.id}" %>
</td>
<% else -%> <% else -%>
<td class="checkox" align="center"><%= check_box_tag "meeting[participants_attributes][][invited]" %></td> <td class="checkox" align="center">
<td class="checkox" align="center"><%= check_box_tag "meeting[participants_attributes][][attended]" %></td> <%= label_tag "checkbox_invited_#{user.id}", user.name + " " + l(:description_invite), :class => "hidden-for-sighted" %>
<%= check_box_tag "meeting[participants_attributes][][invited]", value = "1", checked = false, :id => "checkbox_invited_#{user.id}" %>
</td>
<td class="checkox" align="center">
<%= label_tag "checkbox_attended_#{user.id}", user.name + " " + l(:description_attended), :class => "hidden-for-sighted" %>
<%= check_box_tag "meeting[participants_attributes][][attended]", value = "1", checked = false, :id => "checkbox_attended_#{user.id}" %>
</td>
<% end -%> <% end -%>
</tr> </tr>
<% end -%> <% end -%>

@ -32,4 +32,6 @@ de:
text_agenda_for_meeting: 'Agenda für das Meeting "%{meeting}"' text_agenda_for_meeting: 'Agenda für das Meeting "%{meeting}"'
text_review_minutes: "%{author} hat das %{link} zur Einsicht freigegeben." text_review_minutes: "%{author} hat das %{link} zur Einsicht freigegeben."
text_minutes_for_meeting: 'Protokoll für das Meeting "%{meeting}"' text_minutes_for_meeting: 'Protokoll für das Meeting "%{meeting}"'
notice_successful_notification: "Benachrichtigung erfolgreich gesendet" notice_successful_notification: "Benachrichtigung erfolgreich gesendet"
description_invite: eingeladen
description_attended: teilgenommen

@ -32,4 +32,6 @@ en:
text_agenda_for_meeting: 'agenda for the meeting "%{meeting}"' text_agenda_for_meeting: 'agenda for the meeting "%{meeting}"'
text_review_minutes: "%{author} has put the %{link} up for review." text_review_minutes: "%{author} has put the %{link} up for review."
text_minutes_for_meeting: 'minutes for the meeting "%{meeting}"' text_minutes_for_meeting: 'minutes for the meeting "%{meeting}"'
notice_successful_notification: "Notification sent successfully" notice_successful_notification: "Notification sent successfully"
description_invite: invited
description_attended: attended

Loading…
Cancel
Save