This commit is contained in:
Martin Lensment 2015-04-29 12:13:34 +03:00
parent 70aba7d5d1
commit 4c503b6c1a
4 changed files with 21 additions and 8 deletions

View file

@ -3,7 +3,7 @@ class Registrar::NameserversController < RegistrarController
def index
if can_replace_hostnames?
res = Nameserver.replace_hostname_ends(
prc = Nameserver.replace_hostname_ends(
current_user.registrar.domains.includes(
:registrant, :nameservers, :admin_domain_contacts, :tech_domain_contacts, :domain_statuses,
:versions, :admin_contacts, :tech_contacts, :whois_record, :dnskeys
@ -12,7 +12,9 @@ class Registrar::NameserversController < RegistrarController
params[:hostname_end_replacement]
)
if res
if prc == 'replaced_none'
flash.now[:alert] = t('no_hostnames_replaced')
elsif prc == 'replaced_all'
params[:q][:hostname_end] = params[:hostname_end_replacement]
params[:hostname_end_replacement] = nil
flash.now[:notice] = t('all_hostnames_replaced')