Merge branch 'master' into registry-270

This commit is contained in:
Artur Beljajev 2017-01-12 14:53:23 +02:00
commit bbf2e427fa
13 changed files with 146 additions and 65 deletions

View file

@ -8,6 +8,7 @@ class DomainMailer < ApplicationMailer
@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),
@ -23,6 +24,7 @@ class DomainMailer < ApplicationMailer
@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),

View file

@ -10,9 +10,11 @@ Nimi: <%= @new_registrant.name %><br>
Ä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
@ -31,9 +33,11 @@ Name: <%= @new_registrant.name %><br>
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

@ -11,9 +11,11 @@ Nimi: <%= @new_registrant.name %>
Ä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
@ -33,9 +35,11 @@ Name: <%= @new_registrant.name %>
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

@ -10,9 +10,11 @@ Isikukood: <%= @new_registrant.ident %><br>
Ä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
@ -31,9 +33,11 @@ Personal code: <%= @new_registrant.ident %><br>
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

@ -11,9 +11,11 @@ Isikukood: <%= @new_registrant.ident %>
Ä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
@ -33,9 +35,11 @@ Personal code: <%= @new_registrant.ident %>
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

@ -4,9 +4,12 @@
.row
.col-md-8
= render 'registrar/contacts/form_partials/general', f: f
.row
.col-md-8
= render 'registrar/contacts/form_partials/address', f: f
- if address_processing?
.row
.col-md-8
= render 'registrar/contacts/form_partials/address', f: f
- if !@contact.persisted?
.row
.col-md-8

View file

@ -4,21 +4,21 @@
.panel-body
.form-group
.col-md-3.control-label
= f.label :street, t(:street)
= f.label :street, t(:street) + '*'
.col-md-7
= f.text_field :street, class: 'form-control', required: address_processing?
= f.text_field :street, class: 'form-control', required: true
.form-group
.col-md-3.control-label
= f.label :city, t(:city)
= f.label :city, t(:city) + '*'
.col-md-7
= f.text_field :city, class: 'form-control', required: address_processing?
= f.text_field :city, class: 'form-control', required: true
.form-group
.col-md-3.control-label
= f.label :zip, t(:zip)
= f.label :zip, t(:zip) + '*'
.col-md-7
= f.text_field :zip, class: 'form-control', required: address_processing?
= f.text_field :zip, class: 'form-control', required: true
.form-group
.col-md-3.control-label
@ -28,10 +28,9 @@
.form-group
.col-md-3.control-label
= f.label :country_code, t(:country)
= f.label :country_code, t(:country) + '*'
.col-md-7
- country_selected = f.object.persisted? ? f.object.country_code : 'EE'
= f.select(:country_code,
SortedCountry.all_options(country_selected),
{ include_blank: true },
required: address_processing?)
= f.select(:country_code, SortedCountry.all_options(country_selected),
{ include_blank: true }, required: true)