mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 23:42:04 +02:00
Add nonverified color email to registrar index
This commit is contained in:
parent
af7e0f266d
commit
e95996fa12
7 changed files with 29 additions and 5 deletions
|
@ -30,6 +30,9 @@ class EmailAddressVerification < ApplicationRecord
|
|||
if validation_request.result.success
|
||||
update(verified_at: Time.zone.now,
|
||||
success: true)
|
||||
else
|
||||
update(verified_at: nil,
|
||||
success: false)
|
||||
end
|
||||
|
||||
validation_request.result.success
|
||||
|
|
|
@ -13,6 +13,14 @@ class Registrar < ApplicationRecord
|
|||
has_many :nameservers, through: :domains
|
||||
has_many :whois_records
|
||||
has_many :white_ips, dependent: :destroy
|
||||
belongs_to :email_address_verification, class_name: 'EmailAddressVerification',
|
||||
primary_key: 'email',
|
||||
foreign_key: 'email',
|
||||
optional: true
|
||||
belongs_to :billing_email_address_verification, class_name: 'EmailAddressVerification',
|
||||
primary_key: 'email',
|
||||
foreign_key: 'billing_email',
|
||||
optional: true
|
||||
|
||||
delegate :balance, to: :cash_account, allow_nil: true
|
||||
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
<th class="col-xs-4">
|
||||
<%= t(:test_registrar) %>
|
||||
</th>
|
||||
<th class="col-xs-4">
|
||||
<%= t(:emails) %>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -45,6 +48,16 @@
|
|||
<td>
|
||||
<%= "#{x.test_registrar}" %>
|
||||
</td>
|
||||
<td>
|
||||
<span class=<%= 'text-danger' unless x.email_address_verification.success %>>
|
||||
<%= "#{x.email}" %>
|
||||
</span>
|
||||
<% if x[:billing_email].present? %>
|
||||
<span class=<%= 'text-danger' unless x.billing_email_address_verification.success %>>
|
||||
<%= "#{x[:billing_email]}" %>
|
||||
</span>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue