mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 21:46:24 +02:00
Merge pull request #2434 from internetee/2420-remove-registrars
Remove registrar portal
This commit is contained in:
commit
2767bfc40b
169 changed files with 52 additions and 6598 deletions
12
Gemfile
12
Gemfile
|
@ -17,7 +17,7 @@ gem 'figaro', '~> 1.2'
|
|||
|
||||
# model related
|
||||
gem 'paper_trail', '~> 12.1'
|
||||
gem 'pg', '1.4.3'
|
||||
gem 'pg', '1.4.3'
|
||||
# 1.8 is for Rails < 5.0
|
||||
gem 'ransack', '~> 2.6.0'
|
||||
gem 'truemail', '~> 2.4' # validates email by regexp, mail server existence and address existence
|
||||
|
@ -30,13 +30,12 @@ gem 'nokogiri', '~> 1.13.0'
|
|||
# style
|
||||
gem 'bootstrap-sass', '~> 3.4'
|
||||
gem 'cancancan'
|
||||
gem 'coderay', '1.1.3' # xml console visualize
|
||||
gem 'coffee-rails', '>= 5.0'
|
||||
gem 'devise', '~> 4.8'
|
||||
gem 'jquery-rails'
|
||||
gem 'kaminari'
|
||||
gem 'sass-rails'
|
||||
gem 'select2-rails', '4.0.13' # for autocomplete
|
||||
gem 'select2-rails', '4.0.13' # for autocomplete
|
||||
gem 'selectize-rails', '0.12.6' # include selectize.js for select
|
||||
|
||||
# registry specfic
|
||||
|
@ -48,7 +47,7 @@ gem 'simpleidn', '0.2.1' # For punycode
|
|||
gem 'whenever', '1.0.0', require: false
|
||||
|
||||
# country listing
|
||||
gem 'countries', :require => 'countries/global'
|
||||
gem 'countries', require: 'countries/global'
|
||||
|
||||
# id + mid login
|
||||
# gem 'digidoc_client', '0.3.0'
|
||||
|
@ -77,7 +76,6 @@ gem 'lhv', github: 'internetee/lhv', branch: 'master'
|
|||
gem 'rexml'
|
||||
gem 'wkhtmltopdf-binary', '~> 0.12.5.1'
|
||||
|
||||
|
||||
gem 'directo', github: 'internetee/directo', branch: 'master'
|
||||
|
||||
group :development, :test do
|
||||
|
@ -95,12 +93,12 @@ group :test do
|
|||
end
|
||||
|
||||
gem 'aws-sdk-sesv2', '~> 1.19'
|
||||
gem 'newrelic-infinite_tracing'
|
||||
gem 'newrelic_rpm'
|
||||
|
||||
# profiles
|
||||
gem 'pghero'
|
||||
gem 'pg_query', '>= 0.9.0'
|
||||
gem 'newrelic_rpm'
|
||||
gem 'newrelic-infinite_tracing'
|
||||
|
||||
# token
|
||||
gem 'jwt'
|
||||
|
|
|
@ -521,7 +521,6 @@ DEPENDENCIES
|
|||
bootstrap-sass (~> 3.4)
|
||||
cancancan
|
||||
capybara
|
||||
coderay (= 1.1.3)
|
||||
coffee-rails (>= 5.0)
|
||||
company_register!
|
||||
countries
|
||||
|
@ -580,4 +579,4 @@ DEPENDENCIES
|
|||
wkhtmltopdf-binary (~> 0.12.5.1)
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.21
|
||||
2.3.23
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
class Registrar
|
||||
class AccountActivitiesController < BaseController
|
||||
load_and_authorize_resource
|
||||
|
||||
def index
|
||||
params[:q] ||= {}
|
||||
account = current_registrar_user.registrar.cash_account
|
||||
|
||||
ca_cache = params[:q][:created_at_lteq]
|
||||
begin
|
||||
end_time = params[:q][:created_at_lteq].try(:to_date)
|
||||
params[:q][:created_at_lteq] = end_time.try(:end_of_day)
|
||||
rescue
|
||||
logger.warn('Invalid date')
|
||||
end
|
||||
|
||||
@q = account.activities.includes(:invoice).ransack(params[:q])
|
||||
@q.sorts = 'id desc' if @q.sorts.empty?
|
||||
|
||||
respond_to do |format|
|
||||
format.html { @account_activities = @q.result.page(params[:page]) }
|
||||
format.csv do
|
||||
raw_csv = CsvGenerator.generate_csv(@q.result)
|
||||
send_data raw_csv, filename: "account_activities_#{Time.zone.now.to_formatted_s(:number)}.csv"
|
||||
end
|
||||
end
|
||||
|
||||
params[:q][:created_at_lteq] = ca_cache
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,34 +0,0 @@
|
|||
class Registrar
|
||||
class AccountController < BaseController
|
||||
skip_authorization_check
|
||||
helper_method :iban_max_length
|
||||
helper_method :balance_auto_reload_setting
|
||||
|
||||
def show; end
|
||||
|
||||
def edit
|
||||
@registrar = current_registrar_user.registrar
|
||||
end
|
||||
|
||||
def update
|
||||
@registrar = current_registrar_user.registrar
|
||||
@registrar.update!(registrar_params)
|
||||
|
||||
redirect_to registrar_account_path, notice: t('.saved')
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def registrar_params
|
||||
params.require(:registrar).permit(:billing_email, :iban)
|
||||
end
|
||||
|
||||
def iban_max_length
|
||||
Iban.max_length
|
||||
end
|
||||
|
||||
def balance_auto_reload_setting
|
||||
current_registrar_user.registrar.settings['balance_auto_reload']
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,21 +0,0 @@
|
|||
class Registrar
|
||||
class AdminContactsController < BulkChangeController
|
||||
BASE_URL = URI.parse("#{ENV['repp_url']}domains/admin_contacts").freeze
|
||||
ACTIVE_TAB = :admin_contact
|
||||
|
||||
def update
|
||||
authorize! :manage, :repp
|
||||
uri = BASE_URL
|
||||
request = form_request(uri)
|
||||
|
||||
action = Actions::DoRequest.new(request, uri)
|
||||
response = action.call
|
||||
|
||||
start_notice = t('.replaced')
|
||||
|
||||
process_response(response: response,
|
||||
start_notice: start_notice,
|
||||
active_tab: ACTIVE_TAB)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,43 +0,0 @@
|
|||
class Registrar
|
||||
class BaseController < ApplicationController
|
||||
include Registrar::ApplicationHelper
|
||||
|
||||
before_action :authenticate_registrar_user!
|
||||
before_action :check_ip_restriction
|
||||
helper_method :depp_controller?
|
||||
helper_method :head_title_sufix
|
||||
before_action :set_paper_trail_whodunnit
|
||||
|
||||
protected
|
||||
|
||||
def current_ability
|
||||
@current_ability ||= Ability.new(current_registrar_user, request.remote_ip)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def check_ip_restriction
|
||||
ip_restriction = Authorization::RestrictedIp.new(request.ip)
|
||||
allowed = ip_restriction.can_access_registrar_area?(current_registrar_user.registrar)
|
||||
|
||||
return if allowed
|
||||
|
||||
sign_out current_registrar_user
|
||||
|
||||
flash[:alert] = t('registrar.authorization.ip_not_allowed', ip: request.ip)
|
||||
redirect_to new_registrar_user_session_url
|
||||
end
|
||||
|
||||
def depp_controller?
|
||||
false
|
||||
end
|
||||
|
||||
def head_title_sufix
|
||||
t(:registrar_head_title_sufix)
|
||||
end
|
||||
|
||||
def user_for_paper_trail
|
||||
current_registrar_user ? current_registrar_user.id_role_username : 'anonymous'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,105 +0,0 @@
|
|||
class Registrar
|
||||
class BulkChangeController < DeppController
|
||||
helper_method :available_contacts
|
||||
|
||||
def new
|
||||
authorize! :manage, :repp
|
||||
@expire_date = Time.zone.now.to_date
|
||||
render 'registrar/bulk_change/new', locals: { active_tab: default_tab }
|
||||
end
|
||||
|
||||
def bulk_renew
|
||||
authorize! :manage, :repp
|
||||
set_form_data
|
||||
|
||||
if ready_to_renew?
|
||||
res = ReppApi.bulk_renew(domain_ids_for_bulk_renew, params[:period],
|
||||
current_registrar_user)
|
||||
|
||||
flash_message(JSON.parse(res))
|
||||
else
|
||||
flash[:notice] = nil
|
||||
end
|
||||
|
||||
render 'registrar/bulk_change/new', locals: { active_tab: :bulk_renew }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def form_request(uri)
|
||||
request = Net::HTTP::Patch.new(uri)
|
||||
request.set_form_data(current_contact_id: params[:current_contact_id],
|
||||
new_contact_id: params[:new_contact_id])
|
||||
request.basic_auth(current_registrar_user.username,
|
||||
current_registrar_user.plain_text_password)
|
||||
request
|
||||
end
|
||||
|
||||
def process_response(response:, start_notice: '', active_tab:)
|
||||
parsed_response = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
if response.code == '200'
|
||||
notices = success_notices(parsed_response, start_notice)
|
||||
|
||||
flash[:notice] = notices.join(', ')
|
||||
redirect_to registrar_domains_url
|
||||
else
|
||||
@error = response.code == '404' ? 'Contact(s) not found' : parsed_response[:message]
|
||||
render 'registrar/bulk_change/new', locals: { active_tab: active_tab }
|
||||
end
|
||||
end
|
||||
|
||||
def success_notices(parsed_response, start_notice)
|
||||
notices = [start_notice]
|
||||
|
||||
notices << "#{t('.affected_domains')}: " \
|
||||
"#{parsed_response[:data][:affected_domains].join(', ')}"
|
||||
|
||||
if parsed_response[:data][:skipped_domains]
|
||||
notices << "#{t('.skipped_domains')}: " \
|
||||
"#{parsed_response[:data][:skipped_domains].join(', ')}"
|
||||
end
|
||||
notices
|
||||
end
|
||||
|
||||
def ready_to_renew?
|
||||
domain_ids_for_bulk_renew.present? && params[:renew].present?
|
||||
end
|
||||
|
||||
def set_form_data
|
||||
@expire_date = params[:expire_date].to_date
|
||||
@domains = domains_by_date(@expire_date)
|
||||
@period = params[:period]
|
||||
end
|
||||
|
||||
def available_contacts
|
||||
current_registrar_user.registrar.contacts.order(:name).pluck(:name, :code)
|
||||
end
|
||||
|
||||
def default_tab
|
||||
:technical_contact
|
||||
end
|
||||
|
||||
def domains_scope
|
||||
current_registrar_user.registrar.domains
|
||||
end
|
||||
|
||||
def domains_by_date(date)
|
||||
domains_scope.where('valid_to <= ?', date)
|
||||
end
|
||||
|
||||
def domain_ids_for_bulk_renew
|
||||
params['domain_ids']&.reject { |id| id.blank? }
|
||||
end
|
||||
|
||||
def renew_task(domains)
|
||||
Domains::BulkRenew::Start.run(domains: domains,
|
||||
period_element: @period,
|
||||
registrar: current_registrar_user.registrar)
|
||||
end
|
||||
|
||||
def flash_message(res)
|
||||
flash[:notice] = res['code'] == 1000 ? t(:bulk_renew_completed) : res['message']
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,163 +0,0 @@
|
|||
class Registrar
|
||||
class ContactsController < DeppController
|
||||
before_action :init_epp_contact
|
||||
helper_method :address_processing?
|
||||
helper_method :ident_types
|
||||
helper_method :domain_filter_params
|
||||
|
||||
def index
|
||||
authorize! :view, Depp::Contact
|
||||
|
||||
params[:q] ||= {}
|
||||
params[:q].delete_if { |_k, v| v.blank? }
|
||||
|
||||
search_params = params[:q].deep_dup
|
||||
|
||||
if search_params[:domain_contacts_type_in].is_a?(Array) &&
|
||||
search_params[:domain_contacts_type_in].delete('registrant')
|
||||
search_params[:registrant_domains_id_not_null] = 1
|
||||
end
|
||||
|
||||
contacts = current_registrar_user.registrar.contacts.includes(:registrar)
|
||||
status_list = params[:statuses_contains]
|
||||
|
||||
if status_list
|
||||
contacts_ids = contacts.select { |c| (c.statuses & status_list.to_a) == status_list.to_a }
|
||||
.map(&:id)
|
||||
contacts = contacts.where(id: contacts_ids)
|
||||
end
|
||||
|
||||
normalize_search_parameters do
|
||||
@q = contacts.ransack(search_params)
|
||||
end
|
||||
|
||||
contacts = @q.result
|
||||
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
contacts_per_page = params[:results_per_page].to_i
|
||||
@contacts = contacts.page(params[:page])
|
||||
@contacts = @contacts.per(contacts_per_page) if contacts_per_page.positive?
|
||||
end
|
||||
format.csv do
|
||||
raw_csv = CsvGenerator.generate_csv(contacts)
|
||||
send_data raw_csv, filename: 'contacts.csv', type: "#{Mime[:csv]}; charset=utf-8"
|
||||
end
|
||||
format.pdf do
|
||||
raw_html = ApplicationController.render(
|
||||
template: 'registrar/contacts/list_pdf',
|
||||
assigns: { contacts: contacts },
|
||||
formats: [:html]
|
||||
)
|
||||
raw_pdf = contacts.pdf(raw_html)
|
||||
|
||||
send_data raw_pdf, filename: 'contacts.pdf'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
authorize! :create, Depp::Contact
|
||||
@contact = Depp::Contact.new
|
||||
end
|
||||
|
||||
def show
|
||||
authorize! :view, Depp::Contact
|
||||
@contact = Depp::Contact.find_by_id(params[:id])
|
||||
end
|
||||
|
||||
def edit
|
||||
authorize! :edit, Depp::Contact
|
||||
@contact = Depp::Contact.find_by_id(params[:id])
|
||||
end
|
||||
|
||||
def create
|
||||
authorize! :create, Depp::Contact
|
||||
@contact = Depp::Contact.new(contact_params)
|
||||
|
||||
if @contact.save
|
||||
redirect_to registrar_contact_url(@contact.id)
|
||||
else
|
||||
render 'new'
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
authorize! :edit, Depp::Contact
|
||||
@contact = Depp::Contact.new(contact_params)
|
||||
|
||||
if @contact.update_attributes(contact_params)
|
||||
redirect_to registrar_contact_url(@contact.id)
|
||||
else
|
||||
render 'edit'
|
||||
end
|
||||
end
|
||||
|
||||
def delete
|
||||
authorize! :delete, Depp::Contact
|
||||
@contact = Depp::Contact.find_by_id(params[:id])
|
||||
end
|
||||
|
||||
def destroy
|
||||
authorize! :delete, Depp::Contact
|
||||
@contact = Depp::Contact.new(contact_params_for_delete)
|
||||
|
||||
if @contact.delete
|
||||
redirect_to registrar_contacts_url, notice: t(:destroyed)
|
||||
else
|
||||
render 'delete'
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def domain_filter_params
|
||||
params.permit(:domain_filter)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def init_epp_contact
|
||||
Depp::Contact.user = depp_current_user
|
||||
end
|
||||
|
||||
def normalize_search_parameters
|
||||
ca_cache = params[:q][:valid_to_lteq]
|
||||
begin
|
||||
end_time = params[:q][:valid_to_lteq].try(:to_date)
|
||||
params[:q][:valid_to_lteq] = end_time.try(:end_of_day)
|
||||
rescue
|
||||
logger.warn('Invalid date')
|
||||
end
|
||||
|
||||
yield
|
||||
|
||||
params[:q][:valid_to_lteq] = ca_cache
|
||||
end
|
||||
|
||||
def address_processing?
|
||||
Contact.address_processing?
|
||||
end
|
||||
|
||||
def ident_types
|
||||
Contact::Ident.types
|
||||
end
|
||||
|
||||
def contact_params
|
||||
params.require(:depp_contact).permit(:id,
|
||||
:name,
|
||||
:email,
|
||||
:phone,
|
||||
:org_name,
|
||||
:ident, :ident_type, :ident_country_code,
|
||||
:street, :city, :zip, :state, :country_code,
|
||||
:password,
|
||||
:legal_document,
|
||||
:code)
|
||||
end
|
||||
|
||||
def contact_params_for_delete
|
||||
params.require(:depp_contact).permit(:id, :password, :legal_document)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,18 +0,0 @@
|
|||
class Registrar
|
||||
class CurrentUserController < BaseController
|
||||
skip_authorization_check
|
||||
|
||||
def switch
|
||||
raise 'Cannot switch to unlinked user' unless current_registrar_user.linked_with?(new_user)
|
||||
|
||||
sign_in(:registrar_user, new_user)
|
||||
redirect_back(fallback_location: root_path, notice: t('.switched', new_user: new_user))
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def new_user
|
||||
@new_user ||= ApiUser.find(params[:new_user_id])
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,28 +0,0 @@
|
|||
class Registrar
|
||||
class DepositsController < BaseController
|
||||
authorize_resource class: false
|
||||
|
||||
def new
|
||||
@deposit = Deposit.new
|
||||
end
|
||||
|
||||
def create
|
||||
@deposit = Deposit.new(deposit_params.merge(registrar: current_registrar_user.registrar))
|
||||
@invoice = @deposit.issue_prepayment_invoice
|
||||
|
||||
if @invoice
|
||||
flash[:notice] = t(:please_pay_the_following_invoice)
|
||||
redirect_to [:registrar, @invoice]
|
||||
else
|
||||
flash[:alert] = @deposit.errors.full_messages.join(', ')
|
||||
redirect_to new_registrar_deposit_path
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def deposit_params
|
||||
params.require(:deposit).permit(:amount, :description)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,37 +0,0 @@
|
|||
class Registrar
|
||||
class DeppController < BaseController
|
||||
helper_method :depp_current_user
|
||||
|
||||
rescue_from(Errno::ECONNRESET, Errno::ECONNREFUSED) do |exception|
|
||||
logger.error 'COULD NOT CONNECT TO REGISTRY'
|
||||
logger.error exception.backtrace.join("\n")
|
||||
redirect_to new_registrar_user_session_url, alert: t(:no_connection_to_registry)
|
||||
end
|
||||
|
||||
before_action :authenticate_user
|
||||
|
||||
def authenticate_user
|
||||
redirect_to new_registrar_user_session_url and return unless depp_current_user
|
||||
end
|
||||
|
||||
def depp_controller?
|
||||
true
|
||||
end
|
||||
|
||||
def depp_current_user
|
||||
return nil unless current_registrar_user
|
||||
@depp_current_user ||= Depp::User.new(
|
||||
tag: current_registrar_user.username,
|
||||
password: current_registrar_user.plain_text_password
|
||||
)
|
||||
end
|
||||
|
||||
def response_ok?
|
||||
@data.css('result').each do |x|
|
||||
success_codes = %(1000, 1001, 1300, 1301)
|
||||
return false unless success_codes.include?(x['code'])
|
||||
end
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,49 +0,0 @@
|
|||
class Registrar
|
||||
class DomainTransfersController < BulkChangeController
|
||||
before_action do
|
||||
authorize! :transfer, Depp::Domain
|
||||
end
|
||||
|
||||
def new
|
||||
end
|
||||
|
||||
def create
|
||||
if params[:batch_file].present?
|
||||
csv = CSV.read(params[:batch_file].path, headers: true)
|
||||
domain_transfers = []
|
||||
|
||||
csv.each do |row|
|
||||
domain_name = row['Domain']
|
||||
transfer_code = row['Transfer code']
|
||||
domain_transfers << { 'domain_name' => domain_name, 'transfer_code' => transfer_code }
|
||||
end
|
||||
|
||||
uri = URI.parse("#{ENV['repp_url']}domains/transfer")
|
||||
request = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
|
||||
request.body = { data: { domain_transfers: domain_transfers } }.to_json
|
||||
request.basic_auth(current_registrar_user.username,
|
||||
current_registrar_user.plain_text_password)
|
||||
|
||||
action = Actions::DoRequest.new(request, uri)
|
||||
response = action.call
|
||||
|
||||
parsed_response = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
if response.code == '200'
|
||||
failed = parsed_response[:data][:failed].pluck(:domain_name).join(', ')
|
||||
flash[:notice] = t('.transferred', count: parsed_response[:data][:success].size,
|
||||
failed: failed)
|
||||
redirect_to registrar_domains_url
|
||||
else
|
||||
@api_errors = parsed_response[:message]
|
||||
render 'registrar/bulk_change/new', locals: { active_tab: :bulk_transfer }
|
||||
end
|
||||
else
|
||||
params[:request] = true # EPP domain:transfer "op" attribute
|
||||
domain = Depp::Domain.new(current_user: depp_current_user)
|
||||
@data = domain.transfer(params)
|
||||
render :new unless response_ok?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,227 +0,0 @@
|
|||
class Registrar
|
||||
class DomainsController < DeppController
|
||||
before_action :init_domain, except: :new
|
||||
helper_method :contacts
|
||||
helper_method :search_params
|
||||
|
||||
def index
|
||||
authorize! :view, Depp::Domain
|
||||
|
||||
if search_params.to_h.delete_if { |_key, value| value.blank? }.length == 1 &&
|
||||
search_params[:name_matches].present?
|
||||
domain = Domain.find_by(name: search_params[:name_matches])
|
||||
|
||||
redirect_to info_registrar_domains_url(domain_name: domain.name) and return if domain
|
||||
end
|
||||
|
||||
domains = if params[:statuses_contains]
|
||||
current_domain_scope.where('domains.statuses @> ?::varchar[]',
|
||||
"{#{params[:statuses_contains].join(',')}}")
|
||||
else
|
||||
current_domain_scope
|
||||
end
|
||||
|
||||
domains = domains.where(contacts: { ident: params[:contacts_ident_eq] }) if params[:contacts_ident_eq]
|
||||
|
||||
normalize_search_parameters do
|
||||
@q = domains.ransack(search_params.except(:contacts_ident_eq))
|
||||
@domains = @q.result.page(params[:page])
|
||||
|
||||
# if we do not get any results, add wildcards to the name field and search again
|
||||
if @domains.count == 0 && search_params[:name_matches] !~ /^%.+%$/
|
||||
new_search_params = search_params.to_h.except(:contacts_ident_eq)
|
||||
new_search_params[:name_matches] = "%#{new_search_params[:name_matches]}%"
|
||||
@q = domains.ransack(new_search_params)
|
||||
@domains = @q.result.page(params[:page])
|
||||
end
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.csv do
|
||||
domain_presenters = []
|
||||
|
||||
@q.result.find_each do |domain|
|
||||
domain_presenters << ::DomainPresenter.new(domain: domain, view: view_context)
|
||||
end
|
||||
|
||||
raw_csv = Registrar::DomainListCsvPresenter.new(domains: domain_presenters,
|
||||
view: view_context).to_s
|
||||
filename = "Domains_#{l(Time.zone.now, format: :filename)}.csv"
|
||||
send_data raw_csv, filename: filename, type: "#{Mime[:csv]}; charset=utf-8"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def current_domain_scope
|
||||
current_registrar_user.registrar.domains.includes(:registrar, :registrant)
|
||||
end
|
||||
|
||||
def info
|
||||
authorize! :info, Depp::Domain
|
||||
@data = @domain.info(params[:domain_name]) if params[:domain_name]
|
||||
@pending_delete = domain_delete_pending(@data)
|
||||
@client_holded = client_holded(@data)
|
||||
if response_ok?
|
||||
render 'info'
|
||||
else
|
||||
flash[:alert] = @data.css('msg').text
|
||||
redirect_to registrar_domains_url and return
|
||||
end
|
||||
end
|
||||
|
||||
def check
|
||||
authorize! :check, Depp::Domain
|
||||
if params[:domain_name]
|
||||
@data = @domain.check(params[:domain_name])
|
||||
render 'check_index' and return unless response_ok?
|
||||
else
|
||||
render 'check_index'
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
authorize! :create, Depp::Domain
|
||||
@domain_params = Depp::Domain.default_params
|
||||
@domain_params[:period] = Depp::Domain.default_period
|
||||
end
|
||||
|
||||
# rubocop:disable Metrics/CognitiveComplexity
|
||||
def create
|
||||
authorize! :create, Depp::Domain
|
||||
@domain_params = domain_params.to_h
|
||||
@data = @domain.create(@domain_params)
|
||||
|
||||
if @data && response_ok?
|
||||
redirect_to info_registrar_domains_url(domain_name: @domain_params[:name])
|
||||
else
|
||||
flash[:alert] = t('.email_error_message') unless @emails_check_result
|
||||
render 'new'
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
authorize! :update, Depp::Domain
|
||||
@data = @domain.info(params[:domain_name])
|
||||
@domain_params = Depp::Domain.construct_params_from_server_data(@data)
|
||||
@dispute = Dispute.active.find_by(domain_name: params[:domain_name])
|
||||
end
|
||||
|
||||
def update
|
||||
authorize! :update, Depp::Domain
|
||||
@domain_params = params[:domain]
|
||||
@data = @domain.update(@domain_params)
|
||||
@dispute = Dispute.active.find_by(domain_name: @domain_params[:name])
|
||||
|
||||
if @data && response_ok?
|
||||
redirect_to info_registrar_domains_url(domain_name: @domain_params[:name])
|
||||
else
|
||||
flash[:alert] = t('.email_error_message') unless @emails_check_result
|
||||
params[:domain_name] = @domain_params[:name]
|
||||
render 'new'
|
||||
end
|
||||
end
|
||||
# rubocop:enable Metrics/CognitiveComplexity
|
||||
|
||||
def delete
|
||||
authorize! :delete, Depp::Domain
|
||||
end
|
||||
|
||||
def destroy
|
||||
authorize! :delete, Depp::Domain
|
||||
@data = @domain.delete(params[:domain])
|
||||
@results = @data.css('result')
|
||||
if response_ok?
|
||||
flash[:notice] = t('.deleting_request')
|
||||
redirect_to info_registrar_domains_url(domain_name: params[:domain][:name])
|
||||
else
|
||||
params[:domain_name] = params[:domain][:name]
|
||||
render 'delete'
|
||||
end
|
||||
end
|
||||
|
||||
def renew
|
||||
authorize! :renew, Depp::Domain
|
||||
if params[:domain_name] && params[:cur_exp_date]
|
||||
@data = @domain.renew(params)
|
||||
render 'renew_index' and return unless response_ok?
|
||||
else
|
||||
params[:period] = Depp::Domain.default_period
|
||||
render 'renew_index'
|
||||
end
|
||||
end
|
||||
|
||||
def search_contacts
|
||||
authorize! :create, Depp::Domain
|
||||
|
||||
scope = current_registrar_user.registrar.contacts.limit(10)
|
||||
if params[:query].present?
|
||||
escaped_str = ActiveRecord::Base.connection.quote_string params[:query]
|
||||
scope = scope.where("name ilike '%#{escaped_str}%' OR code ilike '%#{escaped_str}%' ")
|
||||
end
|
||||
|
||||
render json: scope.pluck(:name, :code).map { |c| { display_key: "#{c.second} #{c.first}", value: c.second } }
|
||||
end
|
||||
|
||||
def remove_hold
|
||||
authorize! :remove_hold, Depp::Domain
|
||||
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
|
||||
|
||||
private
|
||||
|
||||
def init_domain
|
||||
@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 domain_delete_pending(data)
|
||||
data.css('status')&.map { |element| element.attribute('s').value }
|
||||
&.any? { |status| status.include?(DomainStatus::PENDING_DELETE) }
|
||||
end
|
||||
|
||||
def contacts
|
||||
current_registrar_user.registrar.contacts
|
||||
end
|
||||
|
||||
def normalize_search_parameters
|
||||
ca_cache = search_params[:valid_to_lteq]
|
||||
begin
|
||||
end_time = search_params[:valid_to_lteq].try(:to_date)
|
||||
search_params[:valid_to_lteq] = end_time.try(:end_of_day)
|
||||
rescue
|
||||
logger.warn('Invalid date')
|
||||
end
|
||||
|
||||
yield
|
||||
|
||||
search_params[:valid_to_lteq] = ca_cache
|
||||
end
|
||||
|
||||
def search_params
|
||||
params.fetch(:q, {}).permit(:name_matches,
|
||||
:registrant_ident_eq,
|
||||
:contacts_ident_eq,
|
||||
:nameservers_hostname_eq,
|
||||
:valid_to_gteq,
|
||||
:valid_to_lteq,
|
||||
:s)
|
||||
end
|
||||
|
||||
def domain_params
|
||||
params.require(:domain).permit(:name, :period, :registrant, :registrant_helper, :reserved_pw,
|
||||
:verified, :legal_document, contacts_attributes: {},
|
||||
nameservers_attributes: {},
|
||||
dnskeys_attributes: {})
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
class Registrar
|
||||
module Invoices
|
||||
class DeliveryController < BaseController
|
||||
include Deliverable
|
||||
|
||||
private
|
||||
|
||||
def redirect_url
|
||||
registrar_invoice_path(@invoice)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,38 +0,0 @@
|
|||
class Registrar
|
||||
class InvoicesController < BaseController
|
||||
load_and_authorize_resource
|
||||
|
||||
def index
|
||||
params[:q] ||= {}
|
||||
invoices = current_registrar_user.registrar.invoices.includes(:items, :account_activity)
|
||||
|
||||
normalize_search_parameters do
|
||||
@q = invoices.ransack(params[:q])
|
||||
@q.sorts = 'id desc' if @q.sorts.empty?
|
||||
@invoices = @q.result.page(params[:page])
|
||||
end
|
||||
end
|
||||
|
||||
def show; end
|
||||
|
||||
def cancel
|
||||
@invoice.cancel
|
||||
EisBilling::SendInvoiceStatus.send_info(invoice_number: @invoice.number, status: 'cancelled')
|
||||
|
||||
redirect_to [:registrar, @invoice], notice: t('.cancelled')
|
||||
end
|
||||
|
||||
def download
|
||||
filename = "invoice-#{@invoice.number}.pdf"
|
||||
send_data @invoice.as_pdf, filename: filename
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def normalize_search_parameters
|
||||
params[:q][:total_gteq].gsub!(',', '.') if params[:q][:total_gteq]
|
||||
params[:q][:total_lteq].gsub!(',', '.') if params[:q][:total_lteq]
|
||||
yield
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,65 +0,0 @@
|
|||
class Registrar
|
||||
class NameserversController < BulkChangeController
|
||||
def update
|
||||
authorize! :manage, :repp
|
||||
|
||||
ipv4 = params[:ipv4].split("\r\n")
|
||||
ipv6 = params[:ipv6].split("\r\n")
|
||||
|
||||
uri = URI.parse("#{ENV['repp_url']}registrar/nameservers")
|
||||
|
||||
domains = domain_list_from_csv
|
||||
|
||||
return csv_list_empty_guard if domains == []
|
||||
|
||||
options = {
|
||||
uri: uri,
|
||||
ipv4: ipv4,
|
||||
ipv6: ipv6,
|
||||
}
|
||||
action = Actions::BulkNameserversChange.new(params, domains, current_registrar_user, options)
|
||||
response = action.call
|
||||
|
||||
parsed_response = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
if response.code == '200'
|
||||
redirect_to(registrar_domains_url,
|
||||
flash: { notice: compose_notice_message(parsed_response) })
|
||||
else
|
||||
@api_errors = parsed_response[:message]
|
||||
render 'registrar/bulk_change/new', locals: { active_tab: :nameserver }
|
||||
end
|
||||
end
|
||||
|
||||
def compose_notice_message(res)
|
||||
action_text = params[:old_hostname].blank? ? t('.added') : t('.replaced')
|
||||
notices = ["#{action_text}. #{t('.affected_domains')}: " \
|
||||
"#{res[:data][:affected_domains].join(', ')}"]
|
||||
|
||||
notices << "#{t('.skipped_domains')}: #{res[:data][:skipped_domains].join(', ')}" if res[:data][:skipped_domains]
|
||||
|
||||
notices.join(', ')
|
||||
end
|
||||
|
||||
def csv_list_empty_guard
|
||||
notice = 'CSV scoped domain list seems empty. Make sure that domains are added and ' \
|
||||
'"Domain" header is present.'
|
||||
redirect_to(registrar_domains_url, flash: { notice: notice })
|
||||
end
|
||||
|
||||
def domain_list_from_csv
|
||||
return if params[:puny_file].blank?
|
||||
|
||||
domains = []
|
||||
csv = CSV.read(params[:puny_file].path, headers: true)
|
||||
|
||||
return [] if csv['Domain'].blank?
|
||||
|
||||
csv.map { |b| domains << b['Domain'] }
|
||||
|
||||
domains.compact
|
||||
rescue CSV::MalformedCSVError
|
||||
[]
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,66 +0,0 @@
|
|||
class Registrar
|
||||
class PaymentsController < BaseController
|
||||
protect_from_forgery except: [:back, :callback]
|
||||
|
||||
skip_authorization_check # actually anyone can pay, no problems at all
|
||||
skip_before_action :authenticate_registrar_user!, :check_ip_restriction,
|
||||
only: [:back, :callback]
|
||||
|
||||
before_action :check_supported_payment_method, only: [:pay]
|
||||
|
||||
def pay
|
||||
invoice = Invoice.find(params[:invoice_id])
|
||||
channel = params[:bank]
|
||||
|
||||
@payment_order = PaymentOrder.new_with_type(type: channel, invoice: invoice)
|
||||
@payment_order.save
|
||||
@payment_order.reload
|
||||
|
||||
@payment_order.return_url = registrar_return_payment_with_url(@payment_order)
|
||||
@payment_order.response_url = registrar_response_payment_with_url(@payment_order)
|
||||
|
||||
@payment_order.save
|
||||
@payment_order.reload
|
||||
end
|
||||
|
||||
def back
|
||||
@payment_order = PaymentOrder.find_by!(id: params[:payment_order])
|
||||
@payment_order.update!(response: params.to_unsafe_h)
|
||||
|
||||
if @payment_order.payment_received?
|
||||
@payment_order.complete_transaction
|
||||
|
||||
if @payment_order.invoice.paid?
|
||||
flash[:notice] = t('.payment_successful')
|
||||
else
|
||||
flash[:alert] = t('.successful_payment_backend_error')
|
||||
end
|
||||
else
|
||||
@payment_order.create_failure_report
|
||||
flash[:alert] = t('.payment_not_received')
|
||||
end
|
||||
redirect_to registrar_invoice_path(@payment_order.invoice)
|
||||
end
|
||||
|
||||
def callback
|
||||
@payment_order = PaymentOrder.find_by!(id: params[:payment_order])
|
||||
@payment_order.update!(response: params.to_unsafe_h)
|
||||
|
||||
if @payment_order.payment_received?
|
||||
@payment_order.complete_transaction
|
||||
else
|
||||
@payment_order.create_failure_report
|
||||
end
|
||||
|
||||
render status: 200, json: { status: 'ok' }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def check_supported_payment_method
|
||||
return if PaymentOrder.supported_method?(params[:bank], shortname: true)
|
||||
|
||||
raise(StandardError, 'Not supported payment method')
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,44 +0,0 @@
|
|||
class Registrar
|
||||
class PollsController < DeppController
|
||||
authorize_resource class: false
|
||||
before_action :init_epp_xml
|
||||
|
||||
def show
|
||||
if Rails.env.test? # Stub for depp server request
|
||||
@data = Object.new
|
||||
|
||||
def @data.css(key)
|
||||
; [];
|
||||
end
|
||||
else
|
||||
@data = depp_current_user.request(@ex.poll)
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@data = depp_current_user.request(@ex.poll(poll: { value: '', attrs: { op: 'ack', msgID: params[:id] } }))
|
||||
|
||||
@results = @data.css('result')
|
||||
|
||||
@data = depp_current_user.request(@ex.poll)
|
||||
render 'show'
|
||||
end
|
||||
|
||||
def confirm_transfer
|
||||
domain_params = params[:domain]
|
||||
@data = @domain.confirm_transfer(domain_params)
|
||||
|
||||
@results = @data.css('result')
|
||||
@data = depp_current_user.request(@ex.poll)
|
||||
|
||||
render 'show'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def init_epp_xml
|
||||
@ex = EppXml::Session.new(cl_trid_prefix: depp_current_user.tag)
|
||||
@domain = Depp::Domain.new(current_user: depp_current_user)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,108 +0,0 @@
|
|||
class Registrar
|
||||
class SessionsController < Devise::SessionsController
|
||||
before_action :check_ip_restriction
|
||||
helper_method :depp_controller?
|
||||
|
||||
def create
|
||||
@depp_user = Depp::User.new(depp_user_params)
|
||||
|
||||
if @depp_user.pki && request.env['HTTP_SSL_CLIENT_S_DN_CN'].blank?
|
||||
@depp_user.errors.add(:base, :webserver_missing_user_name_directive)
|
||||
end
|
||||
|
||||
if @depp_user.pki && request.env['HTTP_SSL_CLIENT_CERT'].blank?
|
||||
@depp_user.errors.add(:base, :webserver_missing_client_cert_directive)
|
||||
end
|
||||
|
||||
if @depp_user.pki && request.env['HTTP_SSL_CLIENT_S_DN_CN'] == '(null)'
|
||||
@depp_user.errors.add(:base, :webserver_user_name_directive_should_be_required)
|
||||
end
|
||||
|
||||
if @depp_user.pki && request.env['HTTP_SSL_CLIENT_CERT'] == '(null)'
|
||||
@depp_user.errors.add(:base, :webserver_client_cert_directive_should_be_required)
|
||||
end
|
||||
|
||||
@api_user = ApiUser.find_by(username: sign_in_params[:username],
|
||||
plain_text_password: sign_in_params[:password])
|
||||
|
||||
unless @api_user
|
||||
@depp_user.errors.add(:base, t(:no_such_user))
|
||||
show_error and return
|
||||
end
|
||||
|
||||
if @depp_user.pki && !@api_user.pki_ok?(request.env['HTTP_SSL_CLIENT_CERT'],
|
||||
request.env['HTTP_SSL_CLIENT_S_DN_CN'], api: false)
|
||||
@depp_user.errors.add(:base, :invalid_cert)
|
||||
end
|
||||
|
||||
show_error and return unless @depp_user.errors.none?
|
||||
|
||||
if @api_user.active?
|
||||
sign_in_and_redirect(:registrar_user, @api_user)
|
||||
else
|
||||
@depp_user.errors.add(:base, :not_active)
|
||||
show_error
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def depp_controller?
|
||||
false
|
||||
end
|
||||
|
||||
def find_user_by_idc(idc)
|
||||
return User.new unless idc
|
||||
ApiUser.find_by(identity_code: idc) || User.new
|
||||
end
|
||||
|
||||
def find_user_by_idc_and_allowed(idc)
|
||||
return User.new unless idc
|
||||
|
||||
possible_users = ApiUser.where(identity_code: idc) || User.new
|
||||
possible_users.each do |selected_user|
|
||||
return selected_user if selected_user.registrar.white_ips.registrar_area.include_ip?(request.ip)
|
||||
end
|
||||
end
|
||||
|
||||
def check_ip_restriction
|
||||
ip_restriction = Authorization::RestrictedIp.new(request.ip)
|
||||
allowed = ip_restriction.can_access_registrar_area_sign_in_page?
|
||||
|
||||
return if allowed
|
||||
|
||||
render plain: t('registrar.authorization.ip_not_allowed', ip: request.ip)
|
||||
end
|
||||
|
||||
def current_ability
|
||||
@current_ability ||= Ability.new(current_registrar_user, request.remote_ip)
|
||||
end
|
||||
|
||||
def after_sign_in_path_for(_resource_or_scope)
|
||||
if can?(:show, :poll)
|
||||
registrar_root_path
|
||||
else
|
||||
registrar_account_path
|
||||
end
|
||||
end
|
||||
|
||||
def after_sign_out_path_for(_resource_or_scope)
|
||||
new_registrar_user_session_path
|
||||
end
|
||||
|
||||
def user_for_paper_trail
|
||||
current_registrar_user ? current_registrar_user.id_role_username : 'anonymous'
|
||||
end
|
||||
|
||||
def depp_user_params
|
||||
params = sign_in_params
|
||||
params[:tag] = params.delete(:username)
|
||||
params.merge!(pki: !(Rails.env.development? || Rails.env.test?))
|
||||
params
|
||||
end
|
||||
|
||||
def show_error
|
||||
redirect_to new_registrar_user_session_url, alert: @depp_user.errors.full_messages.first
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,52 +0,0 @@
|
|||
class Registrar
|
||||
module Settings
|
||||
class BalanceAutoReloadController < BaseController
|
||||
before_action :authorize
|
||||
|
||||
def edit
|
||||
@type = if current_registrar.settings['balance_auto_reload']
|
||||
type_params = current_registrar.settings['balance_auto_reload']['type']
|
||||
.except('name')
|
||||
BalanceAutoReloadTypes::Threshold.new(type_params)
|
||||
else
|
||||
BalanceAutoReloadTypes::Threshold.new
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
type = BalanceAutoReloadTypes::Threshold.new(type_params)
|
||||
current_registrar.update!(settings: { balance_auto_reload: { type: type } })
|
||||
|
||||
redirect_to registrar_account_path, notice: t('.saved')
|
||||
end
|
||||
|
||||
def destroy
|
||||
current_registrar.settings.delete('balance_auto_reload')
|
||||
current_registrar.save!
|
||||
|
||||
redirect_to registrar_account_path, notice: t('.disabled')
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def type_params
|
||||
permitted_params = params.require(:type).permit(:amount, :threshold)
|
||||
normalize_params(permitted_params)
|
||||
end
|
||||
|
||||
def normalize_params(params)
|
||||
params[:amount] = params[:amount].to_f
|
||||
params[:threshold] = params[:threshold].to_f
|
||||
params
|
||||
end
|
||||
|
||||
def authorize
|
||||
authorize!(:manage, :balance_auto_reload)
|
||||
end
|
||||
|
||||
def current_registrar
|
||||
current_registrar_user.registrar
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,22 +0,0 @@
|
|||
class Registrar
|
||||
class TechContactsController < BulkChangeController
|
||||
BASE_URL = URI.parse("#{ENV['repp_url']}domains/contacts").freeze
|
||||
ACTIVE_TAB = :technical_contact
|
||||
|
||||
def update
|
||||
authorize! :manage, :repp
|
||||
|
||||
uri = BASE_URL
|
||||
request = form_request(uri)
|
||||
|
||||
action = Actions::DoRequest.new(request, uri)
|
||||
response = action.call
|
||||
|
||||
start_notice = t('.replaced')
|
||||
|
||||
process_response(response: response,
|
||||
start_notice: start_notice,
|
||||
active_tab: ACTIVE_TAB)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,62 +0,0 @@
|
|||
class Registrar
|
||||
class XmlConsolesController < DeppController
|
||||
PREFS = %w[
|
||||
domain-ee
|
||||
contact-ee
|
||||
eis
|
||||
epp-ee
|
||||
].freeze
|
||||
|
||||
authorize_resource class: false
|
||||
|
||||
def show; end
|
||||
|
||||
def create
|
||||
begin
|
||||
@result = depp_current_user.server.request(params[:payload])
|
||||
rescue StandardError
|
||||
@result = 'CONNECTION ERROR - Is the EPP server running?'
|
||||
end
|
||||
render :show
|
||||
end
|
||||
|
||||
def load_xml
|
||||
cl_trid = "#{depp_current_user.tag}-#{Time.zone.now.to_i}"
|
||||
xml_dir_path = Rails.root.join('app/views/registrar/xml_consoles/epp_requests').to_s
|
||||
xml = File.read("#{xml_dir_path}/#{params[:obj]}/#{params[:epp_action]}.xml")
|
||||
xml = prepare_payload(xml, cl_trid)
|
||||
|
||||
render plain: xml
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def prepare_payload(xml, cl_trid)
|
||||
PREFS.map do |pref|
|
||||
xml = load_schema_by_prefix(pref, xml)
|
||||
end
|
||||
|
||||
xml.gsub!('<clTRID>ABC-12345</clTRID>', "<clTRID>#{cl_trid}</clTRID>")
|
||||
xml
|
||||
end
|
||||
|
||||
def load_schema_by_prefix(pref, xml)
|
||||
case pref
|
||||
when 'epp-ee'
|
||||
insert_prefix_and_version(xml, pref, '1.0')
|
||||
when 'eis'
|
||||
insert_prefix_and_version(xml, pref, '1.0')
|
||||
when 'contact-ee'
|
||||
insert_prefix_and_version(xml, pref, '1.1')
|
||||
else
|
||||
insert_prefix_and_version(xml, pref, '1.2')
|
||||
end
|
||||
end
|
||||
|
||||
def insert_prefix_and_version(xml, pref, version)
|
||||
xml.gsub!("\"#{pref}\"",
|
||||
"\"#{Xsd::Schema.filename(for_prefix: pref.to_s, for_version: version)}\"")
|
||||
xml
|
||||
end
|
||||
end
|
||||
end
|
|
@ -43,7 +43,7 @@ module Repp
|
|||
|
||||
def validate_renew_period
|
||||
@epp_errors ||= ActiveModel::Errors.new(self)
|
||||
periods = Depp::Domain::PERIODS.map { |p| p[1] }
|
||||
periods = Domain::PERIODS.map { |p| p[1] }
|
||||
return if periods.include? bulk_renew_params[:renew_period]
|
||||
|
||||
@epp_errors.add(:epp_errors, msg: 'Invalid renew period', code: '2005')
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
module Registrar::ApplicationHelper
|
||||
def env_style
|
||||
return '' if unstable_env.nil?
|
||||
"background-image: url(#{image_path("registrar/bg-#{unstable_env}.png")});"
|
||||
end
|
||||
end
|
|
@ -31,12 +31,6 @@ class Ability
|
|||
end
|
||||
|
||||
def epp # Registrar/api_user dynamic role
|
||||
if @user.registrar.api_ip_white?(@ip)
|
||||
can :manage, Depp::Contact
|
||||
can :manage, :xml_console
|
||||
can :manage, Depp::Domain
|
||||
end
|
||||
|
||||
can :manage, Account
|
||||
|
||||
# Poll
|
||||
|
@ -122,7 +116,6 @@ class Ability
|
|||
customer_service
|
||||
can :manage, :registrant_domains
|
||||
can :manage, :registrant_whois
|
||||
can :manage, Depp::Domain
|
||||
can :manage, Domain
|
||||
end
|
||||
|
||||
|
|
|
@ -1,318 +0,0 @@
|
|||
module Depp
|
||||
class Contact
|
||||
include ActiveModel::Model
|
||||
|
||||
attr_accessor :id, :name, :email, :phone, :org_name,
|
||||
:ident, :ident_type, :ident_country_code,
|
||||
:street, :city, :zip, :state, :country_code,
|
||||
:password, :legal_document, :statuses, :code,
|
||||
:email_history
|
||||
|
||||
DISABLED = 'Disabled'
|
||||
DISCLOSURE_TYPES = [DISABLED, '1', '0']
|
||||
TYPES = %w( org priv birthday )
|
||||
SELECTION_TYPES = [
|
||||
['Business code', 'org'],
|
||||
['Personal identification code', 'priv'],
|
||||
['Birthday', 'birthday']
|
||||
]
|
||||
|
||||
validates :phone, e164: true, phone: true
|
||||
|
||||
class << self
|
||||
attr_reader :epp_xml, :user
|
||||
|
||||
def new_from_params(params)
|
||||
new(
|
||||
id: params[:code],
|
||||
code: params[:code],
|
||||
email: params[:email],
|
||||
phone: params[:phone],
|
||||
ident: params[:ident],
|
||||
ident_type: params[:ident_type],
|
||||
ident_country_code: params[:ident_country_code],
|
||||
|
||||
# postalInfo
|
||||
name: params[:name],
|
||||
org_name: params[:org_name],
|
||||
|
||||
# address
|
||||
street: params[:street],
|
||||
city: params[:city],
|
||||
zip: params[:zip],
|
||||
state: params[:state],
|
||||
country_code: params[:country_code]
|
||||
)
|
||||
end
|
||||
|
||||
def find_by_id(id)
|
||||
data = info_xml(id)
|
||||
|
||||
res = data.css('epp response resData infData')
|
||||
ext = data.css('epp response extension')
|
||||
new(
|
||||
id: res.css('id').text,
|
||||
code: res.css('id').text,
|
||||
email: res.css('email').text,
|
||||
phone: res.css('voice').text,
|
||||
ident: ext.css('ident').text,
|
||||
ident_type: ext.css('ident').first.try(:attributes).try(:[], 'type').try(:value),
|
||||
ident_country_code: ext.css('ident').first.try(:attributes).try(:[], 'cc').try(:value),
|
||||
|
||||
# postalInfo
|
||||
name: res.css('postalInfo name').text,
|
||||
org_name: res.css('postalInfo org').text,
|
||||
|
||||
# address
|
||||
street: res.css('postalInfo addr street').text,
|
||||
city: res.css('postalInfo addr city').text,
|
||||
zip: res.css('postalInfo addr pc').text,
|
||||
state: res.css('postalInfo addr sp').text,
|
||||
country_code: res.css('postalInfo addr cc').text,
|
||||
|
||||
# authInfo
|
||||
password: res.css('authInfo pw').text,
|
||||
|
||||
# statuses
|
||||
statuses: data.css('status').map { |s| [s['s'], s.text] }
|
||||
)
|
||||
end
|
||||
|
||||
def user=(user)
|
||||
@user = user
|
||||
@epp_xml = EppXml::Contact.new(cl_trid_prefix: user.tag, schema_prefix: 'contact-ee',
|
||||
schema_version: '1.1')
|
||||
end
|
||||
|
||||
def info_xml(id, password = nil)
|
||||
xml = epp_xml.info(
|
||||
id: { value: id },
|
||||
authInfo: { pw: { value: password } }
|
||||
)
|
||||
user.request(xml)
|
||||
end
|
||||
|
||||
def construct_check_hash_from_data(data)
|
||||
res = data.css('epp response resData chkData cd')
|
||||
@contacts = []
|
||||
res.each do |_r|
|
||||
id = res.css('id').try(:text)
|
||||
reason = res.css('reason').present? ? res.css('reason').text : I18n.t(:available)
|
||||
@contacts << { id: id, reason: reason }
|
||||
end
|
||||
@contacts
|
||||
end
|
||||
|
||||
def contact_id_from_xml(data)
|
||||
id = data.css('epp response resData creData id').text
|
||||
id.blank? ? nil : id
|
||||
end
|
||||
|
||||
def construct_create_disclosure_xml(cph, flag)
|
||||
xml = { disclose: {} }
|
||||
cph.each do |k, v|
|
||||
xml[:disclose][k] = {}
|
||||
xml[:disclose][k][:value] = v
|
||||
end
|
||||
xml[:disclose][:attrs] = {}
|
||||
xml[:disclose][:attrs][:flag] = flag
|
||||
xml.with_indifferent_access
|
||||
end
|
||||
|
||||
# cpd = contact_params[:disclose]
|
||||
def extract_disclosure_hash(cpd)
|
||||
return {} unless cpd
|
||||
|
||||
cpd.delete_if { |k, v| v if v != '1' && k == 'flag' }
|
||||
end
|
||||
|
||||
def extract_info_disclosure(data)
|
||||
hash = {}
|
||||
data.css('disclose').each do |d|
|
||||
flag = d.attributes['flag'].value
|
||||
next unless flag
|
||||
hash[flag] = {}
|
||||
d.children.each do |c|
|
||||
hash[flag][c.name] = flag if %w( name email fax voice addr org_name ).include?(c.name)
|
||||
end
|
||||
end
|
||||
hash
|
||||
end
|
||||
|
||||
def type_string(type_code)
|
||||
return '' if type_code.blank?
|
||||
t = SELECTION_TYPES.select { |tp| tp.second == type_code }
|
||||
t.try(:first).try(:first)
|
||||
end
|
||||
end
|
||||
|
||||
def save
|
||||
return false unless valid?
|
||||
|
||||
hash = {
|
||||
id: { value: code },
|
||||
postalInfo: {
|
||||
name: { value: name },
|
||||
org: { value: org_name },
|
||||
},
|
||||
voice: { value: phone },
|
||||
email: { value: email }
|
||||
}
|
||||
|
||||
if ::Contact.address_processing?
|
||||
hash[:postalInfo][:addr] = {
|
||||
street: { value: street },
|
||||
city: { value: city },
|
||||
sp: { value: state },
|
||||
pc: { value: zip },
|
||||
cc: { value: country_code },
|
||||
}
|
||||
end
|
||||
|
||||
hash[:id] = nil if code.blank?
|
||||
create_xml = Depp::Contact.epp_xml.create(hash, extension_xml(:create))
|
||||
data = Depp::Contact.user.request(create_xml)
|
||||
self.id = data.css('id').text
|
||||
handle_errors(data)
|
||||
end
|
||||
|
||||
# rubocop:disable Metrics/MethodLength
|
||||
def update_attributes(params)
|
||||
return false unless valid?
|
||||
|
||||
self.ident_country_code = params[:ident_country_code]
|
||||
self.ident_type = params[:ident_type]
|
||||
self.ident = params[:ident]
|
||||
|
||||
self.name = params[:name]
|
||||
self.email = params[:email]
|
||||
self.phone = params[:phone]
|
||||
|
||||
self.org_name = params[:org_name]
|
||||
|
||||
if ::Contact.address_processing?
|
||||
self.street = params[:street]
|
||||
self.city = params[:city]
|
||||
self.zip = params[:zip]
|
||||
self.state = params[:state]
|
||||
self.country_code = params[:country_code]
|
||||
end
|
||||
|
||||
attributes = {
|
||||
id: { value: id },
|
||||
chg: {
|
||||
postalInfo: {
|
||||
name: { value: name },
|
||||
org: { value: org_name },
|
||||
},
|
||||
voice: { value: phone },
|
||||
email: { value: email },
|
||||
authInfo: {
|
||||
pw: { value: password }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ::Contact.address_processing?
|
||||
attributes[:chg][:postalInfo][:addr] = {
|
||||
street: { value: street },
|
||||
city: { value: city },
|
||||
sp: { value: state },
|
||||
pc: { value: zip },
|
||||
cc: { value: country_code }
|
||||
}
|
||||
end
|
||||
|
||||
update_xml = Depp::Contact.epp_xml.update(attributes, extension_xml(:update))
|
||||
data = Depp::Contact.user.request(update_xml)
|
||||
handle_errors(data)
|
||||
end
|
||||
# rubocop:enable Metrics/MethodLength
|
||||
|
||||
def delete
|
||||
delete_xml = Contact.epp_xml.delete(
|
||||
{
|
||||
id: { value: id },
|
||||
authInfo: { pw: { value: password } }
|
||||
},
|
||||
extension_xml(:delete)
|
||||
)
|
||||
data = Depp::Contact.user.request(delete_xml)
|
||||
handle_errors(data)
|
||||
end
|
||||
|
||||
def extension_xml(action)
|
||||
xml = { _anonymus: [] }
|
||||
|
||||
case action
|
||||
when :create
|
||||
ident = ident_xml[:_anonymus].try(:first)
|
||||
when :update
|
||||
# detect if any ident has changed, nb! ident and self.ident is not always same
|
||||
unless ident == self.ident && ident == ident_type && ident_country_code == self.ident_country_code
|
||||
ident = ident_xml[:_anonymus].try(:first)
|
||||
end
|
||||
end
|
||||
|
||||
legal = legal_document_xml[:_anonymus].try(:first)
|
||||
xml[:_anonymus] << ident if ident.present?
|
||||
xml[:_anonymus] << legal if legal.present?
|
||||
xml
|
||||
end
|
||||
|
||||
def ident_xml
|
||||
{
|
||||
_anonymus: [
|
||||
ident: { value: ident, attrs: { type: ident_type, cc: ident_country_code } }
|
||||
]
|
||||
}
|
||||
end
|
||||
|
||||
def legal_document_xml
|
||||
return {} if legal_document.blank?
|
||||
|
||||
type = legal_document.original_filename.split('.').last.downcase
|
||||
{
|
||||
_anonymus: [
|
||||
legalDocument: { value: Base64.encode64(legal_document.read), attrs: { type: type } }
|
||||
]
|
||||
}
|
||||
end
|
||||
|
||||
def check(id)
|
||||
xml = epp_xml.check(id: { value: id })
|
||||
current_user.request(xml)
|
||||
end
|
||||
|
||||
def country_name
|
||||
Country.new(country_code) || 'No access'
|
||||
end
|
||||
|
||||
def org?
|
||||
ident_type == 'org'
|
||||
end
|
||||
|
||||
def priv?
|
||||
ident_type == 'priv'
|
||||
end
|
||||
|
||||
def persisted?
|
||||
id.present?
|
||||
end
|
||||
|
||||
def handle_errors(data)
|
||||
data.css('result').each do |x|
|
||||
success_codes = %(1000, 1300, 1301)
|
||||
next if success_codes.include?(x['code'])
|
||||
|
||||
message = "#{x.css('msg').text} #{x.css('value').text}"
|
||||
attr = message.split('[').last.strip.sub(']', '') if message.include?('[')
|
||||
attr = :base if attr.nil?
|
||||
attr = 'phone' if attr == 'voice'
|
||||
attr = 'zip' if attr == 'pc'
|
||||
errors.add(attr, message)
|
||||
end
|
||||
errors.blank?
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,26 +0,0 @@
|
|||
module Depp
|
||||
class Dnskey
|
||||
FLAGS = [
|
||||
['0 - not for DNSSEC validation', 0],
|
||||
['256 - ZSK', 256],
|
||||
['257 - KSK', 257]
|
||||
]
|
||||
|
||||
ALGORITHMS = [
|
||||
['3 - DSA/SHA-1', 3],
|
||||
['5 - RSA/SHA-1', 5],
|
||||
['6 - DSA-NSEC3-SHA1', 6],
|
||||
['7 - RSASHA1-NSEC3-SHA1', 7],
|
||||
['8 - RSA/SHA-256', 8],
|
||||
['10 - RSA/SHA-512', 10],
|
||||
['13 - ECDSA Curve P-256 with SHA-256', 13],
|
||||
['14 - ECDSA Curve P-384 with SHA-384', 14],
|
||||
['15 - Ed25519', 15],
|
||||
['16 - Ed448', 16],
|
||||
].freeze
|
||||
|
||||
PROTOCOLS = [3]
|
||||
|
||||
DS_DIGEST_TYPES = [1, 2]
|
||||
end
|
||||
end
|
|
@ -1,351 +0,0 @@
|
|||
module Depp
|
||||
class Domain
|
||||
include ActiveModel::Conversion
|
||||
include RemoveHold
|
||||
extend ActiveModel::Naming
|
||||
|
||||
attr_accessor :name, :current_user, :epp_xml
|
||||
|
||||
STATUSES = %w[
|
||||
clientDeleteProhibited
|
||||
clientHold
|
||||
clientRenewProhibited
|
||||
clientTransferProhibited
|
||||
clientUpdateProhibited
|
||||
].freeze
|
||||
|
||||
PERIODS = [
|
||||
['3 months', '3m'],
|
||||
['6 months', '6m'],
|
||||
['9 months', '9m'],
|
||||
['1 year', '1y'],
|
||||
['2 years', '2y'],
|
||||
['3 years', '3y'],
|
||||
['4 years', '4y'],
|
||||
['5 years', '5y'],
|
||||
['6 years', '6y'],
|
||||
['7 years', '7y'],
|
||||
['8 years', '8y'],
|
||||
['9 years', '9y'],
|
||||
['10 years', '10y'],
|
||||
].freeze
|
||||
|
||||
def initialize(args = {})
|
||||
self.current_user = args[:current_user]
|
||||
self.epp_xml = EppXml::Domain.new(
|
||||
cl_trid_prefix: current_user.tag,
|
||||
schema_prefix: 'domain-ee',
|
||||
schema_version: '1.1'
|
||||
)
|
||||
end
|
||||
|
||||
def info(domain_name)
|
||||
xml = epp_xml.info(name: { value: domain_name })
|
||||
current_user.request(xml)
|
||||
end
|
||||
|
||||
def check(domain_name)
|
||||
xml = epp_xml.check(
|
||||
_anonymus: [
|
||||
name: { value: domain_name }
|
||||
]
|
||||
)
|
||||
current_user.request(xml)
|
||||
end
|
||||
|
||||
def create(domain_params)
|
||||
dns_hash = {}
|
||||
keys = Domain.create_dnskeys_hash(domain_params)
|
||||
dns_hash[:_anonymus] = keys if keys.any?
|
||||
|
||||
period = domain_params[:period].to_i.to_s
|
||||
period_unit = domain_params[:period][-1].to_s
|
||||
|
||||
xml = if domain_params[:nameservers_attributes]
|
||||
.select { |_key, value| value['hostname'].present? }.any?
|
||||
epp_xml.create({
|
||||
name: { value: domain_params[:name] },
|
||||
period: { value: period, attrs: { unit: period_unit } },
|
||||
ns: Domain.create_nameservers_hash(domain_params),
|
||||
registrant: { value: domain_params[:registrant] },
|
||||
_anonymus: Domain.create_contacts_hash(domain_params)
|
||||
}, dns_hash, Domain.construct_custom_params_hash(domain_params))
|
||||
else
|
||||
epp_xml.create({
|
||||
name: { value: domain_params[:name] },
|
||||
period: { value: period, attrs: { unit: period_unit } },
|
||||
registrant: { value: domain_params[:registrant] },
|
||||
_anonymus: Domain.create_contacts_hash(domain_params)
|
||||
}, dns_hash, Domain.construct_custom_params_hash(domain_params))
|
||||
end
|
||||
|
||||
current_user.request(xml)
|
||||
end
|
||||
|
||||
def update(domain_params)
|
||||
data = current_user.request(epp_xml.info(name: { value: domain_params[:name] }))
|
||||
old_domain_params = Depp::Domain.construct_params_from_server_data(data)
|
||||
|
||||
xml = epp_xml.update(
|
||||
Depp::Domain.construct_edit_hash(domain_params, old_domain_params),
|
||||
Depp::Domain.construct_ext_edit_hash(domain_params, old_domain_params),
|
||||
Depp::Domain.construct_custom_params_hash(domain_params)
|
||||
)
|
||||
|
||||
current_user.request(xml)
|
||||
end
|
||||
|
||||
def delete(domain_params)
|
||||
xml = epp_xml.delete({
|
||||
name: { value: domain_params[:name] },
|
||||
},
|
||||
Depp::Domain.construct_custom_params_hash(domain_params),
|
||||
(domain_params[:verified].present? && 'yes'))
|
||||
|
||||
current_user.request(xml)
|
||||
end
|
||||
|
||||
def renew(params)
|
||||
period = params[:period].to_i.to_s
|
||||
period_unit = params[:period][-1].to_s
|
||||
|
||||
current_user.request(epp_xml.renew(name: { value: params[:domain_name] },
|
||||
curExpDate: { value: params[:cur_exp_date] },
|
||||
period: { value: period, attrs: { unit: period_unit } }))
|
||||
end
|
||||
|
||||
def transfer(params)
|
||||
op = params[:request] ? 'request' : nil
|
||||
op = params[:query] ? 'query' : op
|
||||
op = params[:approve] ? 'approve' : op
|
||||
op = params[:reject] ? 'reject' : op
|
||||
|
||||
current_user.request(epp_xml.transfer({
|
||||
name: { value: params[:domain_name] },
|
||||
authInfo: { pw: { value: params[:transfer_code] } }
|
||||
}, op, Domain.construct_custom_params_hash(params)))
|
||||
end
|
||||
|
||||
def confirm_transfer(domain_params)
|
||||
data = current_user.request(epp_xml.info(name: { value: domain_params[:name] }))
|
||||
pw = data.css('pw').text
|
||||
|
||||
xml = epp_xml.transfer({
|
||||
name: { value: domain_params[:name] },
|
||||
authInfo: { pw: { value: pw } }
|
||||
}, 'approve')
|
||||
|
||||
current_user.request(xml)
|
||||
end
|
||||
|
||||
class << self
|
||||
def default_period
|
||||
'1y'
|
||||
end
|
||||
|
||||
def default_params
|
||||
ret = {}
|
||||
|
||||
ret[:contacts_attributes] ||= {}
|
||||
ENV['default_admin_contacts_count'].to_i.times do |i|
|
||||
ret[:contacts_attributes][i] = { code: '', type: 'admin' }
|
||||
end
|
||||
|
||||
ret[:nameservers_attributes] ||= {}
|
||||
ENV['default_nameservers_count'].to_i.times do |i|
|
||||
ret[:nameservers_attributes][i] = {}
|
||||
end
|
||||
|
||||
ret[:dnskeys_attributes] ||= { 0 => {} }
|
||||
ret[:statuses_attributes] ||= { 0 => {} }
|
||||
ret.with_indifferent_access
|
||||
end
|
||||
|
||||
def construct_params_from_server_data(data)
|
||||
ret = default_params
|
||||
ret[:name] = data.css('name').text
|
||||
ret[:registrant] = data.css('registrant').text
|
||||
|
||||
data.css('contact').each_with_index do |x, i|
|
||||
ret[:contacts_attributes][i] = { code: x.text, type: x['type'] }
|
||||
end
|
||||
|
||||
data.css('hostAttr').each_with_index do |x, i|
|
||||
ret[:nameservers_attributes][i] = {
|
||||
hostname: x.css('hostName').text,
|
||||
ipv4: Array(x.css('hostAddr[ip="v4"]')).map(&:text).join(','),
|
||||
ipv6: Array(x.css('hostAddr[ip="v6"]')).map(&:text).join(',')
|
||||
}
|
||||
end
|
||||
|
||||
data.css('keyData').each_with_index do |x, i|
|
||||
ret[:dnskeys_attributes][i] = {
|
||||
flags: x.css('flags').text,
|
||||
protocol: x.css('protocol').text,
|
||||
alg: x.css('alg').text,
|
||||
public_key: x.css('pubKey').text,
|
||||
ds_key_tag: x.css('keyTag').first.try(:text),
|
||||
ds_alg: x.css('alg').first.try(:text),
|
||||
ds_digest_type: x.css('digestType').first.try(:text),
|
||||
ds_digest: x.css('digest').first.try(:text)
|
||||
}
|
||||
end
|
||||
|
||||
data.css('status').each_with_index do |x, i|
|
||||
next unless STATUSES.include?(x['s'])
|
||||
|
||||
ret[:statuses_attributes][i] = {
|
||||
code: x['s'],
|
||||
description: x.text
|
||||
}
|
||||
end
|
||||
|
||||
ret
|
||||
end
|
||||
|
||||
def construct_custom_params_hash(domain_params)
|
||||
custom_params = { _anonymus: [] }
|
||||
if domain_params[:legal_document].present?
|
||||
type = domain_params[:legal_document].original_filename.split('.').last.downcase
|
||||
custom_params[:_anonymus] << {
|
||||
legalDocument: { value: Base64.encode64(domain_params[:legal_document].read), attrs: { type: type } }
|
||||
}
|
||||
end
|
||||
|
||||
if domain_params[:reserved_pw].present?
|
||||
custom_params[:_anonymus] << { reserved: { pw: { value: domain_params[:reserved_pw] } } }
|
||||
end
|
||||
|
||||
custom_params
|
||||
end
|
||||
|
||||
def construct_edit_hash(domain_params, old_domain_params)
|
||||
contacts = array_difference(create_contacts_hash(domain_params), create_contacts_hash(old_domain_params))
|
||||
add_anon = contacts
|
||||
|
||||
contacts = array_difference(create_contacts_hash(old_domain_params), create_contacts_hash(domain_params))
|
||||
rem_anon = contacts
|
||||
|
||||
add_arr = []
|
||||
add_ns = create_nameservers_hash(domain_params) - create_nameservers_hash(old_domain_params)
|
||||
add_arr << { ns: add_ns } if add_ns.any?
|
||||
add_arr << { _anonymus: add_anon } if add_anon.any?
|
||||
|
||||
rem_arr = []
|
||||
rem_ns = create_nameservers_hash(old_domain_params) - create_nameservers_hash(domain_params)
|
||||
rem_arr << { ns: rem_ns } if rem_ns.any?
|
||||
rem_arr << { _anonymus: rem_anon } if rem_anon.any?
|
||||
|
||||
if domain_params[:registrant] != old_domain_params[:registrant]
|
||||
chg = [{ registrant: { value: domain_params[:registrant] } }] unless domain_params[:verified].present?
|
||||
if domain_params[:verified]
|
||||
chg = [{ registrant: { value: domain_params[:registrant], attrs: { verified: 'yes' } } }]
|
||||
end
|
||||
end
|
||||
|
||||
add_arr = nil if add_arr.none?
|
||||
rem_arr = nil if rem_arr.none?
|
||||
|
||||
{
|
||||
name: { value: domain_params[:name] },
|
||||
add: add_arr,
|
||||
rem: rem_arr,
|
||||
chg: chg
|
||||
}
|
||||
end
|
||||
|
||||
def construct_ext_edit_hash(domain_params, old_domain_params)
|
||||
rem_keys = create_dnskeys_hash(old_domain_params) - create_dnskeys_hash(domain_params)
|
||||
add_keys = create_dnskeys_hash(domain_params) - create_dnskeys_hash(old_domain_params)
|
||||
hash = {}
|
||||
hash[:rem] = rem_keys if rem_keys.any?
|
||||
hash[:add] = add_keys if add_keys.any?
|
||||
hash
|
||||
end
|
||||
|
||||
def create_nameservers_hash(domain_params)
|
||||
ret = []
|
||||
domain_params[:nameservers_attributes].each do |_k, v|
|
||||
next if v['hostname'].blank?
|
||||
|
||||
host_attr = []
|
||||
host_attr << { hostName: { value: v['hostname'] } }
|
||||
if v['ipv4'].present?
|
||||
v['ipv4'].to_s.split(',').each do |ip|
|
||||
host_attr << { hostAddr: { value: ip, attrs: { ip: 'v4' } } }
|
||||
end
|
||||
end
|
||||
|
||||
if v['ipv6'].present?
|
||||
v['ipv6'].to_s.split(',').each do |ip|
|
||||
host_attr << { hostAddr: { value: ip, attrs: { ip: 'v6' } } }
|
||||
end
|
||||
end
|
||||
|
||||
ret << { hostAttr: host_attr }
|
||||
end
|
||||
|
||||
ret
|
||||
end
|
||||
|
||||
def create_contacts_hash(domain_params)
|
||||
ret = []
|
||||
domain_params[:contacts_attributes].each do |_k, v|
|
||||
next if v['code'].blank?
|
||||
|
||||
ret << {
|
||||
contact: { value: v['code'], attrs: { type: v['type'] } }
|
||||
}
|
||||
end
|
||||
|
||||
ret
|
||||
end
|
||||
|
||||
def create_dnskeys_hash(domain_params)
|
||||
ret = []
|
||||
domain_params[:dnskeys_attributes].each do |_k, v|
|
||||
if v['ds_key_tag'].blank?
|
||||
kd = create_key_data_hash(v)
|
||||
if kd
|
||||
ret << {
|
||||
keyData: kd
|
||||
}
|
||||
end
|
||||
else
|
||||
ret << {
|
||||
dsData: [
|
||||
keyTag: { value: v['ds_key_tag'] },
|
||||
alg: { value: v['ds_alg'] },
|
||||
digestType: { value: v['ds_digest_type'] },
|
||||
digest: { value: v['ds_digest'] },
|
||||
keyData: create_key_data_hash(v)
|
||||
]
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
ret
|
||||
end
|
||||
|
||||
def create_key_data_hash(key_data_params)
|
||||
return nil if key_data_params['public_key'].blank?
|
||||
|
||||
{
|
||||
flags: { value: key_data_params['flags'] },
|
||||
protocol: { value: key_data_params['protocol'] },
|
||||
alg: { value: key_data_params['alg'] },
|
||||
pubKey: { value: key_data_params['public_key'] }
|
||||
}
|
||||
end
|
||||
|
||||
def array_difference(x, y)
|
||||
ret = x.dup
|
||||
y.each do |element|
|
||||
index = ret.index(element)
|
||||
ret.delete_at(index) if index
|
||||
end
|
||||
ret
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,66 +0,0 @@
|
|||
module Depp
|
||||
class User
|
||||
include ActiveModel::Validations
|
||||
include ActiveModel::Conversion
|
||||
extend ActiveModel::Naming
|
||||
|
||||
attr_accessor :tag, :password, :pki
|
||||
|
||||
validates :tag, :password, presence: true
|
||||
|
||||
validate :validate_existance_in_server
|
||||
|
||||
def initialize(args = {})
|
||||
args.each { |k, v| send("#{k}=", v) }
|
||||
end
|
||||
|
||||
def server
|
||||
client_cert = File.read(ENV['cert_path'])
|
||||
client_key = File.read(ENV['key_path'])
|
||||
port = ENV['epp_port'] || '700'
|
||||
|
||||
@server_cache ||= Epp::Server.new({
|
||||
server: ENV['epp_hostname'],
|
||||
tag: tag,
|
||||
password: password,
|
||||
port: port,
|
||||
cert: OpenSSL::X509::Certificate.new(client_cert),
|
||||
key: OpenSSL::PKey::RSA.new(client_key)
|
||||
})
|
||||
end
|
||||
|
||||
def request(xml)
|
||||
Nokogiri::XML(server.request(xml)).remove_namespaces!
|
||||
rescue EppErrorResponse => e
|
||||
Nokogiri::XML(e.response_xml.to_s).remove_namespaces!
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def validate_existance_in_server
|
||||
return if errors.any?
|
||||
res = server.open_connection
|
||||
unless Nokogiri::XML(res).css('greeting')
|
||||
errors.add(:base, :failed_to_open_connection_to_epp_server)
|
||||
server.close_connection # just in case
|
||||
return
|
||||
end
|
||||
|
||||
ex = EppXml::Session.new(cl_trid_prefix: tag)
|
||||
xml = ex.login(clID: { value: tag }, pw: { value: password })
|
||||
res = server.send_request(xml)
|
||||
|
||||
if Nokogiri::XML(res).css('result').first['code'] != '1000'
|
||||
errors.add(:base, Nokogiri::XML(res).css('result').text)
|
||||
end
|
||||
|
||||
server.close_connection
|
||||
|
||||
rescue OpenSSL::SSL::SSLError => e
|
||||
Rails.logger.error "INVALID CERT: #{e}"
|
||||
Rails.logger.error "INVALID CERT DEBUG INFO: epp_hostname: #{ENV['epp_hostname']}," \
|
||||
"port: #{ENV['epp_port']}, cert_path: #{ENV['cert_path']}, key_path: #{ENV['key_path']}"
|
||||
errors.add(:base, :invalid_cert)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -25,10 +25,10 @@ class Dnskey < ApplicationRecord
|
|||
}
|
||||
|
||||
# IANA numbers, single authority list
|
||||
ALGORITHMS = Depp::Dnskey::ALGORITHMS.map {|pair| pair[1].to_s}.freeze
|
||||
PROTOCOLS = %w(3)
|
||||
FLAGS = %w(0 256 257) # 256 = ZSK, 257 = KSK
|
||||
DS_DIGEST_TYPE = [1,2]
|
||||
ALGORITHMS = %w[3 5 6 7 8 10 13 14 15 16].freeze
|
||||
PROTOCOLS = %w[3].freeze
|
||||
FLAGS = %w[0 256 257].freeze # 256 = ZSK, 257 = KSK
|
||||
DS_DIGEST_TYPE = [1, 2].freeze
|
||||
RESOLVERS = ENV['dnssec_resolver_ips'].to_s.strip.split(', ').freeze
|
||||
self.ignored_columns = %w[legacy_domain_id]
|
||||
|
||||
|
|
|
@ -13,6 +13,22 @@ class Domain < ApplicationRecord
|
|||
include Domain::Disputable
|
||||
include Domain::BulkUpdatable
|
||||
|
||||
PERIODS = [
|
||||
['3 months', '3m'],
|
||||
['6 months', '6m'],
|
||||
['9 months', '9m'],
|
||||
['1 year', '1y'],
|
||||
['2 years', '2y'],
|
||||
['3 years', '3y'],
|
||||
['4 years', '4y'],
|
||||
['5 years', '5y'],
|
||||
['6 years', '6y'],
|
||||
['7 years', '7y'],
|
||||
['8 years', '8y'],
|
||||
['9 years', '9y'],
|
||||
['10 years', '10y'],
|
||||
].freeze
|
||||
|
||||
attr_accessor :roles,
|
||||
:legal_document_id,
|
||||
:is_admin,
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
class Registrar::DomainListCsvPresenter
|
||||
def initialize(domains:, view:)
|
||||
@domains = domains
|
||||
@view = view
|
||||
end
|
||||
|
||||
def to_s
|
||||
table = CSV::Table.new([header])
|
||||
|
||||
domains.each do |domain|
|
||||
table << domain_to_row(domain: domain)
|
||||
end
|
||||
|
||||
table.to_s
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def header
|
||||
columns = %w[
|
||||
domain_name
|
||||
transfer_code
|
||||
registrant_name
|
||||
registrant_code
|
||||
expire_time
|
||||
]
|
||||
|
||||
columns.map! { |column| view.t("registrar.domains.index.csv.#{column}") }
|
||||
|
||||
CSV::Row.new(columns, [], true)
|
||||
end
|
||||
|
||||
def domain_to_row(domain:)
|
||||
row = []
|
||||
row[0] = domain.name
|
||||
row[1] = domain.transfer_code
|
||||
row[2] = domain.registrant.name
|
||||
row[3] = domain.registrant.code
|
||||
row[4] = domain.expire_date
|
||||
|
||||
CSV::Row.new([], row)
|
||||
end
|
||||
|
||||
attr_reader :domains, :view
|
||||
end
|
|
@ -1,7 +1,7 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:add), new_admin_invoice_path, class: 'btn btn-primary')
|
||||
= render 'shared/title', name: t(:invoices)
|
||||
= render 'search_form'
|
||||
= render 'admin/invoices/partials/search_form'
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
|
|
|
@ -20,4 +20,4 @@
|
|||
%dd= @invoice.buyer_url
|
||||
|
||||
%dt= t(:email)
|
||||
%dd= @invoice.buyer_email
|
||||
%dd= @invoice.buyer_email
|
|
@ -36,4 +36,4 @@
|
|||
%dd=@invoice.description
|
||||
|
||||
%dt= Invoice.human_attribute_name :reference_no
|
||||
%dd= @invoice.reference_no
|
||||
%dd= @invoice.reference_no
|
|
@ -29,4 +29,4 @@
|
|||
%tr
|
||||
%th.no-border{colspan: 3}
|
||||
%th= t(:total)
|
||||
%td= number_to_currency @invoice.total
|
||||
%td= number_to_currency @invoice.total
|
|
@ -16,4 +16,4 @@
|
|||
%td= payment_order.channel
|
||||
%td= payment_order.status
|
||||
%td= payment_order.created_at
|
||||
%td= payment_order.notes
|
||||
%td= payment_order.notes
|
|
@ -69,10 +69,10 @@
|
|||
<span class="glyphicon glyphicon-search"></span>
|
||||
|
||||
</button>
|
||||
<%= link_to t('.download_btn'), admin_invoices_path(format: :csv, params: params.permit!),
|
||||
"data-toggle" => "tooltip", "data-placement" => "bottom", "title" => t('.download_btn'),
|
||||
<%= link_to t('admin.invoices.search_form.download_btn'), admin_invoices_path(format: :csv, params: params.permit!),
|
||||
"data-toggle" => "tooltip", "data-placement" => "bottom", "title" => t('admin.invoices.search_form.download_btn'),
|
||||
class: 'btn btn-default' %>
|
||||
<%= link_to t('.reset_btn'), admin_invoices_path, class: 'btn btn-default' %>
|
||||
<%= link_to t('admin.invoices.search_form.reset_btn'), admin_invoices_path, class: 'btn btn-default' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -35,4 +35,4 @@
|
|||
%dd= @invoice.seller_email
|
||||
|
||||
%dt= t(:issuer)
|
||||
%dd= @invoice.seller_contact_name
|
||||
%dd= @invoice.seller_contact_name
|
|
@ -20,14 +20,14 @@
|
|||
= render 'shared/full_errors', object: @invoice
|
||||
|
||||
.row
|
||||
.col-md-6= render 'registrar/invoices/partials/details'
|
||||
.col-md-6= render 'admin/invoices/partials/details'
|
||||
.row
|
||||
.col-md-6= render 'registrar/invoices/partials/seller'
|
||||
.col-md-6= render 'registrar/invoices/partials/buyer'
|
||||
.col-md-6= render 'admin/invoices/partials/seller'
|
||||
.col-md-6= render 'admin/invoices/partials/buyer'
|
||||
.row
|
||||
- if @invoice.monthly_invoice
|
||||
.col-md-12= render 'registrar/invoices/partials/monthly_invoice_items'
|
||||
- if @invoice.monthly_invoice
|
||||
.col-md-12= render 'admin/invoices/partials/monthly_invoice_items'
|
||||
- else
|
||||
.col-md-12= render 'registrar/invoices/partials/items'
|
||||
.col-md-12= render 'admin/invoices/partials/items'
|
||||
.row
|
||||
.col-md-12= render 'registrar/invoices/partials/payment_orders'
|
||||
.col-md-12= render 'admin/invoices/partials/payment_orders'
|
|
@ -1,64 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="<%= I18n.locale.to_s %>">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport"/>
|
||||
<% if content_for? :head_title %>
|
||||
<%= yield :head_title %>
|
||||
<% else %>
|
||||
<title>
|
||||
<%= t(:registrar_head_title) %>
|
||||
</title>
|
||||
<% end %>
|
||||
<%= csrf_meta_tags %>
|
||||
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
|
||||
<%= favicon_link_tag 'favicon.ico' %>
|
||||
</head>
|
||||
<body class="<%= body_css_class %>">
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button aria-expanded="false" class="navbar-toggle collapsed" data-target="#navbar" data-toggle="collapse" type="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<%= link_to can?(:show, :poll) ? registrar_root_path : registrar_account_path,
|
||||
class: 'navbar-brand' do %>
|
||||
<%= t(:registrar_head_title) %>
|
||||
<% if unstable_env.present? %>
|
||||
<div class="text-center">
|
||||
<small style="color: #0074B3;">
|
||||
<%= unstable_env %>
|
||||
</small>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render 'navbar' %>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="container">
|
||||
<%= render 'flash_messages' %>
|
||||
<% if depp_controller? %>
|
||||
<%= render 'registrar/shared/epp_results' %>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<%= image_tag 'eis-logo-et.png' %>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
Version
|
||||
<%= current_commit_link %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<%= javascript_include_tag 'registrar-manifest', async: true %>
|
||||
</body>
|
||||
</html>
|
|
@ -1,53 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="<%= locale %>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<% if content_for? :head_title %>
|
||||
<%= yield :head_title %>
|
||||
<% else %>
|
||||
<title>
|
||||
<%= t(:registrar_head_title) %>
|
||||
</title>
|
||||
<% end %>
|
||||
<%= csrf_meta_tags %>
|
||||
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
|
||||
<%= javascript_include_tag 'registrar-manifest' %>
|
||||
</head>
|
||||
<body class="<%= body_css_class %>">
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<%= link_to new_registrar_user_session_path, class: 'navbar-brand' do %>
|
||||
<%= t(:registrar_head_title) %>
|
||||
<% if unstable_env.present? %>
|
||||
<div class="text-center">
|
||||
<small style="color: #0074B3;">
|
||||
<%= unstable_env %>
|
||||
</small>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<%= render 'flash_messages' %>
|
||||
<%= yield %>
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<%= image_tag 'eis-logo-et.png' %>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
Version
|
||||
<%= current_commit_link %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
|
@ -1,30 +0,0 @@
|
|||
<div class="panel panel-default balance-auto-reload">
|
||||
<div class="panel-heading">
|
||||
<%= t '.header' %>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<% if setting %>
|
||||
<span class="label label-success"><%= t '.enabled' %></span>
|
||||
<%= t '.enabled_state_details', amount: number_to_currency(setting['type']['amount']),
|
||||
threshold: number_to_currency(setting['type']['threshold']) %>
|
||||
<% else %>
|
||||
<span class="text-muted"><%= t '.disabled' %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="panel-footer text-right">
|
||||
<% if !setting %>
|
||||
<%= link_to t('.enable_btn'), edit_registrar_settings_balance_auto_reload_path,
|
||||
class: 'btn btn-default btn-sm' %>
|
||||
<% else %>
|
||||
<%= link_to t('.disable_btn'), registrar_settings_balance_auto_reload_path,
|
||||
method: :delete, class: 'btn btn-default btn-sm' %>
|
||||
<% end %>
|
||||
|
||||
<% if setting %>
|
||||
<%= link_to t('.edit_btn'), edit_registrar_settings_balance_auto_reload_path,
|
||||
class: 'btn btn-default btn-sm' %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
|
@ -1,19 +0,0 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<%= t '.header' %>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt><%= Registrar.human_attribute_name :billing_email %></dt>
|
||||
<dd><%= registrar.billing_email %></dd>
|
||||
|
||||
<dt><%= Registrar.human_attribute_name :iban %></dt>
|
||||
<dd><%= registrar.iban %></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="panel-footer text-right">
|
||||
<%= link_to t('.edit_btn'), edit_registrar_account_path, class: 'btn btn-default btn-sm' %>
|
||||
</div>
|
||||
</div>
|
|
@ -1,32 +0,0 @@
|
|||
<%= form_for @registrar, url: registrar_account_path, method: :patch, html: { class: 'form-horizontal' } do |f| %>
|
||||
<%= render 'form_errors', target: @registrar %>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2 control-label">
|
||||
<%= f.label :billing_email %>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<%= f.email_field :billing_email, autofocus: true, class: 'form-control' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2 control-label">
|
||||
<%= f.label :iban %>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<%= f.text_field :iban, maxlength: iban_max_length, class: 'form-control' %>
|
||||
<span class="help-block"><%= t '.iban_hint' %></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-right">
|
||||
<%= f.submit t('.submit_btn'), class: 'btn btn-success' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,18 +0,0 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><%= t '.header' %></div>
|
||||
<div class="panel-body">
|
||||
<ul>
|
||||
<% linked_users.each do |user| %>
|
||||
<% user_presenter = UserPresenter.new(user: user, view: self) %>
|
||||
<li><%= user_presenter.login_with_role %>
|
||||
<%= link_to t('.switch_btn'),
|
||||
registrar_switch_current_user_path(user),
|
||||
method: :put,
|
||||
id: "switch-current-user-#{user.id}-btn",
|
||||
class: 'btn btn-primary btn-xs' %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><%= link_to t('registrar.account.show.header'), registrar_account_path %></li>
|
||||
<li><%= t '.header' %></li>
|
||||
</ol>
|
||||
|
||||
<div class="page-header">
|
||||
<h1><%= t '.header' %></h1>
|
||||
</div>
|
||||
|
||||
<%= render 'form' %>
|
|
@ -1,23 +0,0 @@
|
|||
<div class="page-header">
|
||||
<h1><%= t '.header' %></h1>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<%= render 'details', registrar: current_registrar_user.registrar %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<%= render 'linked_users', linked_users: current_registrar_user.linked_users %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if can?(:manage, :balance_auto_reload) %>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<%= render 'balance_auto_reload', setting: balance_auto_reload_setting %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,49 +0,0 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%= search_form_for @q, url: [:registrar, :account_activities], html: { style: 'margin-bottom: 0;' } do |f| %>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:activity_type) %>
|
||||
<%= f.select :activity_type_in, AccountActivity.types_for_select, {}, class: 'form-control js-combobox', placeholder: t(:choose), multiple: true %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:description) %>
|
||||
<%= f.search_field :description_cont, class: 'form-control', placeholder: t(:description), autocomplete: 'off' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:receipt_date_from) %>
|
||||
<%= f.search_field :created_at_gteq, value: params[:q][:created_at_gteq], class: 'form-control js-datepicker', placeholder: t(:receipt_date_from) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:receipt_date_until) %>
|
||||
<%= f.search_field :created_at_lteq, value: params[:q][:created_at_lteq], class: 'form-control js-datepicker', placeholder: t(:receipt_date_until) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" style="padding-top: 25px;">
|
||||
<button class="btn btn-default">
|
||||
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
|
||||
</button>
|
||||
<%= button_tag t('.download_btn'),
|
||||
formaction: registrar_account_activities_path(format: 'csv'),
|
||||
class: 'btn btn-default' %>
|
||||
<%= link_to(t('.reset_btn'), registrar_account_activities_path, class: 'btn btn-default') %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
|
@ -1,66 +0,0 @@
|
|||
<% content_for :actions do %>
|
||||
<%= link_to(t(:back_to_billing), registrar_invoices_path, class: 'btn btn-default') %>
|
||||
<% end %>
|
||||
|
||||
<%= render 'shared/title', name: t(:account_activity) %>
|
||||
|
||||
<%= render 'search_form' %>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-xs-3">
|
||||
<%= sort_link(@q, 'description') %>
|
||||
</th>
|
||||
<th class="col-xs-2">
|
||||
<%= sort_link(@q, 'activity_type') %>
|
||||
</th>
|
||||
<th class="col-xs-3">
|
||||
<%= sort_link(@q, 'created_at', AccountActivity.human_attribute_name(:created_at)) %>
|
||||
</th>
|
||||
<th class="col-xs-2">
|
||||
<%= sort_link(@q, 'sum') %>
|
||||
</th>
|
||||
<th class="col-xs-2">
|
||||
<%= sort_link(@q, 'new_balance', 'New balance') %>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @account_activities.each do |x| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= x.description.present? ? x.description : '-' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= x.activity_type ? t(x.activity_type) : '' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= l(x.created_at) %>
|
||||
</td>
|
||||
<% c = x.sum > 0.0 ? 'text-success' : 'text-danger' %>
|
||||
<% s = x.sum > 0.0 ? "+#{x.sum} #{x.currency}" : "#{x.sum} #{x.currency}" %>
|
||||
<td class="<%= c %>">
|
||||
<%= s %>
|
||||
</td>
|
||||
<td>
|
||||
<%= x.new_balance.present? ? "#{currency(x.new_balance)} EUR" : 'N/A' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%= paginate @account_activities %>
|
||||
</div>
|
||||
</div>
|
|
@ -1,4 +0,0 @@
|
|||
<% current_user_presenter = UserPresenter.new(user: current_registrar_user, view: self) %>
|
||||
<%= link_to current_user_presenter.login_with_role, registrar_account_path, class: 'navbar-link' %>
|
||||
<span class="text-muted">|</span>
|
||||
<%= link_to t('.sign_out'), destroy_registrar_user_session_path, method: :delete, class: 'navbar-link' %>
|
|
@ -1,11 +0,0 @@
|
|||
<% if target.errors.any? %>
|
||||
<div class="alert alert-danger">
|
||||
<p><%= pluralize(target.errors.count, 'error') %> prohibited this <%= target.model_name.human.downcase %> from being saved:</p>
|
||||
|
||||
<ul>
|
||||
<% target.errors.full_messages.each do |message| %>
|
||||
<li><%= message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,20 +0,0 @@
|
|||
.navbar-collapse.collapse
|
||||
%ul.nav.navbar-nav
|
||||
- if can? :view, Depp::Domain
|
||||
- active_class = %w(registrar/domains registrar/check registrar/renew registrar/tranfer).include?(params[:controller]) ? 'active' :nil
|
||||
%li{class: active_class}= link_to t(:domains), registrar_domains_path
|
||||
|
||||
- if can? :view, Depp::Contact
|
||||
- active_class = ['registrar/contacts'].include?(params[:controller]) ? 'active' :nil
|
||||
%li{class: active_class}= link_to t(:contacts), registrar_contacts_path
|
||||
|
||||
- if can? :show, Invoice
|
||||
- active_class = ['registrar/invoices'].include?(params[:controller]) ? 'active' :nil
|
||||
%li{class: active_class}= link_to t(:billing), registrar_invoices_path
|
||||
|
||||
- if !Rails.env.production? && can?(:manage, :xml_console)
|
||||
- active_class = ['registrar/xml_consoles'].include?(params[:controller]) ? 'active' :nil
|
||||
%li{class: active_class}= link_to t(:xml_console), registrar_xml_console_path
|
||||
|
||||
%div.navbar-text.navbar-right
|
||||
= render 'current_user'
|
|
@ -1,65 +0,0 @@
|
|||
<%= form_tag registrar_admin_contacts_path, method: :patch, class: 'form-horizontal' do %>
|
||||
<% if @error %>
|
||||
<div class="alert alert-danger">
|
||||
<%= @error %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-6 control-label">
|
||||
<p><%= t '.comment' %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 control-label">
|
||||
<%= label_tag :current_contact_id, t('.current_contact_id') %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 current_admin_contact">
|
||||
<%= text_field_tag :current_contact_id, params[:current_contact_id],
|
||||
list: :contacts,
|
||||
required: true,
|
||||
autofocus: true,
|
||||
class: 'form-control' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 control-label">
|
||||
<%= label_tag :new_contact_id, t('.new_contact_id') %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 new_admin_contact">
|
||||
<%= text_field_tag :new_contact_id, params[:new_contact_id],
|
||||
list: :contacts,
|
||||
required: true,
|
||||
class: 'form-control' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-4 col-md-offset-2 text-right">
|
||||
<button class="btn btn-warning">
|
||||
<%= t '.submit_btn' %>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-default btn-xs" role="button" data-toggle="collapse"
|
||||
href="#bulk_change_tech_contact_help"><%= t '.help_btn' %></a>
|
||||
<div class="collapse" id="bulk_change_tech_contact_help">
|
||||
<div class="well">
|
||||
<%= t '.help' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<datalist id="contacts">
|
||||
<% available_contacts.each do |data| %>
|
||||
<option value="<%= data.second %>"><%= data.first %></option>
|
||||
<% end %>
|
||||
</datalist>
|
|
@ -1,13 +0,0 @@
|
|||
<% if @api_errors %>
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
<% if @api_errors.is_a?(String) %>
|
||||
<li><%= @api_errors %></li>
|
||||
<% else %>
|
||||
<% @api_errors.each do |error| %>
|
||||
<li><%= error[:title] %></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,57 +0,0 @@
|
|||
<%= form_with url: registrar_bulk_renew_path, multipart: true, class: 'form-horizontal' do |f|%>
|
||||
<%= render 'api_errors' %>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 control-label">
|
||||
<%= f.label :current_balance, t('.current_balance') %>
|
||||
</div>
|
||||
<div class="col-md-4" id='registrar_balance'>
|
||||
<%= number_to_currency current_registrar_user.registrar.balance %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 control-label">
|
||||
<%= f.label :expire_date, t('.expire_date') %>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<%= f.text_field :expire_date, value: @expire_date,
|
||||
class: 'form-control js-datepicker'%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 control-label">
|
||||
<%= f.label :period, t('.period'), class: 'required' %>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<%= select_tag 'period',
|
||||
options_for_select(Depp::Domain::PERIODS, @period), { class: 'form-control' } %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if @domains.present? %>
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 control-label">
|
||||
<%= f.label :domain_ids, t('.domain_ids') %>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<%= f.collection_check_boxes :domain_ids, @domains, :name, :name,
|
||||
checked: @domains.map(&:name) do |b|%>
|
||||
<div class="row">
|
||||
<%= b.check_box %>
|
||||
<%= b.label %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="form-group pull-left">
|
||||
<%= f.submit "#{t '.filter_btn'}", name: 'filter', class: 'btn btn-warning' %>
|
||||
<% if @domains.present? %>
|
||||
<%= f.submit "#{t '.renew_btn'}", name: 'renew', class: 'btn btn-primary' %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,34 +0,0 @@
|
|||
<%= form_tag registrar_domain_transfers_path, multipart: true, class: 'form-horizontal' do %>
|
||||
<%= render 'registrar/domain_transfers/form/api_errors' %>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 control-label">
|
||||
<%= label_tag :batch_file %>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<%= file_field_tag :batch_file, required: true %>
|
||||
<span class="help-block"><%= t '.file_field_hint' %></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-4 col-md-offset-2 text-right">
|
||||
<button class="btn btn-warning">
|
||||
<%= t '.submit_btn' %>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-default btn-xs" role="button" data-toggle="collapse"
|
||||
href="#bulk_change_bulk_transfer_help"><%= t '.help_btn' %>
|
||||
</a>
|
||||
<div class="collapse" id="bulk_change_bulk_transfer_help">
|
||||
<div class="well">
|
||||
<%= t '.help' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,77 +0,0 @@
|
|||
<%= form_tag registrar_nameservers_path, multipart: true, method: :patch, class: 'form-horizontal' do %>
|
||||
<%= render 'registrar/domain_transfers/form/api_errors' %>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 control-label">
|
||||
<%= label_tag :old_hostname, t('.old_hostname') %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<%= text_field_tag :old_hostname, params[:old_hostname], required: false,
|
||||
class: 'form-control' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 control-label">
|
||||
<%= label_tag :new_hostname %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<%= text_field_tag :new_hostname, params[:new_hostname], required: true,
|
||||
class: 'form-control' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 control-label">
|
||||
<%= label_tag :ipv4 %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<%= text_area_tag :ipv4, params[:ipv4], class: 'form-control' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 control-label">
|
||||
<%= label_tag :ipv6 %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<%= text_area_tag :ipv6, params[:ipv6], class: 'form-control' %>
|
||||
<span class="help-block"><%= t '.ip_hint' %></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 control-label">
|
||||
<%= label_tag 'List of domains' %>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<%= file_field_tag :puny_file, required: false, accept: 'text/csv' %>
|
||||
<span class="help-block">CSV format, must have domain_name header. List of domains that nameserver change should be scoped to.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-4 col-md-offset-2 text-right">
|
||||
<button class="btn btn-warning">
|
||||
<%= t '.replace_btn' %>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-default btn-xs" role="button" data-toggle="collapse"
|
||||
href="#bulk_change_nameserver_help"><%= t '.help_btn' %>
|
||||
</a>
|
||||
<div class="collapse" id="bulk_change_nameserver_help">
|
||||
<div class="well">
|
||||
<%= t '.help' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,60 +0,0 @@
|
|||
<%= form_tag registrar_tech_contacts_path, method: :patch, class: 'form-horizontal' do %>
|
||||
<% if @error %>
|
||||
<div class="alert alert-danger">
|
||||
<%= @error %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 control-label">
|
||||
<%= label_tag :current_contact_id, t('.current_contact_id') %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 current_tech_contact">
|
||||
<%= text_field_tag :current_contact_id, params[:current_contact_id],
|
||||
list: :contacts,
|
||||
required: true,
|
||||
autofocus: true,
|
||||
class: 'form-control' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 control-label">
|
||||
<%= label_tag :new_contact_id, t('.new_contact_id') %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 new_tech_contact">
|
||||
<%= text_field_tag :new_contact_id, params[:new_contact_id],
|
||||
list: :contacts,
|
||||
required: true,
|
||||
class: 'form-control' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-4 col-md-offset-2 text-right">
|
||||
<button class="btn btn-warning">
|
||||
<%= t '.submit_btn' %>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-6">
|
||||
<a class="btn btn-default btn-xs" role="button" data-toggle="collapse"
|
||||
href="#bulk_change_tech_contact_help"><%= t '.help_btn' %></a>
|
||||
<div class="collapse" id="bulk_change_tech_contact_help">
|
||||
<div class="well">
|
||||
<%= t '.help' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<datalist id="contacts">
|
||||
<% available_contacts.each do |data| %>
|
||||
<option value="<%= data.second %>"><%= data.first %></option>
|
||||
<% end %>
|
||||
</datalist>
|
|
@ -1,54 +0,0 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><%= link_to t('registrar.domains.index.header'), registrar_domains_path %></li>
|
||||
</ol>
|
||||
|
||||
<div class="page-header">
|
||||
<h1><%= t '.header' %></h1>
|
||||
</div>
|
||||
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="<%= 'active' if active_tab == :technical_contact %>">
|
||||
<a href="#technical_contact" data-toggle="tab"><%= t '.technical_contact' %></a>
|
||||
</li>
|
||||
|
||||
<li class="<%= 'active' if active_tab == :admin_contact %>">
|
||||
<a href="#admin_contact" data-toggle="tab"><%= t '.admin_contact' %></a>
|
||||
</li>
|
||||
|
||||
<li class="<%= 'active' if active_tab == :nameserver %>">
|
||||
<a href="#nameserver" data-toggle="tab"><%= t '.nameserver' %></a>
|
||||
</li>
|
||||
|
||||
<li class="<%= 'active' if active_tab == :bulk_transfer %>">
|
||||
<a href="#bulk_transfer" data-toggle="tab"><%= t '.bulk_transfer' %></a>
|
||||
</li>
|
||||
|
||||
<li class="<%= 'active' if active_tab == :bulk_renew %>">
|
||||
<a href="#bulk_renew" data-toggle="tab"><%= t '.bulk_renew' %></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane<%= ' active' if active_tab == :technical_contact %>"
|
||||
id="technical_contact">
|
||||
<%= render 'tech_contact_form', available_contacts: available_contacts %>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane<%= ' active' if active_tab == :admin_contact %>"
|
||||
id="admin_contact">
|
||||
<%= render 'admin_contact_form', available_contacts: available_contacts %>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane<%= ' active' if active_tab == :nameserver %>" id="nameserver">
|
||||
<%= render 'nameserver_form' %>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane<%= ' active' if active_tab == :bulk_transfer %>" id="bulk_transfer">
|
||||
<%= render 'bulk_transfer_form' %>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane<%= ' active' if active_tab == :bulk_renew %>" id="bulk_renew">
|
||||
<%= render 'bulk_renew_form' %>
|
||||
</div>
|
||||
</div>
|
|
@ -1,26 +0,0 @@
|
|||
= render 'registrar/shared/error_messages', f: f
|
||||
= f.hidden_field :id
|
||||
= f.hidden_field :password
|
||||
.row
|
||||
.col-md-8
|
||||
= render 'registrar/contacts/form/general', f: f
|
||||
|
||||
- if Contact.address_processing?
|
||||
.row
|
||||
.col-md-8
|
||||
= render 'registrar/contacts/form/address', f: f
|
||||
|
||||
- if !@contact.persisted?
|
||||
.row
|
||||
.col-md-8
|
||||
= render 'registrar/contacts/form/code', f: f
|
||||
.row
|
||||
.col-md-8
|
||||
= render 'registrar/contacts/form/legal_document', f: f
|
||||
|
||||
.row
|
||||
.col-md-8.text-right
|
||||
- if @contact.persisted?
|
||||
= button_tag t(:save), class: 'btn btn-warning'
|
||||
- else
|
||||
= button_tag t(:create), class: 'btn btn-warning'
|
|
@ -1,117 +0,0 @@
|
|||
<%= search_form_for [:registrar, @q], html: { style: 'margin-bottom: 0;', class: 'js-form', autocomplete: 'off' } do |f| %>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label :name %>
|
||||
<%= f.search_field :name_matches, value: params[:q][:name_matches], class: 'form-control', placeholder: t(:name) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:id) %>
|
||||
<%= f.search_field :code_eq, class: 'form-control', placeholder: t(:id) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:ident) %>
|
||||
<%= f.search_field :ident_matches, class: 'form-control', placeholder: t(:ident) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= label_tag t(:ident_type) %>
|
||||
<%= select_tag '[q][ident_type_eq]', options_for_select(ident_types, params[:q][:ident_type_eq]), { include_blank: true, placeholder: t(:choose), class: 'form-control selectize' } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:email) %>
|
||||
<%= f.search_field :email_matches, class: 'form-control', placeholder: t(:email) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= label_tag t(:country) %>
|
||||
<%= select_tag '[q][country_code_eq]', ApplicationController.helpers.all_country_options(params[:q][:country_code_eq]), { include_blank: true, placeholder: t(:choose), class: 'form-control selectize' } %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<%= label_tag t(:contact_type) %>
|
||||
<%= select_tag '[q][domain_contacts_type_in]', options_for_select([['admin', 'AdminDomainContact'], ['tech', 'TechDomainContact'], ['registrant', 'registrant']], params[:q][:domain_contacts_type_in]), { multiple: true, placeholder: t(:choose), class: 'form-control js-combobox' } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:registrar_name) %>
|
||||
<%= f.select :registrar_id_eq, Registrar.all.map { |x| [x, x.id] }, { include_blank: true }, class: 'form-control selectize', placeholder: t(:choose) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:created_at_from) %>
|
||||
<%= f.search_field :created_at_gteq, value: params[:q][:created_at_gteq], class: 'form-control js-datepicker', placeholder: t(:created_at_from) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:created_at_until) %>
|
||||
<%= f.search_field :created_at_lteq, value: params[:q][:created_at_lteq], class: 'form-control js-datepicker', placeholder: t(:created_at_until) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:updated_at) %>
|
||||
<%= f.search_field :updated_at_gteq, value: params[:q][:updated_at_gteq], class: 'form-control js-datepicker', placeholder: t(:updated_at) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="form-group">
|
||||
<%= label_tag t(:status) %>
|
||||
<%= select_tag :statuses_contains, options_for_select(Contact::STATUSES, params[:statuses_contains]), { multiple: true, placeholder: t(:choose), class: 'form-control js-combobox' } %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<%= label_tag t(:results_per_page) %>
|
||||
<%= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 text-right" style="padding-top: 25px;">
|
||||
<button class="btn btn-primary">
|
||||
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
|
||||
</button>
|
||||
<%= button_tag t('.download_pdf_btn'),
|
||||
formaction: registrar_contacts_path(format: :pdf),
|
||||
name: nil,
|
||||
class: 'btn btn-default' %>
|
||||
<%= button_tag t('.download_csv_btn'),
|
||||
formaction: registrar_contacts_path(format: :csv),
|
||||
name: nil,
|
||||
class: 'btn btn-default' %>
|
||||
<%= link_to(t('.reset_btn'), registrar_contacts_path, class: 'btn btn-default') %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,20 +0,0 @@
|
|||
- if @contact.persisted?
|
||||
= render 'shared/title', name: "#{t(:delete)}: #{@contact.name}"
|
||||
|
||||
= form_for(@contact, url: registrar_contact_path(@contact),
|
||||
class: 'form-horizontal', multipart: true, method: :delete) do |f|
|
||||
|
||||
= render 'registrar/shared/error_messages', f: f
|
||||
= f.hidden_field :id
|
||||
= f.hidden_field :password
|
||||
|
||||
.row
|
||||
.col-md-8
|
||||
= render 'registrar/contacts/form/legal_document', f: f
|
||||
|
||||
%hr
|
||||
.row
|
||||
.col-md-8.text-right
|
||||
= button_tag t(:delete), class: 'btn btn-danger'
|
||||
- else
|
||||
%h2= "#{t(:delete)}: #{t(:not_found)}"
|
|
@ -1,5 +0,0 @@
|
|||
= render 'shared/title', name: "#{t(:edit)}: #{@contact.name}"
|
||||
|
||||
= form_for(@contact, url: registrar_contact_path(@contact),
|
||||
html: {class: 'form-horizontal js-contact-form'}) do |f|
|
||||
- render 'form', f: f
|
|
@ -1,36 +0,0 @@
|
|||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left= t(:address)
|
||||
.panel-body
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= f.label :street, t(:street) + '*'
|
||||
.col-md-7
|
||||
= f.text_field :street, class: 'form-control', required: true
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= f.label :city, t(:city) + '*'
|
||||
.col-md-7
|
||||
= f.text_field :city, class: 'form-control', required: true
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= f.label :zip, t(:zip) + '*'
|
||||
.col-md-7
|
||||
= f.text_field :zip, class: 'form-control', required: true
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= f.label :state, t(:state)
|
||||
.col-md-7
|
||||
= f.text_field :state, class: 'form-control'
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= f.label :country_code, t(:country) + '*'
|
||||
.col-md-7
|
||||
- country_selected = f.object.persisted? ? f.object.country_code : 'EE'
|
||||
= f.select(:country_code, ApplicationController.helpers.all_country_options(country_selected),
|
||||
{ include_blank: true }, required: true)
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left= t(:id)
|
||||
.panel-body
|
||||
.form-group
|
||||
.col-md-2.control-label
|
||||
= f.label :code, t(:id)
|
||||
.col-md-10
|
||||
= f.text_field :code, class: 'form-control'
|
|
@ -1,67 +0,0 @@
|
|||
- ident_complete = f.object.ident_country_code.present? && f.object.ident_type.present? && f.object.ident.present?
|
||||
- if @contact.persisted?
|
||||
- country_selected = f.object.ident_country_code || (params[:depp_contact].try(:[], :ident_country_code))
|
||||
- type_selected = f.object.ident_type || (params[:depp_contact].try(:[], :ident_type))
|
||||
- else
|
||||
- country_selected = (params[:depp_contact].try(:[], :ident_country_code) || 'EE')
|
||||
- type_selected = (params[:depp_contact].try(:[], :ident_type) || 'org')
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left= t(:ident)
|
||||
.panel-body
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= f.label :ident_country_code, t(:country) + '*'
|
||||
.col-md-7
|
||||
- if ident_complete && @contact.persisted? && f.object.ident_country_code.present?
|
||||
= f.text_field :ident_country_code, value: f.object.ident_country_code, :readonly => true
|
||||
- else
|
||||
= f.select(:ident_country_code, ApplicationController.helpers.all_country_options(country_selected), {},
|
||||
class: 'js-ident-country-code', required: true)
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= f.label :ident_type, t(:type) + '*'
|
||||
.col-md-7
|
||||
- if ident_complete && @contact.persisted? && f.object.ident_type.present?
|
||||
= f.text_field :ident_type, value: f.object.ident_type, :readonly => true
|
||||
- else
|
||||
= f.select(:ident_type, Depp::Contact::SELECTION_TYPES, { selected: type_selected },
|
||||
class: 'js-ident-type', required: true)
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= f.label :ident, t(:ident) + '*'
|
||||
.col-md-7
|
||||
- if ident_complete && @contact.persisted? && f.object.ident.present?
|
||||
= f.text_field :ident, value: f.object.ident, :readonly => true
|
||||
- else
|
||||
= f.text_field :ident, class: 'form-control', required: true
|
||||
- tip_visibility = f.object.ident_type == 'birthday' ? '' : 'display: none'
|
||||
.js-ident-tip{ style: tip_visibility }
|
||||
= t(:birthday_format)
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left= t(:general)
|
||||
.panel-body
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= f.label :name, t(:name) + '*'
|
||||
.col-md-7
|
||||
= f.text_field :name, class: 'form-control', required: true
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= f.label :email, t(:email) + '*'
|
||||
.col-md-7
|
||||
= f.email_field :email, class: 'form-control', required: true,
|
||||
pattern: "[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$"
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= f.label :phone, t(:phone) + '*'
|
||||
.col-md-7
|
||||
= f.text_field :phone, class: 'form-control',
|
||||
placeholder: '+372.12323344', required: true
|
|
@ -1,13 +0,0 @@
|
|||
.form-group
|
||||
.col-md-10
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left= t(:legal_document)
|
||||
.panel-body
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= f.label :legal_document, t(:legal_document)
|
||||
%p.help-block= t(:legal_document_max_size)
|
||||
.col-md-7
|
||||
= f.legal_document_field :legal_document
|
|
@ -1,77 +0,0 @@
|
|||
<% content_for :actions do %>
|
||||
<%= link_to(t(:new), new_registrar_contact_path, class: 'btn btn-primary') %>
|
||||
<% end %>
|
||||
<%= render 'shared/title', name: t(:contacts) %>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%= render 'search_form' %>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-bordered table-condensed contacts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-xs-2">
|
||||
<%= sort_link(@q, 'name', t(:name)) %>
|
||||
</th>
|
||||
<th class="col-xs-2">
|
||||
<%= sort_link(@q, 'code', t(:id)) %>
|
||||
</th>
|
||||
<th class="col-xs-2">
|
||||
<%= sort_link(@q, 'ident', t(:ident)) %>
|
||||
</th>
|
||||
<th class="col-xs-2">
|
||||
<%= sort_link(@q, 'email', t(:created_at)) %>
|
||||
</th>
|
||||
<th class="col-xs-2">
|
||||
<%= sort_link(@q, 'registrar_name', t(:registrar_name)) %>
|
||||
</th>
|
||||
<th class="col-xs-2">
|
||||
<%= t(:actions) %>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @contacts.each do |contact| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= link_to(contact.name, registrar_contact_path(id: contact.code)) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= contact.code %>
|
||||
</td>
|
||||
<td>
|
||||
<%= ident_for(contact) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= l(contact.created_at, format: :short) %>
|
||||
</td>
|
||||
<td>
|
||||
<% if contact.registrar %>
|
||||
<%= contact.registrar %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to(t(:edit), edit_registrar_contact_path(contact.code), class: 'btn btn-primary btn-xs') %>
|
||||
<%= link_to(t(:delete), delete_registrar_contact_path(contact.code), class: 'btn btn-default btn-xs') %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<%= paginate @contacts %>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<div class="pagination">
|
||||
<%= t(:result_count, count: @contacts.total_count) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,19 +0,0 @@
|
|||
= render 'shared/title', name: t(:contacts_info)
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
= form_tag registrar_contact_path, class: 'form-horizontal', method: :get do
|
||||
.form-group
|
||||
= label_tag :contact_id, t(:contact_id), class: 'col-md-2 control-label'
|
||||
.col-md-10
|
||||
= text_field_tag :contact_id, params[:contact_id], class: 'form-control', autocomplete: 'off'
|
||||
.form-group
|
||||
= label_tag :password, t(:password), class: 'col-md-2 control-label'
|
||||
.col-md-10
|
||||
= text_field_tag :password, params[:password], class: 'form-control', autocomplete: 'off'
|
||||
.form-group
|
||||
.col-md-offset-2.col-md-10
|
||||
%button.btn.btn-primary
|
||||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<body>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-xs-2"><%= Contact.human_attribute_name :name %></th>
|
||||
<th class="col-xs-2"><%= Contact.human_attribute_name :code %></th>
|
||||
<th class="col-xs-2"><%= Contact.human_attribute_name :ident %></th>
|
||||
<th class="col-xs-2"><%= Contact.human_attribute_name :created_at %></th>
|
||||
<th class="col-xs-2"><%= Registrar.model_name.human %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @contacts.each do |contact| %>
|
||||
<tr>
|
||||
<td><%= contact %></td>
|
||||
<td><%= contact.code %></td>
|
||||
<td><%= ident_for(contact) %></td>
|
||||
<td><%= l(contact.created_at, format: :short) %></td>
|
||||
<td><%= contact.registrar %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,5 +0,0 @@
|
|||
= render 'shared/title', name: t(:new_contact)
|
||||
|
||||
= form_for(@contact, url: registrar_contacts_path,
|
||||
html: {class: 'form-horizontal js-contact-form'}) do |f|
|
||||
- render 'form', f: f
|
|
@ -1,23 +0,0 @@
|
|||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:address)
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
- if @contact.org_name.present?
|
||||
%dt= t(:org_name)
|
||||
%dd= @contact.org_name
|
||||
|
||||
%dt= t(:street)
|
||||
%dd= @contact.street
|
||||
|
||||
%dt= t(:city)
|
||||
%dd= @contact.city
|
||||
|
||||
%dt= t(:zip)
|
||||
%dd= @contact.zip
|
||||
|
||||
%dt= t(:state)
|
||||
%dd= @contact.state
|
||||
|
||||
%dt= t(:country)
|
||||
%dd= @contact.country_name
|
|
@ -1,31 +0,0 @@
|
|||
- domains = contact.all_domains(page: params[:domain_page], per: 20,
|
||||
params: domain_filter_params.to_h)
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
.pull-left
|
||||
= t(:domains)
|
||||
.pull-right
|
||||
= form_tag request.path, method: :get do
|
||||
= select_tag :domain_filter, options_for_select(%w(Registrant AdminDomainContact TechDomainContact), selected: params[:domain_filter]),
|
||||
include_blank: true, class: 'form-control2 selectize2'
|
||||
%button.btn.btn-primary
|
||||
%span.glyphicon.glyphicon-search
|
||||
.clearfix
|
||||
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-3'}=custom_sort_link t(:domain_name), :name
|
||||
%th{class: 'col-xs-3'}=custom_sort_link t(:registrar_name), :registrar_name
|
||||
%th{class: 'col-xs-3'}=custom_sort_link t(:valid_to), :valid_to
|
||||
%th{class: 'col-xs-3'}= t('.roles')
|
||||
%tbody
|
||||
- domains.each do |x|
|
||||
%tr
|
||||
%td= link_to(x.name, info_registrar_domains_path(domain_name: x.name))
|
||||
%td= x.registrar.name
|
||||
%td= l(x.valid_to, format: :short)
|
||||
%td= x.roles.join(", ")
|
||||
|
||||
= paginate domains, param_name: :domain_page
|
|
@ -1,23 +0,0 @@
|
|||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:general)
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t(:id)
|
||||
%dd= @contact.id
|
||||
|
||||
%dt= Contact.human_attribute_name :auth_info
|
||||
%dd
|
||||
= tag :input, type: 'text', value: @contact.password, readonly: true,
|
||||
class: 'form-control input-sm'
|
||||
|
||||
%br
|
||||
|
||||
%dt= t(:ident)
|
||||
%dd= ident_for(@contact)
|
||||
|
||||
%dt= t(:email)
|
||||
%dd= @contact.email
|
||||
|
||||
%dt= t(:phone)
|
||||
%dd= @contact.phone
|
|
@ -1,14 +0,0 @@
|
|||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:statuses)
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-6'}= t(:status)
|
||||
%th{class: 'col-xs-6'}= t(:description)
|
||||
%tbody
|
||||
- statuses.each do |s|
|
||||
%tr
|
||||
%td= s.first
|
||||
%td= s.second
|
|
@ -1,19 +0,0 @@
|
|||
- if @contact.id.present?
|
||||
- content_for :actions do
|
||||
= link_to(t(:edit), edit_registrar_contact_path(@contact.id), class: 'btn btn-primary')
|
||||
= link_to(t(:delete), delete_registrar_contact_path(@contact.id), class: 'btn btn-default')
|
||||
= render 'shared/title', name: @contact.name
|
||||
|
||||
.row
|
||||
.col-md-6= render 'registrar/contacts/partials/general'
|
||||
.col-md-6= render 'registrar/contacts/partials/address' if Contact.address_processing?
|
||||
.row
|
||||
.col-md-12= render 'registrar/contacts/partials/statuses', statuses: @contact.statuses
|
||||
.row
|
||||
- if @contact.ident.present?
|
||||
.col-md-12= render 'registrar/contacts/partials/domains', contact: Contact.find_by(code: params[:id])
|
||||
|
||||
- else
|
||||
.row
|
||||
.col-sm-6
|
||||
%h1= t(:not_found)
|
|
@ -1,28 +0,0 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:back_to_billing), registrar_invoices_path, class: 'btn btn-default')
|
||||
= render 'shared/title', name: t(:add_deposit)
|
||||
|
||||
= form_for([:registrar, @deposit], method: :post, html: { class: 'form-horizontal' }) do |f|
|
||||
= render 'shared/full_errors', object: @deposit
|
||||
|
||||
.row
|
||||
.col-md-8
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :amount, class: 'required'
|
||||
.col-md-7
|
||||
.input-group
|
||||
= f.text_field :amount, class: 'form-control', required: true
|
||||
.input-group-addon
|
||||
EUR
|
||||
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :description
|
||||
.col-md-7
|
||||
= f.text_area :description, class: 'form-control'
|
||||
|
||||
%hr
|
||||
.row
|
||||
.col-md-8.text-right
|
||||
= button_tag(t(:add), class: 'btn btn-warning')
|
|
@ -1,39 +0,0 @@
|
|||
<%= form_tag registrar_domain_transfers_path, multipart: true, class: 'form-horizontal' do %>
|
||||
<%= render 'registrar/domain_transfers/form/api_errors' %>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 control-label">
|
||||
<%= label_tag :domain_name, nil, class: 'required' %>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<%= text_field_tag :domain_name, params[:domain_name], autofocus: true, required: true,
|
||||
class: 'form-control' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 control-label">
|
||||
<%= label_tag :transfer_code, nil, class: 'required' %>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<%= text_field_tag :transfer_code, params[:transfer_code], class: 'form-control', required: true %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 control-label">
|
||||
<%= label_tag 'legal_document', t(:legal_document) %>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<%= file_field_tag 'legal_document' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-10 text-right">
|
||||
<button class="btn btn-warning">
|
||||
<%= t '.submit_btn' %>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,27 +0,0 @@
|
|||
<div class="page-header">
|
||||
<h1><%= t '.header' %></h1>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<%= t(:result) %>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt><%= t(:domain_name) %></dt>
|
||||
<dd><%= @data.css('name').text %></dd>
|
||||
|
||||
<% @data.css('trnData').children.each do |x| %>
|
||||
<% next if x.blank? %>
|
||||
<dt><%= t(x.name) %></dt>
|
||||
<dd><%= x.text %></dd>
|
||||
<% end %>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,13 +0,0 @@
|
|||
<% if @api_errors %>
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
<% if @api_errors.is_a?(String) %>
|
||||
<li><%= @api_errors %></li>
|
||||
<% else %>
|
||||
<% @api_errors.each do |error| %>
|
||||
<li><%= error[:title] %></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,11 +0,0 @@
|
|||
<div class="page-header">
|
||||
<h1><%= t '.header' %></h1>
|
||||
</div>
|
||||
|
||||
<%= render 'registrar/domain_transfers/form/api_errors' %>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<%= render 'form' %>
|
||||
</div>
|
||||
</div>
|
|
@ -1,10 +0,0 @@
|
|||
= form_tag check_registrar_domains_path, class: 'form-horizontal', method: :get do
|
||||
.col-md-11
|
||||
.form-group
|
||||
= text_field_tag :domain_name, params[:domain_name], class: 'form-control', placeholder: t(:domain_name), autocomplete: 'off'
|
||||
.col-md-1.text-right.text-center-xs
|
||||
.form-group
|
||||
%button.btn.btn-primary
|
||||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<tr>
|
||||
<td><%= link_to truncate(domain.name), info_registrar_domains_path(domain_name: domain.name) %></td>
|
||||
<td><%= link_to domain.registrant, registrar_contact_path(id: domain.registrant.code) %></td>
|
||||
<td><%= l domain.expire_time %></td>
|
||||
<td>
|
||||
<%= link_to t('.edit_btn'), edit_registrar_domains_path(domain_name: domain.name),
|
||||
class: 'btn btn-primary btn-xs' %>
|
||||
<%= link_to t('.renew_btn'), renew_registrar_domains_path(domain_name: domain.name),
|
||||
class: 'btn btn-default btn-xs' %>
|
||||
<% unless (domain.statuses & %w[pendingDelete pendingDeleteConfirmation]).any? %>
|
||||
<%= link_to t('.delete_btn'), delete_registrar_domains_path(domain_name: domain.name),
|
||||
class: 'btn btn-default btn-xs' %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
|
@ -1,30 +0,0 @@
|
|||
- path = (params[:domain_name]) ? update_registrar_domains_path : registrar_domains_path
|
||||
- legaldoc_mandatory = params[:domain_name].blank? && current_registrar_user.legaldoc_mandatory?
|
||||
= form_tag(path, class: 'form-horizontal', multipart: true) do
|
||||
.row
|
||||
.col-md-8
|
||||
#general-tab.tab-pane.active
|
||||
= render 'registrar/domains/form/general'
|
||||
= render 'registrar/domains/form/contacts'
|
||||
= render 'registrar/domains/form/nameservers'
|
||||
= render 'registrar/domains/form/dnskeys'
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left= t(:legal_document)
|
||||
.panel-body
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
- c, fr = 'required', true if legaldoc_mandatory
|
||||
= label_tag 'domain[legal_document]', t(:legal_document), class: c
|
||||
%p.help-block= t(:legal_document_max_size)
|
||||
.col-md-7
|
||||
= legal_document_field_tag 'domain[legal_document]', required: fr
|
||||
.col-md-4
|
||||
%p.domain-general-help= t(:domain_general_help).html_safe
|
||||
%p.domain-admin-contact-help= t(:domain_admin_contact_help).html_safe
|
||||
%p.domain-tech-contact-help= t(:domain_tech_contact_help).html_safe
|
||||
|
||||
.row
|
||||
.col-md-8.text-right
|
||||
= button_tag(t('.save_btn'), class: 'btn btn-warning')
|
|
@ -1,89 +0,0 @@
|
|||
<%= search_form_for [:registrar, @q], html: { class: 'search-form', autocomplete: 'off' } do |f| %>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label :name, for: nil %>
|
||||
<%= f.search_field :name_matches, value: search_params[:name_matches], class: 'form-control',
|
||||
placeholder: t(:name) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label :registrant_ident, for: nil %>
|
||||
<%= f.search_field :registrant_ident_eq, class: 'form-control', placeholder: t(:registrant_ident) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label :contact_ident, for: nil %>
|
||||
<%= f.search_field :contacts_ident_eq, value: search_params[:contacts_ident_eq],
|
||||
class: 'form-control', placeholder: t(:contact_ident) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label :nameserver_hostname, for: nil %>
|
||||
<%= f.search_field :nameservers_hostname_eq, class: 'form-control',
|
||||
placeholder: t(:nameserver_hostname) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<%= label_tag :status, nil, for: nil %>
|
||||
<%= select_tag :statuses_contains,
|
||||
options_for_select(DomainStatus::STATUSES, params[:statuses_contains]),
|
||||
{ multiple: true, class: 'form-control js-combobox' } %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label :valid_to_gteq, for: nil %>
|
||||
<%= f.search_field :valid_to_gteq, value: search_params[:valid_to_gteq],
|
||||
class: 'form-control js-datepicker',
|
||||
placeholder: t(:valid_to_from) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label :valid_to_lteq, for: nil %>
|
||||
<%= f.search_field :valid_to_lteq, value: search_params[:valid_to_lteq],
|
||||
class: 'form-control js-datepicker',
|
||||
placeholder: t(:valid_to_until) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<%= label_tag :results_per_page, nil, for: nil %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<%= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control',
|
||||
placeholder: t(:results_per_page) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-10 text-right">
|
||||
<button class="btn btn-primary search">
|
||||
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
|
||||
</button>
|
||||
<%= button_tag t('.download_btn'), formaction: registrar_domains_path(format: 'csv'),
|
||||
class: 'btn btn-default' %>
|
||||
<%= link_to t('.reset_btn'), registrar_domains_path, class: 'btn btn-default' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,25 +0,0 @@
|
|||
= render 'shared/title', name: t(:check_domain)
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
= render 'check_form'
|
||||
|
||||
%hr
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t(:result)
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t(:name)
|
||||
%dd= @data.css('name').text
|
||||
|
||||
- name = @data.css('name').first
|
||||
%dt= t(:available)
|
||||
%dd= name['avail']
|
||||
|
||||
- if @data.css('reason').text.present?
|
||||
%dt= t(:reason)
|
||||
%dd= @data.css('reason').text
|
|
@ -1,5 +0,0 @@
|
|||
= render 'shared/title', name: t(:check_domain)
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
= render 'check_form'
|
|
@ -1,25 +0,0 @@
|
|||
= render 'shared/title', name: "#{t(:delete)}: #{params[:domain_name]}"
|
||||
|
||||
= form_tag(destroy_registrar_domains_path, class: 'form-horizontal', multipart: true, method: :delete) do
|
||||
.col-md-8
|
||||
.panel.panel-default
|
||||
.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);" if current_registrar_user.legaldoc_mandatory?)
|
||||
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= label_tag 'domain[legal_document]', t(:legal_document)
|
||||
%p.help-block= t(:legal_document_max_size)
|
||||
.col-md-6
|
||||
= file_field_tag 'domain[legal_document]'
|
||||
= hidden_field_tag 'domain[name]', params[:domain_name]
|
||||
%hr
|
||||
.row
|
||||
.col-md-8.text-right
|
||||
= button_tag t(:delete), class: 'btn btn-danger'
|
|
@ -1,3 +0,0 @@
|
|||
= render 'shared/title', name: "#{t(:edit)}: #{params[:domain_name]}"
|
||||
|
||||
= render 'form'
|
|
@ -1,44 +0,0 @@
|
|||
#js-domain-contacts
|
||||
- @domain_params['contacts_attributes'].each do |k, v|
|
||||
.js-contact
|
||||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left= t(:contact)
|
||||
.pull-right
|
||||
= link_to(t(:add_another), '#', class: 'btn btn-default btn-xs add-domain-contact')
|
||||
= link_to(t(:delete), '#', class: 'btn btn-default btn-xs destroy')
|
||||
.panel-body
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag "domain_contacts_attributes_#{k}_type", t(:contact_type), class: 'required'
|
||||
.col-md-7
|
||||
= select_tag "domain[contacts_attributes][#{k}][type]", options_for_select(['admin', 'tech'], v['type']), {class: 'form-control js-contact-type'}
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag "domain_contacts_attributes_#{k}_code", t(:id), class: 'required'
|
||||
.col-md-7.has-feedback
|
||||
= text_field_tag "domain[contacts_attributes][#{k}][code]", v['code'], class: "hidden"
|
||||
= text_field_tag "domain[contacts_attributes][#{k}][code_helper]", contacts.find_by(code: v['code']).try(:search_name), class: 'form-control', data: {autocomplete: search_contacts_registrar_domains_path}, required: true
|
||||
|
||||
:coffee
|
||||
load_listener = ->
|
||||
clone = $('.js-contact:first').clone()
|
||||
$("#js-domain-contacts").nestedAttributes
|
||||
bindAddTo: $(".add-domain-contact")
|
||||
afterAdd: (item) ->
|
||||
# preselect type
|
||||
item.find('select.js-contact-type').each (k, v) ->
|
||||
$(v).val($(v).find('option:last-child').val())
|
||||
# add combobex
|
||||
item.find('select.js-contact-code').each (k, v) ->
|
||||
$(v).select2
|
||||
width: "100%"
|
||||
selectOnBlur: true
|
||||
dropdownAutoWidth: if self==top then true else false
|
||||
# remove link for temp
|
||||
item.find('a.add-domain-contact').each (k, v) ->
|
||||
$(v).hide()
|
||||
new Autocomplete()
|
||||
$clone: clone
|
||||
window.addEventListener 'load', load_listener
|
|
@ -1,77 +0,0 @@
|
|||
#dnskeys
|
||||
- @domain_params['dnskeys_attributes'].each do |k, v|
|
||||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left= t(:dnskey)
|
||||
.pull-right
|
||||
= link_to(t(:add_another), '#', class: 'btn btn-default btn-xs add-dnskey')
|
||||
= link_to(t(:delete), '#', class: 'btn btn-default btn-xs destroy')
|
||||
.panel-body
|
||||
- if ENV['show_ds_data_fields'] == 'true'
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag "domain_dnskeys_attributes_#{k}_ds_key_tag", t(:ds_key_tag)
|
||||
.col-md-7
|
||||
= text_field_tag "domain[dnskeys_attributes][#{k}][ds_key_tag]", v['ds_key_tag'],
|
||||
{class: 'form-control'}
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag "domain_dnskeys_attributes_#{k}_ds_alg", t(:ds_algorithm)
|
||||
.col-md-7
|
||||
= select_tag "domain[dnskeys_attributes][#{k}][ds_alg]",
|
||||
options_for_select(Depp::Dnskey::ALGORITHMS, v['ds_alg']), {class: 'form-control'}
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag "domain_dnskeys_attributes_#{k}_ds_digest_type", t(:ds_digest_type)
|
||||
.col-md-7
|
||||
= select_tag "domain[dnskeys_attributes][#{k}][ds_digest_type]",
|
||||
options_for_select(Depp::Dnskey::DS_DIGEST_TYPES, v['ds_digest_type']),
|
||||
{class: 'form-control'}
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag "domain_dnskeys_attributes_#{k}_ds_digest", t(:ds_digest)
|
||||
.col-md-7
|
||||
= text_field_tag "domain[dnskeys_attributes][#{k}][ds_digest]", v['ds_digest'],
|
||||
{class: 'form-control'}
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag "domain_dnskeys_attributes_#{k}_flags", t('.flags')
|
||||
.col-md-7
|
||||
= select_tag "domain[dnskeys_attributes][#{k}][flags]",
|
||||
options_for_select(Depp::Dnskey::FLAGS, v['flags']),
|
||||
{ class: 'form-control' }
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag "domain_dnskeys_attributes_#{k}_protocol", t(:protocol)
|
||||
.col-md-7
|
||||
= select_tag "domain[dnskeys_attributes][#{k}][protocol]",
|
||||
options_for_select(Depp::Dnskey::PROTOCOLS, v['protocol']),
|
||||
{ class: 'form-control' }
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag "domain_dnskeys_attributes_#{k}_alg", t('.alg')
|
||||
.col-md-7
|
||||
= select_tag "domain[dnskeys_attributes][#{k}][alg]",
|
||||
options_for_select(Depp::Dnskey::ALGORITHMS, v['alg']), { class: 'form-control' }
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag "domain_dnskeys_attributes_#{k}_public_key", t(:public_key)
|
||||
.col-md-7
|
||||
= text_field_tag "domain[dnskeys_attributes][#{k}][public_key]", v['public_key'],
|
||||
class: 'form-control'
|
||||
|
||||
:coffee
|
||||
load_listener = ->
|
||||
$("#dnskeys").nestedAttributes
|
||||
bindAddTo: $(".add-dnskey")
|
||||
afterAdd: (item) ->
|
||||
item.find('select').each (k, v) ->
|
||||
$(v).val($(v).find('option:first-child').val())
|
||||
window.addEventListener 'load', load_listener
|
|
@ -1,39 +0,0 @@
|
|||
.general-tab.panel.panel-default
|
||||
.panel-body
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag :domain_name, t(:name), class: 'required'
|
||||
.col-md-7
|
||||
- readonly = params[:domain_name] ? true : false
|
||||
= text_field_tag('domain[name]', @domain_params[:name],
|
||||
class: 'form-control', readonly: readonly, required: true)
|
||||
|
||||
- unless params[:domain_name]
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag :domain_period, t(:period), class: 'required'
|
||||
.col-md-7
|
||||
= select_tag 'domain[period]',
|
||||
options_for_select(Depp::Domain::PERIODS, @domain_params[:period]), { class: 'form-control' }
|
||||
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag :domain_registrant, t('.registrant'), class: 'required'
|
||||
.col-md-7
|
||||
= text_field_tag 'domain[registrant]', @domain_params[:registrant], class: "hidden"
|
||||
= 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);"
|
||||
|
||||
- if !params[:domain_name] || @dispute.present?
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag :domain_reserved_pw, t(:reserved_pw)
|
||||
.col-md-7
|
||||
= text_field_tag('domain[reserved_pw]', @domain_params[:reserved_pw], class: 'form-control')
|
|
@ -1,33 +0,0 @@
|
|||
#nameservers
|
||||
- @domain_params['nameservers_attributes'].each do |k, v|
|
||||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left= t(:nameserver)
|
||||
.pull-right
|
||||
= link_to(t(:add_another), '#', class: 'btn btn-default btn-xs add-nameserver')
|
||||
= link_to(t(:delete), '#', class: 'btn btn-default btn-xs destroy')
|
||||
.panel-body
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag "domain_nameservers_attributes_#{k}_hostname", t(:hostname),
|
||||
class: Domain.nameserver_required? ? 'required' : nil
|
||||
.col-md-7
|
||||
= text_field_tag "domain[nameservers_attributes][#{k}][hostname]", v['hostname'],
|
||||
class: 'form-control', required: Domain.nameserver_required?
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag "domain_nameservers_attributes_#{k}_ipv4", t(:ipv4)
|
||||
.col-md-7
|
||||
= text_field_tag "domain[nameservers_attributes][#{k}][ipv4]", v['ipv4'],
|
||||
class: 'form-control'#, ipv4: true
|
||||
.form-group
|
||||
.col-md-3.control-label
|
||||
= label_tag "domain_nameservers_attributes_#{k}_ipv6", t(:ipv6)
|
||||
.col-md-7
|
||||
= text_field_tag "domain[nameservers_attributes][#{k}][ipv6]", v['ipv6'],
|
||||
class: 'form-control'#, ipv6: true
|
||||
:coffee
|
||||
load_listener = ->
|
||||
$("#nameservers").nestedAttributes
|
||||
bindAddTo: $(".add-nameserver")
|
||||
window.addEventListener 'load', load_listener
|
|
@ -1,59 +0,0 @@
|
|||
<div class="page-header">
|
||||
<div class="row">
|
||||
<div class="col-sm-5">
|
||||
<h1><%= t '.header' %></h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-7 text-right">
|
||||
<%= link_to t('.new_btn'), new_registrar_domain_path, class: 'btn btn-primary' %>
|
||||
<%= link_to t('.transfer_btn'), new_registrar_domain_transfer_path, class: 'btn btn-default' %>
|
||||
<%= link_to t('.bulk_change_btn'), new_registrar_bulk_change_path,
|
||||
class: 'btn btn-default' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%= render 'search_form' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-xs-2">
|
||||
<%= sort_link(@q, 'name') %>
|
||||
</th>
|
||||
<th class="col-xs-2">
|
||||
<%= sort_link @q, 'registrant_name', Registrant.model_name.human %>
|
||||
</th>
|
||||
<th class="col-xs-2">
|
||||
<%= sort_link @q, 'valid_to', Domain.human_attribute_name(:expire_time) %>
|
||||
</th>
|
||||
<th class="col-xs-2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<%= render partial: 'domain', collection: @domains %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<%= paginate @domains %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 text-right">
|
||||
<div class="pagination">
|
||||
<%= t :result_count, count: @domains.total_count %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,59 +0,0 @@
|
|||
<% content_for :actions do %>
|
||||
<% if @data.css('pw').text.present? %>
|
||||
<%= link_to(t(:edit), edit_registrar_domains_path(domain_name: params[:domain_name]),
|
||||
class: 'btn btn-default') %>
|
||||
<%= link_to(t(:renew), renew_registrar_domains_path(domain_name: params[:domain_name]),
|
||||
class: 'btn btn-default') %>
|
||||
<% unless @pending_delete %>
|
||||
<%= link_to(t(:delete), delete_registrar_domains_path(domain_name: params[:domain_name]),
|
||||
class: 'btn btn-default') %>
|
||||
<% end %>
|
||||
<% if @client_holded %>
|
||||
<%= link_to(t(:remove_client_hold), remove_hold_registrar_domains_path(domain_name: params[:domain_name]),
|
||||
class: 'btn btn-default') %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to t('.transfer_btn'), new_registrar_domain_transfer_path(domain_name: params[:domain_name]),
|
||||
class: 'btn btn-default' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= render 'shared/title', name: truncate(@data.css('name').text) %>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<% if @data.css('result').first['code'] == '1000' %>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%= render 'registrar/domains/partials/general' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%= render 'registrar/domains/partials/contacts' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%= render 'registrar/domains/partials/statuses' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%= render 'registrar/domains/partials/nameservers' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%= render 'registrar/domains/partials/dnskeys' %>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<h1>
|
||||
<%= t(:not_found) %>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
|
@ -1,3 +0,0 @@
|
|||
= render 'shared/title', name: t(:new_domain)
|
||||
|
||||
= render 'form'
|
|
@ -1,17 +0,0 @@
|
|||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
%h3.panel-title= t(:contacts)
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-4'}= t(:type)
|
||||
%th{class: 'col-xs-4'}= t(:name)
|
||||
%th{class: 'col-xs-4'}= t(:id)
|
||||
%tbody
|
||||
- @data.css('contact').each do |x|
|
||||
- registrant = Contact.find_by_code(x.text)
|
||||
%tr
|
||||
%td= x['type']
|
||||
%td= registrant.registrar == current_registrar_user.registrar ? registrant.name : 'N/A'
|
||||
%td= x.text
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue