Remove registrar controllers and views

This commit is contained in:
Thiago Youssef 2022-09-04 16:52:33 -03:00
parent 161c258210
commit e8f2360c36
118 changed files with 0 additions and 4212 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,229 +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
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i.positive?
respond_to do |format|
format.html
format.csv do
domain_presenters = []
@domains.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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 navbar-fixed-top">
<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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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 %>

View file

@ -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>

View file

@ -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' %>

View file

@ -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 %>

View file

@ -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">
&nbsp;
<span class="glyphicon glyphicon-search"></span>
&nbsp;
</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>

View file

@ -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>

View file

@ -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' %>

View file

@ -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 %>

View file

@ -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'

View file

@ -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>

View file

@ -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 %>

View file

@ -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 %>

View file

@ -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 %>

View file

@ -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 %>

View file

@ -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>

View file

@ -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>

View file

@ -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'

View file

@ -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">
&nbsp;
<span class="glyphicon glyphicon-search"></span>
&nbsp;
</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 %>

View file

@ -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)}"

View file

@ -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

View file

@ -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)

View file

@ -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'

View file

@ -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

View file

@ -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

View file

@ -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>

View file

@ -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
&nbsp;
%span.glyphicon.glyphicon-search
&nbsp;

View file

@ -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>

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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')

View file

@ -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 %>

View file

@ -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>

View file

@ -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 %>

View file

@ -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>

View file

@ -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
&nbsp;
%span.glyphicon.glyphicon-search
&nbsp;

View file

@ -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>

View file

@ -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')

View file

@ -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">
&nbsp;
<span class="glyphicon glyphicon-search"></span>
&nbsp;
</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 %>

View file

@ -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

View file

@ -1,5 +0,0 @@
= render 'shared/title', name: t(:check_domain)
.row
.col-md-12
= render 'check_form'

View file

@ -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'

View file

@ -1,3 +0,0 @@
= render 'shared/title', name: "#{t(:edit)}: #{params[:domain_name]}"
= render 'form'

View file

@ -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

View file

@ -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

View file

@ -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')

View file

@ -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

View file

@ -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>

View file

@ -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>

View file

@ -1,3 +0,0 @@
= render 'shared/title', name: t(:new_domain)
= render 'form'

View file

@ -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

View file

@ -1,66 +0,0 @@
.panel.panel-default
.panel-heading
%h3.panel-title= t(:dnskeys)
.panel-body{style: 'word-wrap: break-word;'}
.table-responsive
%table.table.table-hover.table-condensed
%tbody
- @data.css('dsData').each_with_index do |x, index|
- if x.css('digest').text.present?
%tr
%td
%b= "#{t(:ds_key_tag)}:"
= x.css('keyTag').text
%tr
%td
%b= "#{t(:ds_algorithm)}:"
= x.css('alg').first.text
%tr
%td
%b= "#{t(:ds_digest_type)}:"
= x.css('digestType').text
%tr
%td
%b= "#{t(:ds_digest)}:"
= x.css('digest').text
%tr
%td
%b= "#{t(:flag)}:"
= x.css('keyData').css('flags').text
%tr
%td
%b= "#{t(:protocol)}:"
= x.css('keyData').css('protocol').text
%tr
%td
%b= "#{t(:algorithm)}:"
= x.css('alg').last.text
%tr
%td{:colspan => "3"}
%b= "#{t(:public_key)}:"
= x.css('keyData').css('pubKey').text
- if index != @data.css('keyData').size - 1
%tr
%td{:colspan => "3"}
= "&nbsp;".html_safe
- if @data.css('dsData').empty?
- @data.css('keyData').each_with_index do |x, index|
%tr
%td
%b= "#{t(:flag)}:"
= x.css('flags').text
%td
%b= "#{t(:protocol)}:"
= x.css('protocol').text
%td
%b= "#{t(:algorithm)}:"
= x.css('alg').text
%tr
%td{:colspan => "3"}
%b= "#{t(:public_key)}:"
= x.css('pubKey').text
- if index != @data.css('keyData').size - 1
%tr
%td{:colspan => "3"}
= "&nbsp;".html_safe

View file

