diff --git a/app/controllers/registrar/nameservers_controller.rb b/app/controllers/registrar/nameservers_controller.rb index 68c1dbfee..ea4d9568b 100644 --- a/app/controllers/registrar/nameservers_controller.rb +++ b/app/controllers/registrar/nameservers_controller.rb @@ -1,46 +1,48 @@ class Registrar::NameserversController < RegistrarController - load_and_authorize_resource + # turned off requested by client - def index - if can_replace_hostnames? - 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 - ), - params[:q][:hostname_end], - params[:hostname_end_replacement] - ) + # load_and_authorize_resource - 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) - else - flash.now[:warning] = t(:hostnames_partially_replaced) - end - end + # def index + # if can_replace_hostnames? + # 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 + # ), + # params[:q][:hostname_end], + # params[:hostname_end_replacement] + # ) - nameservers = current_user.registrar.nameservers.includes(:domain) - @q = nameservers.search(params[:q]) - @q.sorts = 'id desc' if @q.sorts.empty? - @nameservers = @q.result.page(params[:page]) - end + # 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) + # else + # flash.now[:warning] = t(:hostnames_partially_replaced) + # end + # end - def replace_all - @domain_params = { nameservers_attributes: { 0 => {} } } - end + # nameservers = current_user.registrar.nameservers.includes(:domain) + # @q = nameservers.search(params[:q]) + # @q.sorts = 'id desc' if @q.sorts.empty? + # @nameservers = @q.result.page(params[:page]) + # end - private + # def replace_all + # @domain_params = { nameservers_attributes: { 0 => {} } } + # end - def can_replace_hostnames? - if params[:replace] && params[:q] - flash.now[:alert] = t('hostname_end_replacement_is_required') unless params[:hostname_end_replacement].present? - flash.now[:alert] = t('hostname_end_is_required') unless params[:q][:hostname_end].present? - return true if flash[:alert].blank? - end - false - end + # private + + # def can_replace_hostnames? + # if params[:replace] && params[:q] + # flash.now[:alert] = t('hostname_end_replacement_is_required') unless params[:hostname_end_replacement].present? + # flash.now[:alert] = t('hostname_end_is_required') unless params[:q][:hostname_end].present? + # return true if flash[:alert].blank? + # end + # false + # end end diff --git a/app/views/registrar/domains/index.haml b/app/views/registrar/domains/index.haml index 46b3362ff..e4faeea80 100644 --- a/app/views/registrar/domains/index.haml +++ b/app/views/registrar/domains/index.haml @@ -1,8 +1,9 @@ - content_for :actions do = link_to(t(:new), new_registrar_domain_path, class: 'btn btn-primary') = link_to(t(:transfer), transfer_registrar_domains_path, class: 'btn btn-default') + -# turned off requested by client -# = link_to(t(:keyrelay), registrar_keyrelay_path, class: 'btn btn-default') - = link_to(t(:nameservers), registrar_nameservers_path, class: 'btn btn-default') + -# = link_to(t(:nameservers), registrar_nameservers_path, class: 'btn btn-default') = render 'shared/title', name: t(:domains) .row diff --git a/config/routes.rb b/config/routes.rb index 7de5f781f..f2faab8a8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -57,11 +57,12 @@ Rails.application.routes.draw do end end - resources :nameservers do - collection do - match 'replace_all', via: [:post, :get] - end - end + # turned off requested by client + # resources :nameservers do + # collection do + # match 'replace_all', via: [:post, :get] + # end + # end resources :contacts do member do