Merge branch 'master' into registry-475

# Conflicts:
#	config/locales/et.yml
#	db/structure.sql
This commit is contained in:
Artur Beljajev 2017-06-09 17:32:14 +03:00
commit cb4f2b5eeb
79 changed files with 825 additions and 815 deletions

View file

@ -7,6 +7,7 @@ class DomainUpdateConfirmJob < Que::Job
domain.is_admin = true
case action
when RegistrantVerification::CONFIRMED
old_registrant = domain.registrant
domain.poll_message!(:poll_pending_update_confirmed_by_registrant)
raise_errors!(domain)
@ -15,6 +16,7 @@ class DomainUpdateConfirmJob < Que::Job
domain.clean_pendings!
raise_errors!(domain)
RegistrantChange.new(domain: domain, old_registrant: old_registrant).confirm
when RegistrantVerification::REJECTED
RegistrantChangeMailer.rejected(domain: domain,
registrar: domain.registrar,

View file

@ -1,5 +1,6 @@
class ContactMailer < ApplicationMailer
include Que::Mailer
helper_method :address_processing
def email_updated(old_email, email, contact_id, should_deliver)
@contact = Contact.find_by(id: contact_id)
@ -32,4 +33,10 @@ class ContactMailer < ApplicationMailer
logger.info "EMAIL SENDING FAILED: #{email}: #{e}"
end
end
private
def address_processing
Contact.address_processing?
end
end

View file

@ -1,37 +1,6 @@
class DomainMailer < ApplicationMailer
include Que::Mailer
def registrant_updated_notification_for_new_registrant(domain_id, old_registrant_id, new_registrant_id, should_deliver)
@domain = Domain.find_by(id: domain_id)
return unless @domain
return if delivery_off?(@domain, should_deliver)
@old_registrant = Registrant.find(old_registrant_id)
@new_registrant = Registrant.find(new_registrant_id)
@address_processing = Contact.address_processing?
return if whitelist_blocked?(@new_registrant.email)
mail(to: format(@new_registrant.email),
subject: "#{I18n.t(:registrant_updated_notification_for_new_registrant_subject,
name: @domain.name)} [#{@domain.name}]")
end
def registrant_updated_notification_for_old_registrant(domain_id, old_registrant_id, new_registrant_id, should_deliver)
@domain = Domain.find_by(id: domain_id)
return unless @domain
return if delivery_off?(@domain, should_deliver)
@old_registrant = Registrant.find(old_registrant_id)
@new_registrant = Registrant.find(new_registrant_id)
@address_processing = Contact.address_processing?
return if whitelist_blocked?(@old_registrant.email)
mail(to: format(@old_registrant.email),
subject: "#{I18n.t(:registrant_updated_notification_for_old_registrant_subject,
name: @domain.name)} [#{@domain.name}]")
end
def pending_delete_rejected_notification(domain_id, should_deliver)
@domain = Domain.find_by(id: domain_id)
return unless @domain

View file

@ -1,4 +1,6 @@
class RegistrantChangeMailer < ApplicationMailer
helper_method :address_processing
def confirm(domain:, registrar:, current_registrant:, new_registrant:)
@domain = DomainPresenter.new(domain: domain, view: view_context)
@registrar = RegistrarPresenter.new(registrar: registrar, view: view_context)
@ -19,6 +21,14 @@ class RegistrantChangeMailer < ApplicationMailer
mail(to: new_registrant.email, subject: subject)
end
def confirmed(domain:, old_registrant:)
@domain = domain
recipients = [domain.registrant_email, old_registrant.email]
subject = default_i18n_subject(domain_name: domain.name)
mail(to: recipients, subject: subject)
end
def rejected(domain:, registrar:, registrant:)
@domain = DomainPresenter.new(domain: domain, view: view_context)
@registrar = RegistrarPresenter.new(registrar: registrar, view: view_context)
@ -42,4 +52,8 @@ class RegistrantChangeMailer < ApplicationMailer
def confirm_url(domain)
registrant_domain_update_confirm_url(domain, token: domain.registrant_verification_token)
end
def address_processing
Contact.address_processing?
end
end

View file

@ -1,72 +0,0 @@
class Address < ActiveRecord::Base
include Versions # version/address_version.rb
LOCAL_TYPE_SHORT = 'loc'
INTERNATIONAL_TYPE_SHORT = 'int'
LOCAL_TYPE = 'LocalAddress'
TYPES = [
LOCAL_TYPE_SHORT,
INTERNATIONAL_TYPE_SHORT
]
belongs_to :contact
def country
Country.new(country_code)
end
class << self
# def validate_postal_info_types(parsed_frame)
# errors, used = [], []
# parsed_frame.css('postalInfo').each do |pi|
# attr = pi.attributes['type'].try(:value)
# errors << {
# code: 2003, msg: I18n.t('errors.messages.attr_missing', key: 'type')
# } and next unless attr
# unless TYPES.include?(attr)
# errors << {
# code: 2005,
# msg: I18n.t('errors.messages.invalid_type'), value: { obj: 'type', val: attr }
# }
# next
# end
# errors << {
# code: 2005,
# msg: I18n.t('errors.messages.repeating_postal_info')
# } and next if used.include?(attr)
# used << attr
# end; errors
# end
def extract_attributes(ah)
address_hash = {}
ah = ah.first if ah.is_a?(Array)
address_hash[:address_attributes] = addr_hash_from_params(ah)
address_hash
end
private
# def local?(postal_info)
# return :local_address_attributes if postal_info[:type] == LOCAL_TYPE_SHORT
# :international_address_attributes
# end
def addr_hash_from_params(addr)
return {} if addr.nil?
return {} unless addr[:addr].is_a?(Hash)
{ country_code: Country.new(addr[:addr][:cc]).try(:alpha2),
city: addr[:addr][:city],
street: pretty_street(addr[:addr][:street]), # [0],
# street2: addr[:addr][:street][1],
# street3: addr[:addr][:street][2],
zip: addr[:addr][:pc]
}.delete_if { |_k, v| v.nil? }
end
def pretty_street(param_street)
return param_street.join(',') if param_street.is_a?(Array)
param_street
end
end
end

View file

@ -3,11 +3,11 @@ class Contact < ActiveRecord::Base
include EppErrors
include UserEvents
belongs_to :registrar
belongs_to :registrar, required: true
has_many :domain_contacts
has_many :domains, through: :domain_contacts
has_many :legal_documents, as: :documentable
has_many :registrant_domains, class_name: 'Domain', foreign_key: 'registrant_id' # when contant is registrant
has_many :registrant_domains, class_name: 'Domain', foreign_key: 'registrant_id'
# TODO: remove later
has_many :depricated_statuses, class_name: 'DepricatedContactStatus', dependent: :destroy
@ -19,7 +19,7 @@ class Contact < ActiveRecord::Base
accepts_nested_attributes_for :legal_documents
validates :name, :phone, :email, :ident, :ident_type, :registrar, presence: true
validates :name, :phone, :email, :ident, :ident_type, presence: true
validates :street, :city, :zip, :country_code, presence: true, if: 'self.class.address_processing?'
validates :phone, format: /\+[0-9]{1,3}\.[0-9]{1,14}?/, phone: true
@ -429,6 +429,8 @@ class Contact < ActiveRecord::Base
end
def related_domain_descriptions
ActiveSupport::Deprecation.warn('Use #domain_names_with_roles')
@desc = {}
registrant_domains.each do |dom|
@ -594,4 +596,28 @@ class Contact < ActiveRecord::Base
return unless priv?
ident
end
def ident_country
Country.new(ident_country_code)
end
def used?
registrant_domains.any? || domain_contacts.any?
end
def domain_names_with_roles
domain_names = {}
registrant_domains.pluck(:name).each do |domain_name|
domain_names[domain_name] ||= Set.new
domain_names[domain_name] << Registrant.name.underscore.to_sym
end
domain_contacts.each do |domain_contact|
domain_names[domain_contact.domain.name] ||= Set.new
domain_names[domain_contact.domain.name] << domain_contact.type.underscore.to_sym
end
domain_names
end
end

View file

@ -19,8 +19,8 @@ class Domain < ActiveRecord::Base
# TODO: whois requests ip whitelist for full info for own domains and partial info for other domains
# TODO: most inputs should be trimmed before validatation, probably some global logic?
belongs_to :registrar
belongs_to :registrant
belongs_to :registrar, required: true
belongs_to :registrant, required: true
# TODO: should we user validates_associated :registrant here?
has_many :admin_domain_contacts
@ -104,8 +104,7 @@ class Domain < ActiveRecord::Base
validates :name_dirty, domain_name: true, uniqueness: true
validates :puny_label, length: { maximum: 63 }
validates :period, numericality: { only_integer: true }
validates :registrant, :registrar, presence: true
validates :period, presence: true, numericality: { only_integer: true }
validate :validate_reservation
def validate_reservation

View file

@ -521,9 +521,7 @@ class Epp::Domain < Domain
preclean_pendings
user = ApiUser.find(pending_json['current_user_id'])
frame = Nokogiri::XML(pending_json['frame'])
old_registrant_id = registrant_id
self.deliver_emails = true # turn on email delivery
self.statuses.delete(DomainStatus::PENDING_UPDATE)
self.upid = user.registrar.id if user.registrar
self.up_date = Time.zone.now
@ -531,11 +529,9 @@ class Epp::Domain < Domain
return unless update(frame, user, false)
clean_pendings!
save! # for notification if everything fails
save!
WhoisRecord.find_by(domain_id: id).save # need to reload model
DomainMailer.registrant_updated_notification_for_old_registrant(id, old_registrant_id, registrant_id, true).deliver
DomainMailer.registrant_updated_notification_for_new_registrant(id, old_registrant_id, registrant_id, true).deliver
true
end

View file

@ -61,18 +61,8 @@ module Soap
def initialize
if self.class.username.nil?
if Rails.application.secrets.key?(:arireg)
arireg = Rails.application.secrets[:arireg].with_indifferent_access
self.class.username = arireg[:username]
self.class.password = arireg[:password]
if self.class.wsdl.nil? # no override of config/environments/* ?
self.class.wsdl = arireg[:wsdl]
self.class.host = arireg[:host]
end
else
self.class.username = ENV['arireg_username']
self.class.password = ENV['arireg_password']
end
self.class.username = ENV['arireg_username']
self.class.password = ENV['arireg_password']
end
if self.class.wsdl.nil?
self.class.wsdl = ENV['arireg_wsdl']

View file

@ -1,5 +0,0 @@
class AddressVersion < PaperTrail::Version
include VersionSession
self.table_name = :log_addresses
self.sequence_name = :log_addresses_id_seq
end

View file

@ -1,13 +1,38 @@
class RegistrantPresenter
delegate :name, :ident, :email, :priv?, :street, :city, :id_code, :reg_no, to: :registrant
delegate :name,
:ident,
:phone,
:email,
:priv?,
:id_code,
:reg_no,
:street, :city, :state, :zip, :country,
:ident_country,
:used?,
to: :registrant
def initialize(registrant:, view:)
@registrant = registrant
@view = view
end
def country
def country(locale: I18n.locale)
registrant.country.translation(locale)
end
def ident_country(locale: I18n.locale)
registrant.ident_country.translation(locale)
end
def domain_names_with_roles(locale: I18n.locale, line_break: "\n")
lines = []
registrant.domain_names_with_roles.each do |domain_name, roles|
lines << "#{domain_name} (#{roles.map { |role| role.to_s.classify.constantize.model_name.human(locale: locale) }
.join(', ')})"
end
lines.join(line_break).html_safe
end
private