@ -1,41 +0,0 @@
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<%= t(:general) %>
</h3>
</div>
<div class="panel-body">
<dl class="dl-horizontal">
<dt><%= Domain.human_attribute_name :transfer_code %></dt>
<dd>
<% if @data.css('pw').text.present? %>
<%= tag(:input, type: 'text', value: @data.css('pw').text, readonly: true,
class: 'form-control input-sm') %>
<% end %>
</dd>
<% if @data.css('pw').text.blank? %>
<dt><%= t(:registrar_name) %></dt>
<dd><%= @data.css('clID').text %></dd>
<% end %>
<% registrant = Contact.find_by_code(@data.css('registrant').text) %>
<dt><%= t('.registrant') %></dt>
<dd><%= registrant.registrar == current_registrar_user.registrar ? "#{registrant.name} (#{@data.css('registrant').text})" : @data.css('registrant').text %></dd>
<dt><%= t('.registered') %></dt>
<dd><%= @data.css('crDate').text %></dd>
<dt><%= t(:valid_to) %></dt>
<dd><%= @data.css('exDate').text %></dd>
<dt><%= t('.created') %></dt>
<dd><%= @data.css('crDate').text %></dd>
<dt><%= t('.updated') %></dt>
<dd><%= @data.css('upDate').text %></dd>
</dl>
</div>
</div>

View file

@ -1,17 +0,0 @@
.panel.panel-default
.panel-heading.clearfix
%h3.panel-title= t(:nameservers)
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
%tr
%th{class: 'col-xs-4'}= t(:hostname)
%th{class: 'col-xs-4'}= t(:ipv4)
%th{class: 'col-xs-4'}= t(:ipv6)
%tbody
- @data.css('hostAttr').each do |x|
%tr
%td= x.css('hostName').text
%td= Array(x.css('hostAddr[ip="v4"]')).map(&:text).join(", ")
%td= Array(x.css('hostAddr[ip="v6"]')).map(&:text).join(", ")

View file

@ -1,14 +0,0 @@
#domain_statuses.panel.panel-default
.panel-heading.clearfix
%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(:notes)
%tbody
- @data.css('status').each do |x|
%tr
%td= x['s']
%td= x.text

View file

@ -1,14 +0,0 @@
= render 'shared/title', name: t(:renew_domain)
.row
.col-md-8
.panel.panel-default
.panel-heading
%h3.panel-title= t(:result)
.panel-body
%dl.dl-horizontal
%dt= t(:domain_name)
%dd= @data.css('name').text
%dt= t(:valid_to)
%dd= @data.css('exDate').text

View file

@ -1,30 +0,0 @@
= render 'shared/title', name: t(:renew_domain)
.row
.col-md-8
= form_tag renew_registrar_domains_path, class: 'form-horizontal', method: :get do
.form-group
.col-md-3.control-label
= label_tag :domain_name, t(:name), class: 'required'
.col-md-7
= text_field_tag :domain_name, params[:domain_name],
class: 'form-control', placeholder: t(:domain_name), autocomplete: 'off', required: true
.form-group
.col-md-3.control-label
= label_tag :cur_exp_date, t(:cur_exp_date), class: 'required'
.col-md-7
= text_field_tag :cur_exp_date, params[:cur_exp_date],
class: 'form-control', placeholder: 'yyyy-mm-dd', autocomplete: 'off', required: true
.form-group
.col-md-3.control-label
= label_tag :domain_period, t(:period), class: 'required'
.col-md-7
= select_tag :period,
options_for_select(Depp::Domain::PERIODS, params[:period]), { class: 'form-control' }
%hr
.form-group
.col-md-10.text-right
%button.btn.btn-warning= t(:renew)

View file

@ -1,25 +0,0 @@
<ol class="breadcrumb">
<li><%= link_to t('registrar.invoices.index.header'), registrar_invoices_path %></li>
<li><%= link_to @invoice, registrar_invoice_path(@invoice) %></li>
</ol>
<div class="page-header">
<h1><%= t '.header' %></h1>
</div>
<%= form_tag(registrar_invoice_delivery_path(@invoice)) do %>
<div class="row">
<div class="col-md-4 col-md-offset-4">
<div class="form-group">
<%= label_tag :recipient %>
<%= email_field_tag :recipient, @recipient, required: true, autofocus: true,
class: 'form-control' %>
</div>
<div class="row">
<div class="col-md-12 text-right">
<%= submit_tag t('.submit_btn'), class: 'btn btn-warning' %>
</div>
</div>
</div>
</div>
<% end %>

View file

