mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 07:04:47 +02:00
Move Remove clientHold button to domain info
This commit is contained in:
parent
3b332da0bb
commit
5ec2d25ec5
7 changed files with 13 additions and 10 deletions
|
@ -59,6 +59,7 @@ class Registrar
|
|||
def info
|
||||
authorize! :info, Depp::Domain
|
||||
@data = @domain.info(params[:domain_name]) if params[:domain_name]
|
||||
@client_holded = client_holded(@data)
|
||||
if response_ok?
|
||||
render 'info'
|
||||
else
|
||||
|
@ -158,6 +159,8 @@ class Registrar
|
|||
return unless params[:domain_name]
|
||||
|
||||
@data = @domain.remove_hold(params)
|
||||
|
||||
flash[:alert] = @data.css('msg').text unless response_ok?
|
||||
redirect_to info_registrar_domains_url(domain_name: params[:domain_name])
|
||||
end
|
||||
|
||||
|
@ -167,6 +170,10 @@ class Registrar
|
|||
@domain = Depp::Domain.new(current_user: depp_current_user)
|
||||
end
|
||||
|
||||
def client_holded(data)
|
||||
data.css('status')&.map { |element| element.attribute('s').value }
|
||||
&.any? { |status| status == DomainStatus::CLIENT_HOLD }
|
||||
end
|
||||
|
||||
def contacts
|
||||
current_registrar_user.registrar.contacts
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue