diff --git a/Gemfile b/Gemfile index d616cb534..d990fa2cb 100644 --- a/Gemfile +++ b/Gemfile @@ -88,7 +88,7 @@ gem 'digidoc_client', '0.2.1' # epp gem 'epp', '1.4.2', github: 'internetee/epp' -gem 'epp-xml', '1.0.4' # EIS EPP XMLs +gem 'epp-xml', '1.0.5', github: 'internetee/epp-xml' # EIS EPP XMLs gem 'uuidtools', '2.1.5' # For unique IDs (used by the epp gem) # que diff --git a/Gemfile.lock b/Gemfile.lock index dbc1e8e3c..577bbbf20 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -16,6 +16,14 @@ GIT data_migrate (1.3.0) rails (>= 4.1.0) +GIT + remote: https://github.com/internetee/epp-xml.git + revision: 475f650951f2cf5015e00d48f408a2194ecc1662 + specs: + epp-xml (1.0.5) + activesupport (~> 4.1) + builder (~> 3.2) + GIT remote: https://github.com/internetee/epp.git revision: 505c3f2739eb1da918e54111aecfb138a822739d @@ -191,9 +199,6 @@ GEM docile (1.1.5) domain_name (0.5.25) unf (>= 0.0.5, < 1.0.0) - epp-xml (1.0.4) - activesupport (~> 4.1) - builder (~> 3.2) equalizer (0.0.11) erubis (2.7.0) execjs (2.6.0) @@ -589,7 +594,7 @@ DEPENDENCIES devise (= 3.5.4) digidoc_client (= 0.2.1) epp (= 1.4.2)! - epp-xml (= 1.0.4) + epp-xml (= 1.0.5)! fabrication (= 2.13.2) faker (= 1.4.3) figaro (= 1.1.1) diff --git a/app/models/depp/domain.rb b/app/models/depp/domain.rb index 7b4630008..f181d0000 100644 --- a/app/models/depp/domain.rb +++ b/app/models/depp/domain.rb @@ -66,8 +66,9 @@ module Depp def delete(domain_params) xml = epp_xml.delete({ - name: { value: domain_params[:name] } - }, Depp::Domain.construct_custom_params_hash(domain_params)) + name: { value: domain_params[:name] }}, + Depp::Domain.construct_custom_params_hash(domain_params), + (domain_params[:verified].present? && 'yes')) current_user.request(xml) end @@ -214,7 +215,8 @@ module Depp rem_arr << { _anonymus: rem_anon } if rem_anon.any? if domain_params[:registrant] != old_domain_params[:registrant] - chg = [{ registrant: { value: domain_params[:registrant] } }] + chg = [{ registrant: { value: domain_params[:registrant] } }] if !domain_params[:verified].present? + chg = [{ registrant: { value: domain_params[:registrant], attrs: { verified: 'yes' } } }] if domain_params[:verified] end add_arr = nil if add_arr.none? diff --git a/app/views/registrar/domains/delete.haml b/app/views/registrar/domains/delete.haml index 13953a6e3..ab1bdfa31 100644 --- a/app/views/registrar/domains/delete.haml +++ b/app/views/registrar/domains/delete.haml @@ -6,6 +6,12 @@ .panel-heading.clearfix = t(:legal_document) .panel-body + .form-group + .col-md-4.control-label + = label_tag 'domain[verified]', t(:verified) + .col-md-6 + = check_box_tag 'domain[verified]', '1', params[:verified].eql?('1'), onclick: "return (confirm('#{t(:verified_confirm)}') ? true : false);" + .form-group .col-md-4.control-label = label_tag 'domain[legal_document]', t(:legal_document), class: 'required' diff --git a/app/views/registrar/domains/form_partials/_general.haml b/app/views/registrar/domains/form_partials/_general.haml index e4c124803..91ae7462f 100644 --- a/app/views/registrar/domains/form_partials/_general.haml +++ b/app/views/registrar/domains/form_partials/_general.haml @@ -24,6 +24,13 @@ = text_field_tag 'domain[registrant_helper]', contacts.find_by(code: @domain_params[:registrant]).try(:search_name), class: 'form-control', data: {autocomplete: search_contacts_registrar_domains_path}, required: true + - if params[:domain_name] + .form-group + .col-md-3.control-label + = label_tag :verified, t(:verified) + .col-md-7 + = check_box_tag 'domain[verified]', '1', @domain_params[:verified].eql?('1'), onclick: "return (confirm('#{t(:verified_confirm)}') ? true : false);" + - unless params[:domain_name] .form-group .col-md-3.control-label diff --git a/config/locales/en.yml b/config/locales/en.yml index de5891c77..2a7f82a20 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -950,3 +950,5 @@ en: edit_pw: 'Edit Pw' optional: 'Optional' test_registrar: "Test registrar" + verified_confirm: 'Verified status is for cases when current registrant is the one applying for the update. Legal document signed by the registrant is required. Are you sure this update is properly verified with the registrant?' + verified: 'Verified'