Merge pull request #1375 from consul/officer-document-check

updates styles and i18n for officing views
This commit is contained in:
Raimond Garcia
2017-01-30 14:03:04 +01:00
committed by GitHub
7 changed files with 58 additions and 32 deletions

View File

@@ -1,26 +1,27 @@
<h2><%= t("officing.residence.new.title") %></h2> <h2><%= t("officing.residence.new.title") %></h2>
<div class="row"> <div class="row verification account">
<div class="small-12 medium-6 column"> <div class="small-12 medium-8 column">
<%= form_for @residence, as: "residence", url: officing_residence_path do |f| %> <%= form_for @residence, as: "residence", url: officing_residence_path do |f| %>
<%= render "errors" %> <%= render "errors" %>
<%= f.label t("officing.residence.new.document_type_label") %> <div class="small-12 medium-6">
<%= f.select :document_type, document_types, prompt: "", label: false %> <%= f.select :document_type, document_types, prompt: "" %>
<%= f.text_field :document_number, <%= f.text_field :document_number,
placeholder: t("officing.residence.new.document_number") %> placeholder: t("officing.residence.new.document_number") %>
<div class="date-of-birth small-12 medium-6 clear">
<%= f.label t("verification.residence.new.date_of_birth") %>
<%= f.date_select :date_of_birth,
prompt: true,
start_year: 1900, end_year: 16.years.ago.year,
label: false %>
</div> </div>
<input type="submit" value="<%= t("officing.residence.new.submit") %>" class="button"> <div class="date-of-birth small-12 medium-6">
<%= f.date_select :date_of_birth,
prompt: true,
start_year: 1900, end_year: 16.years.ago.year %>
</div>
<div class="small-12 medium-6">
<input type="submit" value="<%= t("officing.residence.new.submit") %>" class="button expanded">
</div>
<% end %> <% end %>
</div> </div>
</div> </div>

View File

@@ -1,3 +1,3 @@
<div class="callout warning"> <div class="callout warning inline-block">
<%= t("officing.voters.show.error_already_voted") %> <%= t("officing.voters.show.error_already_voted") %>
</div> </div>

View File

@@ -1,15 +1,30 @@
<%= back_link_to new_officing_residence_path %>
<h2><%= t("officing.voters.new.title") %></h2> <h2><%= t("officing.voters.new.title") %></h2>
<% if @polls.any? %>
<table>
<thead>
<tr>
<th><%= t("officing.voters.new.table_poll") %></th>
<th><%= t("officing.voters.new.table_actions") %></th>
</tr>
</thead>
<tbody>
<% @polls.each do |poll| %> <% @polls.each do |poll| %>
<div id="<%= dom_id(poll) %>"> <tr id="<%= dom_id(poll) %>">
<div><%= poll.name %></div> <td>
<%= poll.name %>
<div id="actions"> </td>
<td id="actions">
<% if poll.votable_by?(@user) %> <% if poll.votable_by?(@user) %>
<%= render "can_vote", poll: poll %> <%= render "can_vote", poll: poll %>
<% else %> <% else %>
<%= render "already_voted" %> <%= render "already_voted" %>
<% end %> <% end %>
</div> </td>
</div> </tr>
<% end %>
</tbody>
</table>
<% end %> <% end %>

View File

@@ -16,3 +16,7 @@ en:
confirmation_code: "Confirmation code" confirmation_code: "Confirmation code"
email: email:
recipient: "Email" recipient: "Email"
officing/residence:
document_type: "Document type"
document_number: "Document number (including letters)"
date_of_birth: "Date of birth"

View File

@@ -16,3 +16,7 @@ es:
confirmation_code: "Código de confirmación" confirmation_code: "Código de confirmación"
email: email:
recipient: "Email" recipient: "Email"
officing/residence:
document_type: "Tipo documento"
document_number: "Numero de documento (incluida letra)"
date_of_birth: "Fecha de nacimiento"

View File

@@ -34,14 +34,15 @@ en:
create: "Document verified with Census" create: "Document verified with Census"
new: new:
title: Validate document title: Validate document
document_number: Document number document_number: "Document number (including letters)"
document_type_label: Document type
submit: Validate document submit: Validate document
error_verifying_census: "The Census was unable to verify this document." error_verifying_census: "The Census was unable to verify this document."
form_errors: prevented the verification of this document form_errors: prevented the verification of this document
voters: voters:
new: new:
title: Polls title: Polls
table_poll: Poll
table_actions: Validate
show: show:
error_already_voted: Has already participated in this poll error_already_voted: Has already participated in this poll
submit: Validate vote submit: Validate vote

View File

@@ -34,15 +34,16 @@ es:
create: "Documento verificado con el Padrón" create: "Documento verificado con el Padrón"
new: new:
title: Validar documento title: Validar documento
document_number: Número de documento document_number: "Número de documento (incluida letra)"
document_type_label: Tipo de documento
submit: Validar documento submit: Validar documento
error_verifying_census: El Padrón no pudo verificar este documento. error_verifying_census: El Padrón no pudo verificar este documento.
form_errors: evitaron verificar este documento form_errors: evitaron verificar este documento
voters: voters:
new: new:
title: Votaciones title: Votaciones
table_poll: Votación
table_actions: Validar
show: show:
error_already_voted: "Ya ha participado en la votación." error_already_voted: "Ya ha participado en esta votación."
submit: Validar voto submit: Validar voto
success: Voto validado correctamente. success: Voto validado correctamente.