View file

@ -0,0 +1,19 @@
class RegistrantChange
def initialize(domain:, old_registrant:)
@domain = domain
@old_registrant = old_registrant
end
def confirm
notify_registrant
end
private
def notify_registrant
RegistrantChangeMailer.confirmed(domain: domain, old_registrant: old_registrant).deliver_now
end
attr_reader :domain
attr_reader :old_registrant
end

View file

@ -11,11 +11,11 @@
.col-md-3
.form-group
= label_tag :registrant
= f.search_field :registrant, value: params[:q][:registrant], class: 'form-control', placeholder: t(:registrant)
= f.search_field :registrant, value: params[:q][:registrant], class: 'form-control', placeholder: t('.registrant_placeholder')
.col-md-3
.form-group
= label_tag t(:registrar_name)
= f.search_field :registrar, value: params[:q][:registrar], class: 'form-control', placeholder: t(:registrant)
= f.search_field :registrar, value: params[:q][:registrar], class: 'form-control', placeholder: t('.registrant')
.col-md-3
.form-group
= label_tag :action
@ -45,7 +45,7 @@
%th{class: 'col-xs-2'}
= t(:name)
%th{class: 'col-xs-2'}
= t(:registrant)
= t('.registrant')
%th{class: 'col-xs-2'}
= t(:registrar_name)
%th{class: 'col-xs-2'}