@ -1,73 +0,0 @@
- content_for :actions do
= link_to(t(:add_deposit), new_registrar_deposit_path, class: 'btn btn-primary')
= link_to(t(:account_activity), registrar_account_activities_path, class: 'btn btn-default')
= render 'shared/title', name: t(:your_account)
= t(:your_current_account_balance_is,
balance: currency(current_registrar_user.registrar.cash_account.balance),
currency: current_registrar_user.registrar.cash_account.currency)
%h1= t(:invoices)
.row
.col-md-12
%hr
= search_form_for @q, url: [:registrar, :invoices], html: { style: 'margin-bottom: 0;' } do |f|
.row
.col-md-3
.form-group
= f.label t(:minimum_invoice_no)
= f.search_field :number_gteq, class: 'form-control', placeholder: t(:minimum_invoice_no), autocomplete: 'off'
.col-md-3
.form-group
= f.label t(:maximum_invoice_no)
= f.search_field :number_lteq, class: 'form-control', placeholder: t(:maximum_invoice_no), autocomplete: 'off'
.col-md-3
.form-group
= f.label t(:due_date_from)
= f.search_field :due_date_gteq, value: params[:q][:due_date_gteq], class: 'form-control js-datepicker', placeholder: t(:due_date_from)
.col-md-3
.form-group
= f.label t(:due_date_until)
= f.search_field :due_date_lteq, value: params[:q][:due_date_lteq], class: 'form-control js-datepicker', placeholder: t(:due_date_until)
.row
.col-md-3
.form-group
= f.label t(:minimum_total)
= f.search_field :total_gteq, class: 'form-control', placeholder: t(:minimum_total), autocomplete: 'off'
.col-md-3
.form-group
= f.label t(:maximum_total)
= f.search_field :total_lteq, class: 'form-control', placeholder: t(:maximum_total), autocomplete: 'off'
.col-md-3{style: 'padding-top: 25px;'}
%button.btn.btn-default
&nbsp;
%span.glyphicon.glyphicon-search
&nbsp;
= link_to(t('.reset_btn'), registrar_invoices_path, class: 'btn btn-default')
%hr
.row
.col-md-12
.table-responsive
%table.table.table-hover.table-condensed
%thead
%tr
%th{class: 'col-xs-3'}= t('invoice.title')
%th{class: 'col-xs-3'}= Invoice.human_attribute_name :receipt_date
%th{class: 'col-xs-3'}= t(:due_date)
%th{class: 'col-xs-3'}= t(:total)
%tbody
- @invoices.each do |invoice|
%tr
%td= link_to(invoice, [:registrar, invoice])
- if invoice.paid?
%td= l invoice.receipt_date
- elsif invoice.cancelled?
%td.text-grey= t(:cancelled)
- else
%td{class: 'text-danger'}= t(:unpaid)
%td= l invoice.due_date
%td= currency(invoice.total)
.row
.col-md-12
= paginate @invoices

View file

@ -1,8 +0,0 @@
%h4= t('registrar.invoices.pay_invoice')
%hr
- if @invoice.payment_link.present?
= link_to @invoice.payment_link, target: :_blank do
= image_tag("everypay.png", class: 'everypay', style: "width: 100px; height: 20px;")
- else
= "No everypay link"

View file

@ -1,23 +0,0 @@
%h4= t(:buyer)
%hr
%dl.dl-horizontal
%dt= t(:name)
%dd= @invoice.buyer_name
%dt= t(:reg_no)
%dd= @invoice.buyer_reg_no
%dt= t(:address)
%dd= @invoice.buyer_address
%dt= t(:country)
%dd= @invoice.buyer_country
%dt= t(:phone)
%dd= @invoice.buyer_phone
%dt= t(:url)
%dd= @invoice.buyer_url
%dt= t(:email)
%dd= @invoice.buyer_email

View file

@ -1,36 +0,0 @@
%h4= t(:details)
%hr
%dl.dl-horizontal
%dt= t(:issue_date)
%dd= l @invoice.issue_date
- if @invoice.cancelled?
%dt= Invoice.human_attribute_name :cancelled_at
%dd= l @invoice.cancelled_at
%dt= t(:due_date)
- if @invoice.cancelled?
%dd.text-grey= t(:cancelled)
- else
%dd= l @invoice.due_date
%dt= Invoice.human_attribute_name :receipt_date
- if @invoice.paid?
%dd= l @invoice.receipt_date
- elsif @invoice.cancelled?
%dd.text-grey= t(:cancelled)
- else
%dd{class: 'text-danger'}= t(:unpaid)
%dt= t(:payment_term)
%dd Prepayment
%dt= t(:invoice_number)
%dd= @invoice.number
- if @invoice.description.present?
%dt= t(:description)
%dd=@invoice.description
%dt= Invoice.human_attribute_name :reference_no
%dd= @invoice.reference_no

View file

@ -1,32 +0,0 @@
%h4= t(:items)
%hr
.table-responsive
%table.table.table-hover.table-condensed
%thead
%tr
%th{class: 'col-xs-4'}= t(:description)
%th{class: 'col-xs-2'}= t(:unit)
%th{class: 'col-xs-2'}= InvoiceItem.human_attribute_name :quantity
%th{class: 'col-xs-2'}= t(:price)
%th{class: 'col-xs-2'}= t(:total)
%tbody
- @invoice.each do |invoice_item|
%tr
%td= invoice_item.description
%td= invoice_item.unit
%td= invoice_item.quantity
%td= currency(invoice_item.price)
%td= currency(invoice_item.item_sum_without_vat)
%tfoot
%tr
%th{colspan: 3}
%th= Invoice.human_attribute_name :subtotal
%td= number_to_currency @invoice.subtotal
%tr
%th.no-border{colspan: 3}
%th= "VAT #{number_to_percentage(@invoice.vat_rate, precision: 1)}"
%td= number_to_currency @invoice.vat_amount
%tr
%th.no-border{colspan: 3}
%th= t(:total)
%td= number_to_currency @invoice.total

View file

@ -1,19 +0,0 @@
%h4= "Payment Orders"
%hr
.table-responsive
%table.table.table-hover.table-condensed
%thead
%tr
%th{class: 'col-xs-1'}= "#"
%th{class: 'col-xs-1'}= "Channel"
%th{class: 'col-xs-2'}= "Status"
%th{class: 'col-xs-3'}= "Initiated"
%th{class: 'col-xs-4'}= "Notes"
%tbody
- @invoice.payment_orders.each do |payment_order|
%tr
%td= payment_order.id
%td= payment_order.channel
%td= payment_order.status
%td= payment_order.created_at
%td= payment_order.notes

View file

@ -1,38 +0,0 @@
%h4= t(:seller)
%hr
%dl.dl-horizontal
%dt= t(:name)
%dd= @invoice.seller_name
%dt= Registrar.human_attribute_name :reg_no
%dd= @invoice.seller_reg_no
%dt= t(:iban)
%dd= @invoice.seller_iban
%dt= t(:bank)
%dd= @invoice.seller_bank
%dt= t(:swift)
%dd= @invoice.seller_swift
%dt= Registrar.human_attribute_name :vat_no
%dd= @invoice.seller_vat_no
%dt= t(:address)
%dd= @invoice.seller_address
%dt= t(:country)
%dd= @invoice.seller_country
%dt= t(:phone)
%dd= @invoice.seller_phone
%dt= t(:url)
%dd= @invoice.seller_url
%dt= t(:email)
%dd= @invoice.seller_email
%dt= t(:issuer)
%dd= @invoice.seller_contact_name

View file

@ -1,20 +0,0 @@
- content_for :actions do
= link_to(t('.download_btn'), download_registrar_invoice_path(@invoice), class: 'btn btn-default')
= link_to(t('.deliver_btn'), new_registrar_invoice_delivery_path(@invoice), class: 'btn btn-default')
- if @invoice.cancellable?
= link_to(t(:cancel), cancel_registrar_invoice_path(@invoice), method: :patch, class: 'btn btn-warning')
= link_to(t(:back), registrar_invoices_path, class: 'btn btn-default')
= render 'shared/title', name: @invoice.to_s
= render 'shared/full_errors', object: @invoice
.row
.col-md-6= render 'registrar/invoices/partials/details'
.row
.col-md-6= render 'registrar/invoices/partials/seller'
.col-md-6= render 'registrar/invoices/partials/buyer'
.row
.col-md-12= render 'registrar/invoices/partials/items'
- if @invoice.payable?
.row.semifooter
.col-md-6-offset-6.text-right= render 'registrar/invoices/partials/banklinks', locals: { payment_channels: PaymentOrder::CUSTOMER_PAYMENT_METHODS }

View file

@ -1,14 +0,0 @@
.h3
= t('registrar.invoices.redirected_to_intermediary')
.payment-form
= form_tag @payment_order.form_url, method: :post do
- @payment_order.form_fields.each do |k, v|
= hidden_field_tag k, v
= submit_tag t('registrar.invoices.go_to_intermediary')
:javascript
function load_listener() {
$('.payment-form form').submit();
}
window.addEventListener('load', load_listener)

View file

