Adds a half-done implementation of on_site_verifications
Things missing: * Implement models/verification/on_site#send_verification_email * Implement the “create new user” path * Tests
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<p class="account-info">
|
||||
<%= t("management.document_type_label") %> <strong><%= humanize_document_type(@verification_on_site.document_type) %></strong>
|
||||
<%= t("management.document_number") %> <strong><%= @verification_on_site.document_number %></strong>
|
||||
<%= t("management.username_label") %> <strong><%= @verification_on_site.user.username %></strong>
|
||||
<%= t("management.email_label") %> <strong><%= @verification_on_site.user.email %></strong>
|
||||
</p>
|
||||
|
||||
<div class="alert-box success radius">
|
||||
<%= t("management.users.already_verified") %>
|
||||
</div>
|
||||
|
||||
<div class="user-permissions">
|
||||
|
||||
<p><%= t("management.users.census_success_info") %></p>
|
||||
|
||||
<ul>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_debates") %></li>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_proposal") %></li>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_support_proposal") %></li>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_votes") %></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<a href="javascript:window.print();" class="button warning radius"><%= t("management.print_info") %></a>
|
||||
@@ -0,0 +1,28 @@
|
||||
<p class="account-info">
|
||||
<%= t("management.document_type_label") %> <strong><%= humanize_document_type(@verification_on_site.document_type) %></strong>
|
||||
<%= t("management.document_number") %> <strong><%= @verification_on_site.document_number %></strong>
|
||||
<%= t("management.username_label") %> <strong><%= @verification_on_site.user.username %></strong>
|
||||
<%= t("management.email_label") %> <strong><%= @verification_on_site.user.email %></strong>
|
||||
</p>
|
||||
|
||||
<p class="account-info"><%= t("management.document_type_label") %> <strong>DNI</strong> <%= t("management.document_number") %> <strong>73562454D</strong> <%= t("management.username_label") %> <strong>Alberto</strong> <%= t("management.email_label") %> <strong>alberto@mail.com</strong> </p>
|
||||
|
||||
<div class="alert-box success radius">
|
||||
<%= t("management.users.email_sent") %>
|
||||
</div>
|
||||
|
||||
<div class="user-permissions">
|
||||
|
||||
<p><%= t("management.users.census_success_info") %></p>
|
||||
|
||||
<ul>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_debates") %></li>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_proposal") %></li>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_support_proposal") %></li>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_votes") %></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<a href="javascript:window.print();" class="button warning radius"><%= t("management.print_info") %></a>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<p class="account-info">
|
||||
<%= t("management.document_type_label") %> <strong><%= humanize_document_type(@verification_on_site.document_type) %></strong>
|
||||
<%= t("management.document_number") %> <strong><%= @verification_on_site.document_number %></strong>
|
||||
</p>
|
||||
|
||||
<div class="alert-box success radius">
|
||||
<%= t("management.users.census_success") %>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<strong><%= t("management.users.has_account") %></strong>
|
||||
|
||||
<p><%= t("management.users.has_account_note") %></p>
|
||||
|
||||
<%= form_for @verification_on_site, url: send_email_management_on_site_verifications_path do |f| %>
|
||||
<%= f.hidden_field :document_type %>
|
||||
<%= f.hidden_field :document_number %>
|
||||
<%= f.text_field :email, label: false, placeholder: t('management.users.has_account_placeholder') %>
|
||||
<%= f.submit t("management.users.has_account_send_email"), class: "button success radius" %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong><%= t("management.users.has_not_account") %></strong>
|
||||
|
||||
<p class="margin-top">
|
||||
<a href="#" class="button radius success"><%= t("management.users.create_user") %></a>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
22
app/views/management/on_site_verifications/index.html.erb
Normal file
22
app/views/management/on_site_verifications/index.html.erb
Normal file
@@ -0,0 +1,22 @@
|
||||
<h2><%= t("management.verification_on_sites.title") %></h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 column">
|
||||
<%= form_for @verification_on_site, url: check_management_on_site_verifications_path do |f| %>
|
||||
<div class="small-12 medium-4">
|
||||
<%= f.select(:document_type,
|
||||
[[humanize_document_type("1"), 1],
|
||||
[humanize_document_type("2"), 2],
|
||||
[humanize_document_type("3"), 3]],
|
||||
label: t("management.document_type_label")) %>
|
||||
</div>
|
||||
<div class="small-12 medium-5">
|
||||
<%= f.text_field :document_number,
|
||||
placeholder: t('management.document_number'),
|
||||
label: t("management.document_number")
|
||||
%>
|
||||
</div>
|
||||
<%= f.submit t("management.check") %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,27 @@
|
||||
<p class="account-info">
|
||||
<%= t("management.document_type_label") %> <strong><%= humanize_document_type(@verification_on_site.document_type) %></strong>
|
||||
<%= t("management.document_number") %> <strong><%= @verification_on_site.document_number %></strong>
|
||||
</p>
|
||||
|
||||
<div class="alert-box alert radius">
|
||||
<%= t("management.users.census_error") %>
|
||||
</div>
|
||||
|
||||
<div class="user-permissions">
|
||||
|
||||
<p><%= t("management.users.census_error_info") %></p>
|
||||
|
||||
<ul>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_debates") %></li>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_proposal") %></li>
|
||||
<li><i class="icon-x"></i> <%= t("management.users.user_permission_support_proposal") %></li>
|
||||
<li><i class="icon-x"></i> <%= t("management.users.user_permission_votes") %></li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<%= t("management.users.has_not_account_html",
|
||||
url: link_to(t("management.users.portal_url"), t("management.users.portal_url"),
|
||||
target: "_blank")).html_safe %>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
29
app/views/management/on_site_verifications/new.html.erb
Normal file
29
app/views/management/on_site_verifications/new.html.erb
Normal file
@@ -0,0 +1,29 @@
|
||||
<p class="account-info">
|
||||
<%= t("management.document_type_label") %> <strong><%= humanize_document_type(@verification_on_site.document_type) %></strong>
|
||||
<%= t("management.document_number") %> <strong><%= @verification_on_site.document_number %></strong>
|
||||
<%= t("management.username_label") %> <strong><%= @verification_on_site.user.username %></strong>
|
||||
<%= t("management.email_label") %> <strong><%= @verification_on_site.user.email %></strong>
|
||||
</p>
|
||||
|
||||
<div class="alert-box success radius">
|
||||
<%= t("management.users.census_success_account") %>
|
||||
</div>
|
||||
|
||||
<div class="user-permissions">
|
||||
|
||||
<p><%= t("management.users.census_success_info") %></p>
|
||||
|
||||
<ul>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_debates") %></li>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_proposal") %></li>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_support_proposal") %></li>
|
||||
<li><i class="icon-x"></i> <%= t("management.users.user_permission_votes") %></li>
|
||||
</ul>
|
||||
|
||||
<%= form_for @verification_on_site, url: management_on_site_verifications_path do |f| %>
|
||||
<%= f.hidden_field :document_type %>
|
||||
<%= f.hidden_field :document_number %>
|
||||
<%= f.submit t("management.users.verify"), class: "button success radius" %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
25
app/views/management/on_site_verifications/verified.html.erb
Normal file
25
app/views/management/on_site_verifications/verified.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<p class="account-info">
|
||||
<%= t("management.document_type_label") %> <strong><%= humanize_document_type(@verification_on_site.document_type) %></strong>
|
||||
<%= t("management.document_number") %> <strong><%= @verification_on_site.document_number %></strong>
|
||||
<%= t("management.username_label") %> <strong><%= @verification_on_site.user.username %></strong>
|
||||
<%= t("management.email_label") %> <strong><%= @verification_on_site.user.email %></strong>
|
||||
</p>
|
||||
|
||||
<div class="alert-box success radius">
|
||||
<%= t("management.users.already_verified") %>
|
||||
</div>
|
||||
|
||||
<div class="user-permissions">
|
||||
|
||||
<p><%= t("management.users.census_success_info") %></p>
|
||||
|
||||
<ul>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_debates") %></li>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_proposal") %></li>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_support_proposal") %></li>
|
||||
<li><i class="icon-check"></i> <%= t("management.users.user_permission_votes") %></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<a href="javascript:window.print();" class="button warning radius"><%= t("management.print_info") %></a>
|
||||
Reference in New Issue
Block a user