View file

@ -30,11 +30,11 @@
- domain_name = domain.name
%dd= link_to(domain_name, admin_domain_path(@version.item_id))
%dt= t(:created)
%dt= t('.created')
%dd
= l(domain.created_at, format: :short)
%dt= t(:updated)
%dt= t('.updated')
%dd
= l(domain.updated_at, format: :short)
@ -46,7 +46,7 @@
- domain.statuses.each do |s|
= s
%dt= t(:registrant)
%dt= t('.registrant')
%dd{class: changing_css_class(@version,"registrant_id")}
- registrant.each do |r|
- link = r.version_loader ? admin_contact_version_path(r.version_loader.try(:id)) : admin_contact_path(r.id)
@ -57,7 +57,7 @@
= r[:code]
%br
%dt= t(:admin_contacts)
%dt= t('.admin_contacts')
%dd
- admin_contacts.each do |r|
- link = r.version_loader ? admin_contact_version_path(r.version_loader.try(:id)) : admin_contact_path(r.id)
@ -68,7 +68,7 @@
= r[:code]
%br
%dt= t(:tech_contacts)
%dt= t('.tech_contacts')
%dd
- tech_contacts.each do |r|
- link = r.version_loader ? admin_contact_version_path(r.version_loader.try(:id)) : admin_contact_path(r.id)

View file

@ -58,7 +58,7 @@
%th{class: 'col-xs-2'}
= sort_link(@q, 'name')
%th{class: 'col-xs-2'}
= sort_link(@q, 'registrant_name', t(:registrant))
= sort_link(@q, 'registrant_name', t('.registrant'))
%th{class: 'col-xs-2'}
= sort_link(@q, 'valid_to', t(:valid_to))
%th{class: 'col-xs-2'}

View file

@ -1,7 +1,7 @@
- panel_class = @domain.errors.messages[:admin_contacts] ? 'panel-danger' : 'panel-default'
.panel{class: panel_class}
.panel-heading.clearfix
= t(:admin_contacts)
= t('.title')
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead

View file

@ -1,6 +1,6 @@
.panel.panel-default
.panel-heading
%h3.panel-title= t(:registrant)
%h3.panel-title= t('.title')
.panel-body
%dl.dl-horizontal
%dt= t(:name)

View file

@ -1,7 +1,7 @@
- panel_class = @domain.errors.messages[:tech_contacts] ? 'panel-danger' : 'panel-default'
#tech_contacts.panel{class: panel_class}
.panel-heading.clearfix
= t(:tech_contacts)
= t('.title')
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead

View file

@ -11,9 +11,9 @@
%th{class: 'col-xs-1'}= t('.time')
%th{class: 'col-xs-2'}= t(:statuses)
%th{class: 'col-xs-1'}= t(:period)
%th{class: 'col-xs-2'}= t(:registrant)
%th{class: 'col-xs-2'}= t('.registrant')
%th{class: 'col-xs-2'}= t('.admin_contact')
%th{class: 'col-xs-2'}= t(:tech)
%th{class: 'col-xs-2'}= t('.tech_contact')
%th{class: 'col-xs-2'}= t(:nameservers)
%th{class: 'col-xs-2'}= t(:dnskeys)
%th{class: 'col-xs-2'}= t(:registrar_name)

View file

@ -1,55 +1,49 @@
Tere <%= @contact.name %>
<%
contact = RegistrantPresenter.new(registrant: @contact, view: self)
registrar = RegistrarPresenter.new(registrar: @contact.registrar, view: self)
%>
Tere <%= contact.name %>
<br><br>
Kontakti <%= @contact.name %> e-posti aadress on muudetud<br>
Kontakti <%= contact.name %> e-posti aadress on muudetud<br>
endine aadress: <%= @old_email %><br>
uus aadress: <%= @contact.email %>
uus aadress: <%= contact.email %>
<br><br>
E-posti aadressile saadetakse domeeni toimingutega seotud infot, sealhulgas kinnitustaotlused omanikuvahetuse ja domeeni kustutamise korral. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @contact.registrar.name %> poole.
E-posti aadressile saadetakse domeeni toimingutega seotud infot, sealhulgas kinnitustaotlused omanikuvahetuse ja domeeni kustutamise korral.
<br><br>
<% if @contact.related_domain_descriptions.present? %>
Muudatusega seotud domeenid:<br>
<% @contact.related_domain_descriptions.each do |domain, desc| %>
<%= domain %> (<%= desc.map { |d| t(d, locale: :et) }.join(', ') %>)<br>
<% if contact.used? %>
Muudatusega seotud domeenid:<br>
<%= contact.domain_names_with_roles(locale: :et, line_break: '<br>') %>
<% end %>
<% end %>
<br>
<br><br>
Kontaktandmed:<br>
Nimi: <%= @contact.name %><br>
Isikukood: <%= @contact.ident %><br>
E-post: <%= @contact.email %><br>
Tel: <%= @contact.phone %><br>
Tänav: <%= @contact.street %><br>
Linn: <%= @contact.city %><br>
Riik: <%= @contact.country %>
<%= render 'mailers/shared/registrant/registrant.et.html', registrant: contact, with_phone: true %>
<br><br>
Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole:
<%= render 'mailers/shared/registrar/registrar.et.html', registrar: registrar %>
<br><br>
Lugupidamisega<br>
Eesti Interneti Sihtasutus
<br><br>
<hr>
<br><br>
Hi <%= @contact.name %>
Hi <%= contact.name %>
<br><br>
E-mail address of <%= @contact.name %> has been changed<br>
E-mail address of <%= contact.name %> has been changed<br>
previous address: <%= @old_email %><br>
new address: <%= @contact.email %>
new address: <%= contact.email %>
<br><br>
E-mail addresses are used to send important information regarding your registered domains including applications for approval of registrant change and domain deletion. Please make sure that the update and contact information are correct. Incase of problems please turn to your registrar. Your registrar is <%= @contact.registrar.name %>
E-mail addresses are used to send important information regarding your registered domains including applications for approval of registrant change and domain deletion. Please make sure that the update and contact information are correct.
<br><br>
<% if @contact.related_domain_descriptions.present? %>
Domains affected by this update:<br>
<% @contact.related_domain_descriptions.each do |domain, desc| %>
<%= domain %> (<%= desc.map { |d| t(d, locale: :en) }.join(', ') %>)<br>
<% if contact.used? %>
Domains affected by this update:<br>
<%= contact.domain_names_with_roles(line_break: '<br>') %>
<% end %>
<% end %>
<br>
<br><br>
Contact information:<br>
Name: <%= @contact.name %><br>
Identity Code: <%= @contact.ident %><br>
E-mail: <%= @contact.email %><br>
Tel: <%= @contact.phone %><br>
Street: <%= @contact.street %><br>
City: <%= @contact.city %><br>
Country: <%= @contact.country %>
<%= render 'mailers/shared/registrant/registrant.en.html', registrant: contact, with_phone: true %>
<br><br>
In case of problems please turn to your registrar:
<%= render 'mailers/shared/registrar/registrar.en.html', registrar: registrar %>
<br><br>
Best Regards,<br>
Estonian Internet Foundation

View file

@ -1,55 +1,49 @@
Tere <%= @contact.name %>
<%
contact = RegistrantPresenter.new(registrant: @contact, view: self)
registrar = RegistrarPresenter.new(registrar: @contact.registrar, view: self)
%>
Tere <%= contact.name %>
Kontakti <%= @contact.name %> e-posti aadress on muudetud
Kontakti <%= contact.name %> e-posti aadress on muudetud
endine aadress: <%= @old_email %>
uus aadress: <%= @contact.email %>
uus aadress: <%= contact.email %>
E-posti aadressile saadetakse domeeni toimingutega seotud infot, sealhulgas kinnitustaotlused omanikuvahetuse ja domeeni kustutamise korral. Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja <%= @contact.registrar.name %> poole.
E-posti aadressile saadetakse domeeni toimingutega seotud infot, sealhulgas kinnitustaotlused omanikuvahetuse ja domeeni kustutamise korral.
<% if @contact.related_domain_descriptions.present? %>
Muudatusega seotud domeenid:
<% @contact.related_domain_descriptions.each do |domain, desc| %>
<%= domain %> (<%= desc.map { |d| t(d, locale: :et) }.join(', ') %>)
<% end %>
<% if contact.used? %>
Muudatusega seotud domeenid:
<%= contact.domain_names_with_roles(locale: :et) %>
<% end %>
Kontaktandmed:
Nimi: <%= @contact.name %>
Isikukood: <%= @contact.ident %>
E-post: <%= @contact.email %>
Tel: <%= @contact.phone %>
Tänav: <%= @contact.street %>
Linn: <%= @contact.city %>
Riik: <%= @contact.country %>
<%= render 'mailers/shared/registrant/registrant.et.text', registrant: contact, with_phone: true %>
Palun veenduge, et muudatus on korrektne ning probleemide korral pöörduge oma registripidaja poole:
<%= render 'mailers/shared/registrar/registrar.et.text', registrar: registrar %>
Lugupidamisega
Eesti Interneti Sihtasutus
----------------------------------------------------------------------------------
Hi <%= @contact.name %>
Hi <%= contact.name %>
E-mail address of <%= @contact.name %> has been changed
E-mail address of <%= contact.name %> has been changed
previous address: <%= @old_email %>
new address: <%= @contact.email %>
new address: <%= contact.email %>
E-mail addresses are used to send important information regarding your registered domains including applications for approval of registrant change and domain deletion. Please make sure that the update and contact information are correct. Incase of problems please turn to your registrar. Your registrar is <%= @contact.registrar.name %>
E-mail addresses are used to send important information regarding your registered domains including applications for approval of registrant change and domain deletion. Please make sure that the update and contact information are correct.
<% if @contact.related_domain_descriptions.present? %>
Domains affected by this update:
<% @contact.related_domain_descriptions.each do |domain, desc| %>
<%= domain %> (<%= desc.map { |d| t(d, locale: :en) }.join(', ') %>)
<% end %>
<% if contact.used? %>
Domains affected by this update:
<%= contact.domain_names_with_roles %>
<% end %>
Contact information:
Name: <%= @contact.name %>
Identity Code: <%= @contact.ident %>
E-mail: <%= @contact.email %>
Tel: <%= @contact.phone %>
Street: <%= @contact.street %>
City: <%= @contact.city %>
Country: <%= @contact.country %>
<%= render 'mailers/shared/registrant/registrant.en.text', registrant: contact, with_phone: true %>
In case of problems please turn to your registrar:
<%= render 'mailers/shared/registrar/registrar.en.text', registrar: registrar %>
Best Regards,
Estonian Internet Foundation

View file

@ -1,43 +0,0 @@
Tere
<br><br>
Domeeni <%= @domain.name %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
<br><br>
Uue registreerija andmed:<br>
Nimi: <%= @new_registrant.name %><br>
<% if @new_registrant.priv? %>
Isikukood: <%= @new_registrant.ident %><br>
<% else %>
Äriregistrikood: <%= @new_registrant.ident %><br>
<% end %>
Epost: <%= @new_registrant.email %><br>
<% if @address_processing -%>
Tänav: <%= @new_registrant.street %><br>
Linn: <%= @new_registrant.city %><br>
Riik: <%= @new_registrant.country.name %>
<% end -%>
<br><br>
Lugupidamisega<br>
Eesti Interneti Sihtasutus
<br><br>
<hr>
<br><br>
Hi,
<br><br>
Process for changing registrant of the domain <%= @domain.name %> has been approved and the data in the registry is updated.
<br><br>
New registrant:<br>
Name: <%= @new_registrant.name %><br>
<% if @new_registrant.priv? %>
Personal code: <%= @new_registrant.ident %><br>
<% else %>
Business Registry code: <%= @new_registrant.ident %><br>
<% end %>
E-mail: <%= @new_registrant.email %><br>
<% if @address_processing -%>
Street: <%= @new_registrant.street %><br>
City: <%= @new_registrant.city %><br>
Country: <%= @new_registrant.country.name %>
<% end -%>
<br><br>
Best Regards,<br>
Estonian Internet Foundation

View file

@ -1,45 +0,0 @@
Tere
Domeeni <%= @domain.name %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
Uue registreerija andmed:
Nimi: <%= @new_registrant.name %>
<% if @new_registrant.priv? %>
Isikukood: <%= @new_registrant.ident %>
<% else %>
Äriregistrikood: <%= @new_registrant.ident %>
<% end %>
Epost: <%= @new_registrant.email %>
<% if @address_processing -%>
Tänav: <%= @new_registrant.street %>
Linn: <%= @new_registrant.city %>
Riik: <%= @new_registrant.country.name %>
<% end -%>
Lugupidamisega
Eesti Interneti Sihtasutus
--------------------------------------
Hi,
Process for changing registrant of the domain <%= @domain.name %> has been approved and the data in the registry is updated.
New registrant:
Name: <%= @new_registrant.name %>
<% if @new_registrant.priv? %>
Personal code: <%= @new_registrant.ident %>
<% else %>
Business Registry code: <%= @new_registrant.ident %>
<% end %>
E-mail: <%= @new_registrant.email %>
<% if @address_processing -%>
Street: <%= @new_registrant.street %>
City: <%= @new_registrant.city %>
Country: <%= @new_registrant.country.name %>
<% end -%>
Best Regards,
Estonian Internet Foundation

View file

@ -1,43 +0,0 @@
Tere
<br><br>
Domeeni <%= @domain.name %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
<br><br>
Uue registreerija andmed:<br>
Nimi: <%= @new_registrant.name %><br>
<% if @new_registrant.priv? %>
Isikukood: <%= @new_registrant.ident %><br>
<% else %>
Äriregistrikood: <%= @new_registrant.ident %><br>
<% end %>
Epost: <%= @new_registrant.email %><br>
<% if @address_processing -%>
Tänav: <%= @new_registrant.street %><br>
Linn: <%= @new_registrant.city %><br>
Riik: <%= @new_registrant.country.name %>
<% end -%>
<br><br>
Lugupidamisega<br>
Eesti Interneti Sihtasutus
<br><br>
<hr>
<br><br>
Hi,
<br><br>
Process for changing registrant of the domain <%= @domain.name %> has been approved and the data in the registry is updated.
<br><br>
New registrant:<br>
Name: <%= @new_registrant.name %><br>
<% if @new_registrant.priv? %>
Personal code: <%= @new_registrant.ident %><br>
<% else %>
Business Registry code: <%= @new_registrant.ident %><br>
<% end %>
E-mail: <%= @new_registrant.email %><br>
<% if @address_processing -%>
Street: <%= @new_registrant.street %><br>
City: <%= @new_registrant.city %><br>
Country: <%= @new_registrant.country.name %>
<% end -%>
<br><br>
Best Regards,<br>
Estonian Internet Foundation