@ -1,48 +0,0 @@
- if @data.css('msgQ').any?
- msg_q = @data.css('msgQ').first
.row
.col-sm-12
%h2= t '.header', count: msg_q['count']
%hr
.row
.col-md-12
.panel.panel-default
.panel-heading.clearfix
.pull-left= t('message_no', id: msg_q['id'])
.pull-right
- if @data.css('trnData trStatus').any? # this is a transfer request
- unless ['serverApproved', 'clientApproved'].include?(@data.css('trStatus').first.text)
= link_to(t(:confirm), 'javascript: void(0);', class: 'btn btn-warning btn-xs js-transfer-confirm')
= link_to(t(:dequeue), registrar_poll_path(id: msg_q['id']), method: :delete, class: 'btn btn-primary btn-xs')
.panel-body
%dl.dl-horizontal
%dt= t(:message)
%dd= msg_q.css('msg').text
%dt= t(:queue_date)
%dd= @data.css('qDate').text
%dl.dl-horizontal
- if @data.css('trnData trStatus').any? # this is a transfer request
= form_tag confirm_transfer_registrar_poll_path, class: 'js-transfer-form' do
= hidden_field_tag 'domain[name]', @data.css('name').text
- @data.css('trnData').children.each do |x|
- next if x.blank?
%dt= t(x.name)
%dd= x.text
- else
.row
.col-sm-12
%h2= t '.header', count: 0
%hr
.row
.col-md-12
%p.bg-info{style: 'padding: 15px;'}= t(:you_have_no_new_messages)
:coffee
load_listener = ->
$(".js-transfer-confirm").on "click", ->
$(".js-transfer-form").submit()
window.addEventListener 'load', load_listener

View file

@ -1,28 +0,0 @@
<div class="row">
<div class="form-signin col-md-6 center-block text-center">
<h1 class="form-signin-heading text-center"><%= t '.header_html' %></h1>
<hr>
<%= form_for resource, as: resource_name, url: session_path(resource_name) do |f| %>
<%= f.text_field :username, placeholder: ApiUser.human_attribute_name(:username),
autofocus: true,
required: true,
class: 'form-control' %>
<%= f.password_field :password,
placeholder: ApiUser.human_attribute_name(:password),
required: true,
class: 'form-control' %>
<%= f.submit t('.submit_btn'), class: 'btn btn-lg btn-primary btn-block' %>
<% end %>
<hr>
<div id="tara-sign-in" class="login-block ui segment">
<h3><%= t('.sign_in_with_identity_document') %></h3>
<p><%= t('.identity_document_text')%></p>
<%= link_to t(:sign_in), "/auth/tara", method: :post, class: 'btn btn-lg btn-primary btn-block' %>
</div>
</div>
</div>

View file

@ -1 +0,0 @@
<%= render 'registrar/settings/balance_auto_reload/form/types/threshold', type: @type %>

View file

@ -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' %>

View file

@ -1,40 +0,0 @@
<p><%= t '.description' %></p>
<%= form_for type, as: :type, url: registrar_settings_balance_auto_reload_path, method: :patch,
html: { class: 'form-horizontal' } do |f| %>
<%= render 'form_errors', target: type %>
<div class="form-group">
<%= f.label :amount, class: 'col-md-2 control-label' %>
<div class="col-md-2">
<div class="input-group">
<%= f.money_field :amount, required: true, autofocus: true, class: 'form-control' %>
<div class="input-group-addon"><%= Money::default_currency.symbol %></div>
</div>
</div>
<div class="col-md-4">
<span class="help-block"><%= t '.amount_hint', min_amount: f.object.min_amount %></span>
</div>
</div>
<div class="form-group">
<%= f.label :threshold, class: 'col-md-2 control-label' %>
<div class="col-md-2">
<div class="input-group">
<%= f.money_field :threshold, required: true, class: 'form-control' %>
<div class="input-group-addon"><%= Money::default_currency.symbol %></div>
</div>
</div>
</div>
<hr>
<div class="form-group">
<div class="col-md-offset-3 col-md-2">
<%= f.submit t('.submit_btn'), class: 'btn btn-success' %>
</div>
</div>
<% end %>

View file

@ -1,31 +0,0 @@
- if @data && @data.css('result')
- @results ||= @data.css('result')
- if @results || flash[:epp_results]
- success_codes = %(1000, 1300, 1301, 200)
- if @results
- @results.each do |x|
- next if success_codes.include?(x['code'])
.row
.col-md-12
%p{class: "alert alert-danger"}
= x.css('msg').text.split('[').first
- if x.css('value').text.present?
= " - #{x.css('value').text}"
%span.pull-right
= "[code: #{x['code']}]"
- if flash[:epp_results]
- flash[:epp_results].each do |x|
- next if success_codes.include?(x['code']) && x['show'] != true
- c = 'alert-danger'
- c = 'alert-success' if success_codes.include?(x['code'])
.row
.col-md-12
%p{class: "alert #{c}"}
= x['msg'].split('[').first
- if x['value'].present?
= " - #{x['value']}"
%span.pull-right
= "[code: #{x['code']}]"

Some files were not shown because too many files have changed in this diff Show more