View file

@ -1,45 +0,0 @@
Tere
Domeeni <%= @domain.name %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
Uue registreerija andmed:
Nimi: <%= @new_registrant.name %>
<% if @new_registrant.priv? %>
Isikukood: <%= @new_registrant.ident %>
<% else %>
Äriregistrikood: <%= @new_registrant.ident %>
<% end %>
Epost: <%= @new_registrant.email %>
<% if @address_processing -%>
Tänav: <%= @new_registrant.street %>
Linn: <%= @new_registrant.city %>
Riik: <%= @new_registrant.country.name %>
<% end -%>
Lugupidamisega
Eesti Interneti Sihtasutus
--------------------------------------
Hi,
Process for changing registrant of the domain <%= @domain.name %> has been approved and the data in the registry is updated.
New registrant:
Name: <%= @new_registrant.name %>
<% if @new_registrant.priv? %>
Personal code: <%= @new_registrant.ident %>
<% else %>
Business Registry code: <%= @new_registrant.ident %>
<% end %>
E-mail: <%= @new_registrant.email %>
<% if @address_processing -%>
Street: <%= @new_registrant.street %>
City: <%= @new_registrant.city %>
Country: <%= @new_registrant.country.name %>
<% end -%>
Best Regards,
Estonian Internet Foundation

View file

@ -0,0 +1,25 @@
<%
domain = DomainPresenter.new(domain: @domain, view: self)
new_registrant = RegistrantPresenter.new(registrant: @domain.registrant, view: self)
%>
Tere
<br><br>
Domeeni <%= domain.name %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
<br><br>
Uue registreerija andmed:<br>
<%= render 'mailers/shared/registrant/registrant.et.html', registrant: new_registrant %>
<br><br>
Lugupidamisega<br>
Eesti Interneti Sihtasutus
<br><br>
<hr>
<br><br>
Hi,
<br><br>
Process for changing registrant of the domain <%= domain.name %> has been approved and the data in the registry is updated.
<br><br>
New registrant:<br>
<%= render 'mailers/shared/registrant/registrant.en.html', registrant: new_registrant %>
<br><br>
Best Regards,<br>
Estonian Internet Foundation

View file

@ -0,0 +1,25 @@
<%
domain = DomainPresenter.new(domain: @domain, view: self)
new_registrant = RegistrantPresenter.new(registrant: @domain.registrant, view: self)
%>
Tere
Domeeni <%= domain.name %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
Uue registreerija andmed:
<%= render 'mailers/shared/registrant/registrant.et.text', registrant: new_registrant %>
Lugupidamisega
Eesti Interneti Sihtasutus
--------------------------------------
Hi,
Process for changing registrant of the domain <%= domain.name %> has been approved and the data in the registry is updated.
New registrant:
<%= render 'mailers/shared/registrant/registrant.en.text', registrant: new_registrant %>
Best Regards,
Estonian Internet Foundation

View file

@ -4,6 +4,15 @@ Name: <%= registrant.name %><br>
<% else %>
Business Registry code: <%= registrant.ident %><br>
<% end %>
Street: <%= registrant.street %><br>
City: <%= registrant.city %><br>
Country: <%= registrant.country %>
<% if local_assigns[:with_phone] -%>
Phone: <%= registrant.phone %><br>
<% end -%>
<% if address_processing -%>
Street: <%= registrant.street %><br>
City: <%= registrant.city %><br>
State: <%= registrant.state %><br>
Zip-code: <%= registrant.zip %><br>
Country: <%= registrant.country %>
<% else %>
Country: <%= registrant.ident_country %>
<% end -%>

View file

@ -4,6 +4,15 @@ Name: <%= registrant.name %>
<% else %>
Business Registry code: <%= registrant.ident %>
<% end %>
Street: <%= registrant.street %>
City: <%= registrant.city %>
Country: <%= registrant.country %>
<% if local_assigns[:with_phone] -%>
Phone: <%= registrant.phone %>
<% end -%>
<% if address_processing -%>
Street: <%= registrant.street %>
City: <%= registrant.city %>
State: <%= registrant.state %>
Zip-code: <%= registrant.zip %>
Country: <%= registrant.country %>
<% else %>
Country: <%= registrant.ident_country %>
<% end -%>

View file

@ -4,6 +4,15 @@ Nimi: <%= registrant.name %><br>
<% else %>
Äriregistrikood: <%= registrant.ident %><br>
<% end %>
Tänav: <%= registrant.street %><br>
Linn: <%= registrant.city %><br>
Riik: <%= registrant.country %>
<% if local_assigns[:with_phone] -%>
Telefon: <%= registrant.phone %><br>
<% end -%>
<% if address_processing -%>
Tänav: <%= registrant.street %><br>
Linn: <%= registrant.city %><br>
Maakond: <%= registrant.state %><br>
Sihtnumber: <%= registrant.zip %><br>
Riik: <%= registrant.country(locale: :et) %>
<% else %>
Riik: <%= registrant.ident_country(locale: :et) %>
<% end -%>

View file

@ -4,6 +4,15 @@ Nimi: <%= registrant.name %>
<% else %>
Äriregistrikood: <%= registrant.ident %>
<% end %>
Tänav: <%= registrant.street %>
Linn: <%= registrant.city %>
Riik: <%= registrant.country %>
<% if local_assigns[:with_phone] -%>
Telefon: <%= registrant.phone %>
<% end -%>
<% if address_processing -%>
Tänav: <%= registrant.street %>
Linn: <%= registrant.city %>
Maakond: <%= registrant.state %>
Sihtnumber: <%= registrant.zip %>
Riik: <%= registrant.country(locale: :et) %>
<% else %>
Riik: <%= registrant.ident_country(locale: :et) %>
<% end -%>

View file

@ -26,7 +26,7 @@
.col-md-12.text-center.confirmation
.column-keys
%p= t(:domain_name) + ':'
%p= t(:registrant) + ':'
%p= t('.registrant') + ':'
.column-values
%p= @domain.name
%p= "#{@domain.registrant_name} (#{@domain.registrant.ident})"

View file

@ -12,7 +12,7 @@
%th{class: 'col-xs-2'}
=t(:name)
%th{class: 'col-xs-2'}
=t(:registrant)
=t('.registrant')
%th{class: 'col-xs-2'}
=t(:valid_to)
%th{class: 'col-xs-2'}

View file

@ -57,7 +57,7 @@
%th{class: 'col-xs-2'}
= sort_link(@q, 'name')
%th{class: 'col-xs-2'}
= sort_link(@q, 'registrant_name', t(:registrant))
= sort_link(@q, 'registrant_name', t('.registrant'))
%th{class: 'col-xs-2'}
= sort_link(@q, 'valid_to', t(:valid_to))
%th{class: 'col-xs-2'}

View file

@ -1,7 +1,7 @@
- panel_class = @domain.errors.messages[:admin_contacts] ? 'panel-danger' : 'panel-default'
.panel{class: panel_class}
.panel-heading.clearfix
= t(:admin_contacts)
= t('.title')
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead

View file

@ -1,6 +1,6 @@
.panel.panel-default
.panel-heading
%h3.panel-title= t(:registrant)
%h3.panel-title= t('.title')
.panel-body
%dl.dl-horizontal
%dt= t(:name)

View file

@ -1,7 +1,7 @@
- panel_class = @domain.errors.messages[:tech_contacts] ? 'panel-danger' : 'panel-default'
#tech_contacts.panel{class: panel_class}
.panel-heading.clearfix
= t(:tech_contacts)
= t('.title')
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead

View file

@ -18,7 +18,7 @@
.form-group
.col-md-3.control-label
= label_tag :domain_registrant, t(:registrant), class: 'required'
= label_tag :domain_registrant, t('.registrant'), class: 'required'
.col-md-7
= text_field_tag 'domain[registrant]', @domain_params[:registrant], class: "hidden"
= text_field_tag 'domain[registrant_helper]', contacts.find_by(code: @domain_params[:registrant]).try(:search_name),

View file

@ -67,7 +67,7 @@
%th{class: 'col-xs-2'}
= sort_link(@q, 'name')
%th{class: 'col-xs-2'}
= sort_link(@q, 'registrant_name', t(:registrant))
= sort_link(@q, 'registrant_name', t('.registrant'))
%th{class: 'col-xs-2'}
= sort_link(@q, 'valid_to', t(:valid_to))
%th{class: 'col-xs-2'}= t('actions')

View file

@ -11,7 +11,7 @@
%dd= @data.css('clID').text
- registrant = Contact.find_by_code(@data.css('registrant').text)
%dt= t(:registrant)
%dt= t('.registrant')
%dd= "#{registrant.name} (#{@data.css('registrant').text})"
%dt= t('.registered')