Merge branch 'master' of github.com:domify/registry

Conflicts:
	app/assets/stylesheets/shared/general.sass
This commit is contained in:
Martin Lensment 2015-04-21 13:23:50 +03:00
commit dbbc6b3bff
58 changed files with 552 additions and 322 deletions

View file

@ -30,10 +30,12 @@ gem 'turbolinks', '~> 2.5.3' # faster page load
gem 'jquery-rails', '~> 4.0.3' # jquery
gem 'selectize-rails', '~> 0.11.2' # include selectize.js for select
gem 'therubyracer', platforms: :ruby
gem 'jquery-validation-rails', '~> 1.13.1' # validate on client side
# view helpers
gem 'kaminari', '~> 0.16.3' # pagination
gem 'nprogress-rails', '~> 0.1.6.5' # visual loader
gem 'html5_validators', '~> 1.1.3' # model requements now automatically on html form
# rights
gem 'devise', '~> 3.4.1' # authenitcation

View file

@ -220,6 +220,7 @@ GEM
hike (1.2.3)
hitimes (1.2.2)
hpricot (0.8.6)
html5_validators (1.1.3)
httpclient (2.6.0.1)
httpi (2.4.0)
rack
@ -234,6 +235,9 @@ GEM
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-validation-rails (1.13.1)
railties (>= 3.2, < 5.0)
thor (~> 0.14)
json (1.8.2)
kaminari (0.16.3)
actionpack (>= 3.0.0)
@ -511,10 +515,12 @@ DEPENDENCIES
haml-rails (~> 0.9.0)
hashie-forbidden_attributes (~> 0.1.1)
html2haml!
html5_validators (~> 1.1.3)
isikukood
iso8601 (~> 0.8.2)
jbuilder (~> 2.2.6)
jquery-rails (~> 4.0.3)
jquery-validation-rails (~> 1.13.1)
kaminari (~> 0.16.3)
launchy (~> 2.4.3)
mina (~> 0.3.1)

View file

@ -5,10 +5,12 @@
#= require nprogress
#= require nprogress-turbolinks
#= require typeahead.bundle.min
#= require autocomplete
#= require admin/autocomplete
#= require jquery.nested_attributes
#= require selectize
#= require app
#= require shared/jquery.validate.bootstrap
#= require shared/general
#= require admin/application
NProgress.configure
showSpinner: false

View file

@ -0,0 +1,12 @@
ready = ->
$('.selectize').selectize({
allowEmptyOption: true
});
# client side validate all forms
$('form').each ->
$(this).validate()
$(document).ready(ready)
$(document).on('page:load', ready)

View file

@ -0,0 +1,10 @@
#= require jquery
#= require jquery_ujs
#= require jquery.validate
#= require jquery.validate.additional-methods
#= require turbolinks
#= require bootstrap-sprockets
#= require jquery.nested_attributes
#= require shared/jquery.validate.bootstrap
#= require shared/general
#= require registrar/application

View file

@ -1,10 +1,8 @@
#= require jquery
#= require jquery_ujs
#= require turbolinks
#= require bootstrap-sprockets
#= require jquery.nested_attributes
$(document).on 'ready page:load', ->
# client side validate all forms
$('form').each ->
$(this).validate()
$('.js-contact-form').on 'restoreDefault', (e) ->
form = $(e.target)
form.find('.js-ident-tip').hide()

View file

@ -9,11 +9,3 @@
$('#flash').find('div').addClass('bg-danger')
$('#flash').find('div').html(msg)
$('#flash').show()
ready = ->
$('.selectize').selectize({
allowEmptyOption: true
});
$(document).ready(ready)
$(document).on('page:load', ready)

View file

@ -0,0 +1,20 @@
#= require jquery.validate
#= require jquery.validate.additional-methods
# override jquery validate plugin defaults
$.validator.setDefaults
highlight: (element) ->
$(element).closest('.form-group').addClass 'has-error'
return
unhighlight: (element) ->
$(element).closest('.form-group').removeClass 'has-error'
return
errorElement: 'span'
errorClass: 'help-block'
errorPlacement: (error, element) ->
if element.parent('.input-group').length
error.insertAfter element.parent()
else
error.insertAfter element
return

View file

@ -1,4 +1,4 @@
//= require 'shared/general-bootstrap'
//= require 'shared/general-manifest'
//= require 'admin/admin-bootstrap'
@import shared/fonts
@import shared/general

View file

@ -9,5 +9,10 @@ $container-large-desktop: 860px
$font-size-h1: 26px
$navbar-default-link-active-color: #333
@import "bootstrap-sprockets"
@import "bootstrap"
@import 'bootstrap-sprockets'
@import 'bootstrap'
@import 'shared/general-bootstrap'
// Support rails error element
.field_with_errors
@extend .has-error

View file

@ -4,6 +4,13 @@ html
-webkit-text-size-adjust: 100%
-ms-text-size-adjust: 100%
body > .container
background: #fff
padding: 16px 30px 30px 30px
margin-top: 0px
border-radius: 3px
min-height: 600px
h1
font-size: 26px
margin-bottom: 16px
@ -98,15 +105,6 @@ sub
padding-right: 20px
border-top: 0px
.container
border-radius: 3px
body > .container
background: #F8F8F8
margin-bottom: 50px
min-height: 600px
padding: 30px 30px 56px 30px
.container.version
background: transparent
margin-top: -116px
@ -155,21 +153,6 @@ h4
margin-bottom: 16px
float: right
.navbar-brand
line-height: 12px
padding-top: 20px
padding-bottom: 5px
.navbar-brand small
display: block
font-size: 10px
.footer
color: #777
padding-top: 70px
padding-bottom: 10px
font-size: 10px
.domify
td
vertical-align: middle !important
@ -228,6 +211,9 @@ body.login
display: block
font-size: 10px
.navbar
margin-bottom: 0
.footer
color: #777
padding-top: 15px
@ -259,7 +245,9 @@ body.login
input
margin-bottom: 10px
// fix label position for medium screen
@media (min-width: 768px) and (max-width: 991px)
.form-horizontal .control-label
text-align: left
@media (min-width: 860px)
.control-label
text-align: right
margin-bottom: 0
padding-top: 7px

View file

@ -1,4 +1,4 @@
//= require 'shared/general-bootstrap'
//= require 'shared/general-manifest'
//= require 'registrar/registrar-bootstrap'
@import shared/fonts
@import shared/general

View file

@ -9,5 +9,10 @@ $font-family-serif: 'EtelkaLightProBold', Georgia, "Times New Roman", Times, ser
$font-size-h1: 26px
$navbar-default-link-active-color: #333
@import "bootstrap-sprockets"
@import "bootstrap"
@import 'bootstrap-sprockets'
@import 'bootstrap'
@import 'shared/general-bootstrap'
// Support rails error element
.field_with_errors
@extend .has-error

View file

@ -13,9 +13,10 @@ body > .container
h1, h2, h3, h4
margin-bottom: 0px !important
hr
margin-top: 10px !important
margin-bottom: 10px !important
// Commented out, default 20px is needed on forms
// hr
// margin-top: 10px !important
// margin-bottom: 10px !important
.navbar li
font-weight: bold

View file

@ -62,3 +62,6 @@
.text-justify-lg
text-align: justify
.required:after
content: "*"
margin: 0 0 0 1px

View file

@ -39,3 +39,15 @@
.no-border
border: 0px !important
.errors
color: #A94442
// vertical allign with other fields
.typeahead
margin-left: 5px
// fix medium screen size label position
@media (min-width: 768px) and (max-width: 991px)
.control-label
text-align: left !important

View file

@ -10,11 +10,11 @@ class Epp::DomainsController < EppController
case @hosts
when 'del'
@nameservers = @domain.delegated_nameservers
@nameservers = @domain.delegated_nameservers.sort
when 'sub'
@nameservers = @domain.subordinate_nameservers
@nameservers = @domain.subordinate_nameservers.sort
when 'all'
@nameservers = @domain.nameservers
@nameservers = @domain.nameservers.sort
end
render_epp_response '/epp/domains/info'

View file

@ -1,14 +1,10 @@
class AdminUser < User
# TODO: Foreign user will get email with activation link,email,temp-password.
# After activisation, system should require to change temp password.
# TODO: Estonian id validation
validates :username, :password, :country_code, presence: true
validates :username, :password, :country_code, :roles, presence: true
validates :identity_code, uniqueness: true, allow_blank: true
validates :identity_code, presence: true, if: -> { country_code == 'EE' }
validates :email, presence: true, if: -> { country_code != 'EE' }
validates :email, presence: true
validate :validate_identity_code
validate :validate_identity_code, if: -> { country_code == 'EE' }
belongs_to :country_deprecated, foreign_key: :country_id
ROLES = %w(user customer_service admin)

View file

@ -0,0 +1,9 @@
module DisableHtml5Validation
extend ActiveSupport::Concern
class_methods do
def auto_html5_validation
false
end
end
end

View file

@ -2,6 +2,7 @@ class Deposit
include ActiveModel::Validations
include ActiveModel::Conversion
extend ActiveModel::Naming
include DisableHtml5Validation
attr_accessor :amount, :description, :registrar

View file

@ -1,6 +1,7 @@
module Depp
class Contact
include ActiveModel::Model
include DisableHtml5Validation
attr_accessor :id, :name, :email, :phone, :org_name,
:ident, :ident_type, :ident_country_code,

View file

@ -2,6 +2,7 @@ module Depp
class Domain
include ActiveModel::Conversion
extend ActiveModel::Naming
include DisableHtml5Validation
attr_accessor :name, :current_user, :epp_xml

View file

@ -1,5 +1,6 @@
module Depp
class Keyrelay
include DisableHtml5Validation
attr_accessor :current_user, :epp_xml
def initialize(args = {})

View file

@ -3,6 +3,7 @@ module Depp
include ActiveModel::Validations
include ActiveModel::Conversion
extend ActiveModel::Naming
include DisableHtml5Validation
attr_accessor :tag, :password, :pki

View file

@ -53,7 +53,7 @@ class DomainTransfer < ActiveRecord::Base
def notify_losing_registrar
transfer_from.messages.create!(
body: I18n.t('domain_transfer_was_approved', contacts: domain.contacts.pluck(:code)),
body: I18n.t('domain_transfer_was_approved', contacts: domain.contacts.pluck(:code).sort),
attached_obj_id: id,
attached_obj_type: self.class.to_s
)

View file

@ -14,7 +14,7 @@ class Registrar < ActiveRecord::Base
validates :name, :reg_no, :reference_no, uniqueness: true
validate :set_code, if: :new_record?
before_create :generate_iso_11649_reference_no
before_validation :generate_iso_11649_reference_no
def generate_iso_11649_reference_no
return if reference_no.present?

View file

@ -1,35 +1,43 @@
= form_for([:admin, @admin_user]) do |f|
- if @admin_user.errors.any?
- @admin_user.errors.each do |attr, err|
= err
%br
- if @admin_user.errors.any?
%hr
= form_for([:admin, @admin_user], html: { class: 'form-horizontal' }) do |f|
= render 'shared/full_errors', object: @admin_user
.row
.col-md-6
.col-md-8
.form-group
= f.label :username
= f.text_field(:username, class: 'form-control')
.col-md-4.control-label
= f.label :username
.col-md-8
= f.text_field(:username, class: 'form-control')
.form-group
= f.label :password
= f.text_field(:password, class: 'form-control')
.col-md-4.control-label
= f.label :password
.col-md-8
= f.text_field(:password, class: 'form-control')
%hr
.form-group
= f.label :country_code
= f.text_field :country_code, class: 'form-control'
.col-md-4.control-label
= f.label :identity_code
.col-md-8
= f.text_field(:identity_code, class: 'form-control')
.form-group
= f.label :identity_code
= f.text_field(:identity_code, class: 'form-control')
.col-md-6
.col-md-4.control-label
= f.label :email
.col-md-8
= f.text_field(:email, class: 'form-control', email: true)
.form-group
= f.label :email
= f.text_field(:email, class: 'form-control')
.col-md-4.control-label
= f.label :country_code, t(:country)
.col-md-8
= f.select(:country_code,
SortedCountry.all_options(f.object.country_code), {}, class: 'form-control')
%hr
.form-group
= f.label :role
= select_tag 'admin_user[roles][]', options_for_select(AdminUser::ROLES.map {|x| [t(x), x] }, @admin_user.roles.try(:first)), class: 'form-control selectize'
.col-md-4.control-label
= f.label :role
.col-md-8
= select_tag 'admin_user[roles][]', options_for_select(AdminUser::ROLES.map {|x| [t(x), x] }, @admin_user.roles.try(:first)), class: 'form-control selectize'
%hr
.row
.col-md-12.text-right
= button_tag(t('save'), class: 'btn btn-primary')
.col-md-8.text-right
= button_tag(t(:save), class: 'btn btn-primary')

View file

@ -1,38 +1,42 @@
= form_for([:admin, @api_user], multipart: true) do |f|
- if @api_user.errors.any?
- @api_user.errors.each do |attr, err|
= err
%br
- if @api_user.errors.any?
%hr
= form_for([:admin, @api_user], multipart: true, html: {class: 'form-horizontal'}) do |f|
= render 'shared/full_errors', object: @api_user
.row
.col-md-12
.col-md-8
.form-group
= f.label :username
= f.text_field(:username, class: 'form-control')
.col-md-4.control-label
= f.label :username
.col-md-7
= f.text_field(:username, class: 'form-control')
.form-group
= f.label :password
= f.text_field(:password, class: 'form-control')
.col-md-4.control-label
= f.label :password
.col-md-7
= f.text_field(:password, class: 'form-control')
.form-group
= f.label :identity_code
= f.text_field(:identity_code, class: 'form-control')
.col-md-4.control-label
= f.label :identity_code
.col-md-7
= f.text_field(:identity_code, class: 'form-control')
.form-group
.form-group.has-feedback.js-typeahead-container
= f.label :registrar_typeahead, t('registrar')
= f.text_field(:registrar_typeahead, class: 'form-control js-registrar-typeahead', placeholder: t('registrar'), autocomplete: 'off')
%span.glyphicon.glyphicon-ok.form-control-feedback.js-typeahead-ok.hidden
%span.glyphicon.glyphicon-remove.form-control-feedback.js-typeahead-remove
= f.hidden_field(:registrar_id, class: 'js-registrar-id')
.form-group
.checkbox
%label{for: 'api_user_active'}
= f.check_box(:active)
= t('active')
.col-md-4.control-label
= f.label :registrar_typeahead, t(:registrar), class: 'required'
.col-md-7
= f.text_field(:registrar_typeahead,
class: 'form-control js-registrar-typeahead typeahead required',
placeholder: t(:registrar), autocomplete: 'off')
%span.glyphicon.glyphicon-ok.form-control-feedback.js-typeahead-ok.hidden
%span.glyphicon.glyphicon-remove.form-control-feedback.js-typeahead-remove
= f.hidden_field(:registrar_id, class: 'js-registrar-id')
.checkbox
%label{for: 'api_user_active'}
= f.check_box(:active)
= t(:active)
%hr
.row
.col-md-12.text-right
= button_tag(t('save'), class: 'btn btn-primary')
.col-md-8.text-right
= button_tag(t(:save), class: 'btn btn-primary')
:coffee
Autocomplete.bindAdminRegistrarSearch();

View file

@ -6,11 +6,13 @@
= render 'shared/full_errors', object: @bank_statement
.row
.col-md-12.text-left
.col-md-8
.form-group
= f.label :th6_file
= f.file_field :th6_file
.col-md-4.control-label
= f.label :th6_file
.col-md-8
= f.file_field :th6_file
%hr
.row
.col-md-12.text-right
.col-md-8.text-right
= button_tag(t(:save), class: 'btn btn-primary')

View file

@ -1,20 +1,17 @@
= render 'shared/title', name: t(:upload_csr)
= form_for([:admin, @api_user, @certificate], multipart: true) do |f|
- if @certificate.errors.any?
- @certificate.errors.each do |attr, err|
= err
%br
- if @certificate.errors.any?
%hr
= render 'shared/full_errors', object: f.object
.row
.col-md-12.text-left
.col-md-8
.form-group
= f.label :csr, t(:certificate_signing_req)
= f.file_field :csr
.col-md-4.control-label= f.label :username
= f.label :csr, t(:certificate_signing_req)
.col-md-8
= f.file_field :csr
%hr
.row
.col-md-12.text-right
.col-md-8.text-right
= button_tag(t(:save), class: 'btn btn-primary')

View file

@ -1,10 +1,5 @@
= form_for([:admin, @registrar]) do |f|
- if @registrar.errors.any?
- @registrar.errors.full_messages.each do |err|
= err
%br
- if @registrar.errors.any?
%hr
= form_for([:admin, @registrar], html: {class: 'form-horizontal'}) do |f|
= render 'shared/full_errors', object: @registrar
.row
.col-md-8
@ -13,48 +8,68 @@
.pull-left= t(:general)
.panel-body
.form-group
.col-md-3.control-label
.col-md-4.control-label
= f.label :name
.col-md-7
= f.text_field(:name, class: 'form-control')
.form-group
= f.label :reg_no
= f.text_field(:reg_no, class: 'form-control')
/ EIS does not want VAT
/ .form-group
/ = f.label :vat_no
/ = f.text_field(:vat_no, class: 'form-control')
.form-group
= f.label :email
= f.text_field(:email, class: 'form-control')
.form-group
= f.label :phone
= f.text_field(:phone, class: 'form-control')
.form-group
= f.label :billing_email
= f.text_field(:billing_email, class: 'form-control')
.form-group
.col-md-4.control-label
= f.label :reg_no
.col-md-7
= f.text_field(:reg_no, class: 'form-control')
.form-group
.col-md-4.control-label
= f.label :vat_no
.col-md-7
= f.text_field(:vat_no, class: 'form-control')
.form-group
.col-md-4.control-label
= f.label :phone
.col-md-7
= f.text_field(:phone, class: 'form-control')
.form-group
.col-md-4.control-label
= f.label :email
.col-md-7
= f.text_field(:email, class: 'form-control', email: true)
.form-group
.col-md-4.control-label
= f.label :billing_email
.col-md-7
= f.text_field(:billing_email, class: 'form-control', email: true)
.row
.col-md-8
.form-group
= f.label :street
= f.text_field(:street, class: 'form-control')
.form-group
= f.label :city
= f.text_field(:city, class: 'form-control')
.form-group
= f.label :state
= f.text_field(:state, class: 'form-control')
.form-group
= f.label :zip
= f.text_field(:zip, class: 'form-control')
.form-group
= f.label :country_code
= f.text_field :country_code, class: 'form-control'
/ EIS does not want Billing Address
/ .form-group
/ = f.label :billing_address
/ = f.text_field(:billing_address, class: 'form-control')
/ %p.help-block= t('address_help')
.panel.panel-default
.panel-heading.clearfix
.pull-left= t(:address)
.panel-body
.form-group
.col-md-4.control-label
= f.label :street
.col-md-7
= f.text_field(:street, class: 'form-control')
.form-group
.col-md-4.control-label
= f.label :city
.col-md-7
= f.text_field(:city, class: 'form-control')
.form-group
.col-md-4.control-label
= f.label :state
.col-md-7
= f.text_field(:state, class: 'form-control')
.form-group
.col-md-4.control-label
= f.label :zip
.col-md-7
= f.text_field(:zip, class: 'form-control')
.form-group
.col-md-4.control-label
= f.label :country_code, t(:country)
.col-md-7
= f.select(:country_code,
SortedCountry.all_options(f.object.country_code), {}, class: 'form-control')
%hr
.row
.col-md-8.text-right

View file

@ -2,12 +2,12 @@
= form_tag [:admin, :settings] do
.row
.col-md-12
.col-md-8
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
%tr
%th{class: 'col-xs-9'}
%th{class: 'col-xs-4'}
= t(:setting)
%th{class: 'col-xs-2'}
= t(:value)
@ -21,6 +21,7 @@
= check_box_tag("[settings][#{x.var}]", true, x.value)
- else
%td= text_field_tag("[settings][#{x.var}]", x.value)
%hr
.row
.col-md-12.text-right
.col-md-8.text-right
%button.btn.btn-primary=t(:save)

View file

@ -2,49 +2,52 @@
= form_for [:admin, @zonefile_setting], html: { class: 'form-horizontal' } do |f|
.row
.col-md-12
.col-md-8
#domain-statuses
.errors
- if f.object.errors.any?
- f.object.errors.full_messages.each do |x|
= x
%br
- if f.object.errors.any?
%hr
= render 'shared/full_errors', object: f.object
.form-group
= f.label :origin, class: 'col-md-2 control-label'
.col-md-10
.col-md-4.control-label
= f.label :origin
.col-md-8
= f.text_field :origin, class: 'form-control', disabled: true
.form-group
= f.label :ttl, class: 'col-md-2 control-label'
.col-md-10
.col-md-4.control-label
= f.label :ttl
.col-md-8
= f.text_field :ttl, class: 'form-control'
.form-group
= f.label :refresh, class: 'col-md-2 control-label'
.col-md-10
.col-md-4.control-label
= f.label :refresh
.col-md-8
= f.text_field :refresh, class: 'form-control'
.form-group
= f.label :retry, class: 'col-md-2 control-label'
.col-md-10
.col-md-4.control-label
= f.label :retry
.col-md-8
= f.text_field :retry, class: 'form-control'
.form-group
= f.label :expire, class: 'col-md-2 control-label'
.col-md-10
.col-md-4.control-label
= f.label :expire
.col-md-8
= f.text_field :expire, class: 'form-control'
.form-group
= f.label :minimum_ttl, class: 'col-md-2 control-label'
.col-md-10
.col-md-4.control-label
= f.label :minimum_ttl
.col-md-8
= f.text_field :minimum_ttl, class: 'form-control'
.form-group
= f.label :email, class: 'col-md-2 control-label'
.col-md-10
= f.text_field :email, class: 'form-control'
.col-md-4.control-label
= f.label :email
.col-md-8
= f.text_field :email, class: 'form-control', email: true
%hr
.row
.col-md-12.text-right
.col-md-8.text-right
%button.btn.btn-primary= t(:save)

View file

@ -63,7 +63,7 @@ xml.epp_head do
xml.extension do
xml.tag!('secDNS:infData', 'xmlns:secDNS' => 'urn:ietf:params:xml:ns:secDNS-1.1') do
@domain.dnskeys.each do |key|
@domain.dnskeys.sort.each do |key|
xml.tag!('secDNS:dsData') do
xml.tag!('secDNS:keyTag', key.ds_key_tag)
xml.tag!('secDNS:alg', key.ds_alg)

View file

@ -11,7 +11,7 @@
%title= t(:admin_head_title)
= csrf_meta_tags
= stylesheet_link_tag 'admin-manifest', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
= javascript_include_tag 'admin-manifest', 'data-turbolinks-track' => true
= favicon_link_tag 'favicon.ico'
%body{:style => env_style}
/ Static navbar

View file

@ -12,7 +12,7 @@
%title= t(:registrar_head_title)
= csrf_meta_tags
= stylesheet_link_tag 'registrar-manifest', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
= javascript_include_tag 'registrar-manifest', 'data-turbolinks-track' => true
= favicon_link_tag 'favicon.ico'
%body
/ Fixed navbar

View file

@ -18,6 +18,6 @@
.row
.col-md-8.text-right
- if @contact.persisted?
= button_tag(t(:save), class: 'btn btn-primary')
= button_tag t(:save), class: 'btn btn-primary'
- else
= button_tag(t(:create), class: 'btn btn-primary')
= button_tag t(:create), class: 'btn btn-primary'

View file

@ -1,5 +1,5 @@
= render 'shared/title', name: "#{t(:edit)}: #{@contact.name}"
= form_for(@contact, url: registrar_contact_path(@contact),
= form_for(@contact, url: registrar_contact_path(@contact),
html: {class: 'form-horizontal js-contact-form'}) do |f|
- render 'form', f: f

View file

@ -6,19 +6,19 @@
.col-md-3.control-label
= f.label :street, t(:street) + '*'
.col-md-7
= f.text_field :street, class: 'form-control'
= 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'
= 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'
= f.text_field :zip, class: 'form-control', required: true
.form-group
.col-md-3.control-label
@ -30,4 +30,5 @@
.col-md-3.control-label
= f.label :country_code, t(:country) + '*'
.col-md-7
= f.select(:country_code, SortedCountry.all_options(f.object.country_code))
= f.select :country_code,
SortedCountry.all_options(f.object.country_code)

View file

@ -7,20 +7,20 @@
= f.label :ident_country_code, t(:country) + '*'
.col-md-7
= f.select(:ident_country_code, SortedCountry.all_options(f.object.ident_country_code), {},
class: 'js-ident-country-code')
class: 'js-ident-country-code', required: true)
.form-group
.col-md-3.control-label
= f.label :ident_type, t(:type) + '*'
.col-md-7
= f.select(:ident_type, Depp::Contact::SELECTION_TYPES, { selected: f.object.ident_type },
class: 'js-ident-type')
class: 'js-ident-type', required: true)
.form-group
.col-md-3.control-label
= f.label :ident, t(:ident) + '*'
.col-md-7
= f.text_field :ident, class: 'form-control'
= 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)
@ -33,18 +33,19 @@
.col-md-3.control-label
= f.label :name, t(:name) + '*'
.col-md-7
= f.text_field :name, class: 'form-control'
= 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.text_field :email, class: 'form-control'
= f.text_field :email, class: 'form-control', required: true, email: true
.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')
= f.text_field :phone, class: 'form-control',
placeholder: '+372.12323344', required: true

View file

@ -2,21 +2,27 @@
= 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) do |f|
= form_for([:registrar, @deposit], method: :post, html: { class: 'form-horizontal' }) do |f|
= render 'shared/full_errors', object: @deposit
.row
.col-md-4.col-md-offset-4
= render 'shared/full_errors', object: @deposit
.col-md-8
.form-group
= f.label :amount
.input-group
= f.text_field :amount, class: 'form-control'
.input-group-addon
EUR
.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
= f.label :description
= f.text_area :description, class: 'form-control'
.col-md-4.control-label
= f.label :description
.col-md-7
= f.text_area :description, class: 'form-control'
.row
.col-md-12.text-right
= button_tag(t(:add), class: 'btn btn-primary')
%hr
.row
.col-md-8.text-right
= button_tag(t(:add), class: 'btn btn-primary')

View file

@ -13,9 +13,10 @@
.pull-left= t(:legal_document)
.panel-body
.form-group
= label_tag 'domain[legal_document]', t('legal_document'),class: 'col-md-3 control-label'
.col-md-9
= file_field_tag 'domain[legal_document]'
.col-md-3.control-label
= label_tag 'domain[legal_document]', t('legal_document'), class: 'required'
.col-md-7
= file_field_tag 'domain[legal_document]', required: true
.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

View file

@ -7,10 +7,10 @@
= t(:legal_document)
.panel-body
.form-group
.col-md-3.control-label
= label_tag 'domain[legal_document]', t('legal_document')
.col-md-7
= file_field_tag 'domain[legal_document]'
.col-md-4.control-label
= label_tag 'domain[legal_document]', t('legal_document'), class: 'required'
.col-md-6
= file_field_tag 'domain[legal_document]', required: true
= hidden_field_tag 'domain[name]', params[:domain_name]
%hr
.row

View file

@ -2,20 +2,23 @@
- @domain_params['contacts_attributes'].each do |k, v|
.panel.panel-default
.panel-heading.clearfix
.pull-left= t('contact')
.pull-left= t(:contact)
.pull-right
= link_to(t('add_another'), '#', class: 'btn btn-primary btn-xs add-domain-contact')
= link_to(t('delete'), '#', class: 'btn btn-danger btn-xs destroy')
= link_to(t(:add_another), '#', class: 'btn btn-primary btn-xs add-domain-contact')
= link_to(t(:delete), '#', class: 'btn btn-danger btn-xs destroy')
.panel-body
.form-group
= label_tag "domain_contacts_attributes_#{k}_type", t('contact_type'), class: 'col-md-3 control-label'
.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'}
.form-group
= label_tag "domain_contacts_attributes_#{k}_code", t('contact_code'), class: 'col-md-3 control-label'
.col-md-3.control-label
= label_tag "domain_contacts_attributes_#{k}_code", t(:contact_code), class: 'required'
.col-md-7.has-feedback
= text_field_tag("domain[contacts_attributes][#{k}][code]", v['code'], class: 'form-control', placeholder: t('contact_code'), autocomplete: 'off')
= text_field_tag("domain[contacts_attributes][#{k}][code]", v['code'],
class: 'form-control', placeholder: t(:contact_code), autocomplete: 'off', required: true)
:coffee
$("#domain-contacts").nestedAttributes
bindAddTo: $(".add-domain-contact")

View file

@ -2,51 +2,71 @@
- @domain_params['dnskeys_attributes'].each do |k, v|
.panel.panel-default
.panel-heading.clearfix
.pull-left= t('dnskey')
.pull-left= t(:dnskey)
.pull-right
= link_to(t('add_another'), '#', class: 'btn btn-primary btn-xs add-dnskey')
= link_to(t('delete'), '#', class: 'btn btn-danger btn-xs destroy')
= link_to(t(:add_another), '#', class: 'btn btn-primary btn-xs add-dnskey')
= link_to(t(:delete), '#', class: 'btn btn-danger btn-xs destroy')
.panel-body
- if ENV['show_ds_data_fields'] == 'true'
.form-group
= label_tag "domain_dnskeys_attributes_#{k}_ds_key_tag", t('ds_key_tag'), class: 'col-md-3 control-label'
.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'}
= text_field_tag "domain[dnskeys_attributes][#{k}][ds_key_tag]", v['ds_key_tag'],
{class: 'form-control'}
.form-group
= label_tag "domain_dnskeys_attributes_#{k}_ds_alg", t('ds_algorithm'), class: 'col-md-3 control-label'
.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'}
= select_tag "domain[dnskeys_attributes][#{k}][ds_alg]",
options_for_select(Depp::Dnskey::ALGORITHMS, v['ds_alg']), {class: 'form-control'}
.form-group
= label_tag "domain_dnskeys_attributes_#{k}_ds_digest_type", t('ds_digest_type'), class: 'col-md-2 control-label'
.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'}
= 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
= label_tag "domain_dnskeys_attributes_#{k}_ds_digest", t('ds_digest'), class: 'col-md-3 control-label'
.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'}
= text_field_tag "domain[dnskeys_attributes][#{k}][ds_digest]", v['ds_digest'],
{class: 'form-control'}
.form-group
= label_tag "domain_dnskeys_attributes_#{k}_flags", t('flags'), class: 'col-md-3 control-label'
.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'}
= select_tag "domain[dnskeys_attributes][#{k}][flags]",
options_for_select(Depp::Dnskey::FLAGS, v['flags']),
{ class: 'form-control' }
.form-group
= label_tag "domain_dnskeys_attributes_#{k}_protocol", t('protocol'), class: 'col-md-3 control-label'
.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'}
= select_tag "domain[dnskeys_attributes][#{k}][protocol]",
options_for_select(Depp::Dnskey::PROTOCOLS, v['protocol']),
{ class: 'form-control' }
.form-group
= label_tag "domain_dnskeys_attributes_#{k}_alg", t('alg'), class: 'col-md-3 control-label'
.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'}
= select_tag "domain[dnskeys_attributes][#{k}][alg]",
options_for_select(Depp::Dnskey::ALGORITHMS, v['alg']), { class: 'form-control' }
.form-group
= label_tag "domain_dnskeys_attributes_#{k}_public_key", t('public_key'), class: 'col-md-3 control-label'
.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'
= text_field_tag "domain[dnskeys_attributes][#{k}][public_key]", v['public_key'],
class: 'form-control'
:coffee
$("#dnskeys").nestedAttributes
bindAddTo: $(".add-dnskey")

View file

@ -1,19 +1,24 @@
.general-tab.panel.panel-default
.panel-body
.form-group
= label_tag :domain_name, t('name'), class: 'col-md-3 control-label'
.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)
= text_field_tag('domain[name]', @domain_params[:name],
class: 'form-control', readonly: readonly, required: true)
- unless params[:domain_name]
.form-group
= label_tag :domain_period, t('period'), class: 'col-md-3 control-label'
.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
= label_tag :domain_registrant, t('registrant'), class: 'col-md-3 control-label'
.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: 'form-control', placeholder: t('contact_code'), autocomplete: 'off')
= text_field_tag('domain[registrant]', @domain_params[:registrant],
class: 'form-control', placeholder: t(:contact_code), autocomplete: 'off', required: true)

View file

@ -2,23 +2,29 @@
- @domain_params['nameservers_attributes'].each do |k, v|
.panel.panel-default
.panel-heading.clearfix
.pull-left= t('nameserver')
.pull-left= t(:nameserver)
.pull-right
= link_to(t('add_another'), '#', class: 'btn btn-primary btn-xs add-nameserver')
= link_to(t('delete'), '#', class: 'btn btn-danger btn-xs destroy')
= link_to(t(:add_another), '#', class: 'btn btn-primary btn-xs add-nameserver')
= link_to(t(:delete), '#', class: 'btn btn-danger btn-xs destroy')
.panel-body
.form-group
= label_tag "domain_nameservers_attributes_#{k}_hostname", t('hostname'), class: 'col-md-3 control-label'
.col-md-3.control-label
= label_tag "domain_nameservers_attributes_#{k}_hostname", t(:hostname), class: 'required'
.col-md-7
= text_field_tag "domain[nameservers_attributes][#{k}][hostname]", v['hostname'], class: 'form-control'
= text_field_tag "domain[nameservers_attributes][#{k}][hostname]", v['hostname'],
class: 'form-control', required: true
.form-group
= label_tag "domain_nameservers_attributes_#{k}_ipv4", t('ipv4'), class: 'col-md-3 control-label'
.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'
= text_field_tag "domain[nameservers_attributes][#{k}][ipv4]", v['ipv4'],
class: 'form-control', ipv4: true
.form-group
= label_tag "domain_nameservers_attributes_#{k}_ipv6", t('ipv6'), class: 'col-md-3 control-label'
.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'
= text_field_tag "domain[nameservers_attributes][#{k}][ipv6]", v['ipv6'],
class: 'form-control', ipv6: true
:coffee
$("#nameservers").nestedAttributes
bindAddTo: $(".add-nameserver")

View file

@ -4,18 +4,27 @@
.col-md-8
= form_tag renew_registrar_domains_path, class: 'form-horizontal', method: :get do
.form-group
= label_tag :domain_name, t(:name), class: 'col-md-3 control-label'
.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'
= text_field_tag :domain_name, params[:domain_name],
class: 'form-control', placeholder: t('domain_name'), autocomplete: 'off', required: true
.form-group
= label_tag :cur_exp_date, t(:cur_exp_date), class: 'col-md-3 control-label'
.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'
= text_field_tag :cur_exp_date, params[:cur_exp_date],
class: 'form-control', placeholder: 'yyyy-mm-dd', autocomplete: 'off', required: true
.form-group
= label_tag :domain_period, t(:period), class: 'col-md-3 control-label'
.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-primary= t(:renew)

View file

@ -4,19 +4,24 @@
.col-md-8
= form_tag transfer_registrar_domains_path, class: 'form-horizontal', method: :post, multipart: true do
.form-group
= label_tag :domain_name, t('name'), class: 'col-md-3 control-label'
.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', autofocus: true
= text_field_tag :domain_name, params[:domain_name], class: 'form-control',
placeholder: t(:domain_name), autocomplete: 'off', autofocus: true, required: true
.form-group
= label_tag :password, t('password'), class: 'col-md-3 control-label'
.col-md-3.control-label
= label_tag :password, t(:password), class: 'required'
.col-md-7
= text_field_tag :password, params[:password], class: 'form-control', autocomplete: 'off'
= text_field_tag :password, params[:password],
class: 'form-control', autocomplete: 'off', required: true
.form-group
= label_tag 'legal_document', t('legal_document'),class: 'col-md-3 control-label'
.col-md-3.control-label
= label_tag 'legal_document', t(:legal_document), class: 'required'
.col-md-7
= file_field_tag 'legal_document'
= file_field_tag 'legal_document', required: true
.form-group
.col-md-10.text-right
%button.btn.btn-primary{ name: 'query' }= t('query')
%button.btn.btn-primary{ name: 'approve' }= t('approve')
%button.btn.btn-primary{ name: 'reject' }= t('reject')
%button.btn.btn-primary{ name: 'query' }= t(:query)
%button.btn.btn-primary{ name: 'approve' }= t(:approve)
%button.btn.btn-primary{ name: 'reject' }= t(:reject)

View file

@ -4,47 +4,65 @@
.col-md-8
= form_tag registrar_keyrelay_path, class: 'form-horizontal', method: :post, multipart: true do
.form-group
= label_tag :domain_name, t(:domain_name), class: 'col-md-3 control-label'
.col-md-3.control-label
= label_tag :domain_name, t(:domain_name), class: 'required'
.col-md-7
= text_field_tag :domain_name, params[:domain_name], class: 'form-control', autocomplete: 'off'
= text_field_tag :domain_name, params[:domain_name],
class: 'form-control', autocomplete: 'off', required: true
.form-group
= label_tag :password, t(:password), class: 'col-md-3 control-label'
.col-md-3.control-label
= label_tag :password, t(:password), class: 'required'
.col-md-7
= text_field_tag :password, params[:password], class: 'form-control', autocomplete: 'off'
= text_field_tag :password, params[:password],
class: 'form-control', autocomplete: 'off', required: true
.form-group
= label_tag :expiry_relative, t(:expiry_relative), class: 'col-md-3 control-label'
.col-md-3.control-label
= label_tag :expiry_relative, t(:expiry_relative), class: 'required'
.col-md-7
= text_field_tag :expiry_relative, params[:expiry_relative], class: 'form-control', autocomplete: 'off'
= text_field_tag :expiry_relative, params[:expiry_relative],
class: 'form-control', autocomplete: 'off', required: true
.form-group
= label_tag :expiry_absolute, t(:expiry_absolute), class: 'col-md-3 control-label'
.col-md-3.control-label
= label_tag :expiry_absolute, t(:expiry_absolute), class: 'required'
.col-md-7
= text_field_tag :expiry_absolute, params[:expiry_absolute], class: 'form-control', autocomplete: 'off'
= text_field_tag :expiry_absolute, params[:expiry_absolute],
class: 'form-control', autocomplete: 'off', required: true
.form-group
= label_tag :key_data_flags, t(:flag), class: 'col-md-3 control-label'
.col-md-3.control-label
= label_tag :key_data_flags, t(:flag), class: 'required'
.col-md-7
= select_tag :key_data_flags, options_for_select(Depp::Dnskey::FLAGS, params['key_data_flags']), {class: 'form-control'}
= select_tag :key_data_flags,
options_for_select(Depp::Dnskey::FLAGS, params['key_data_flags']), {class: 'form-control'}
.form-group
= label_tag :key_data_protocol, t(:protocol), class: 'col-md-3 control-label'
.col-md-3.control-label
= label_tag :key_data_protocol, t(:protocol), class: 'required'
.col-md-7
= select_tag :key_data_protocol, options_for_select(Depp::Dnskey::PROTOCOLS, params['key_data_protocol']), {class: 'form-control'}
= select_tag :key_data_protocol,
options_for_select(Depp::Dnskey::PROTOCOLS, params['key_data_protocol']),
{class: 'form-control'}
.form-group
= label_tag :key_data_alg, t(:algorithm), class: 'col-md-3 control-label'
.col-md-3.control-label
= label_tag :key_data_alg, t(:algorithm), class: 'required'
.col-md-7
= select_tag :key_data_alg, options_for_select(Depp::Dnskey::ALGORITHMS, params['key_data_alg']), {class: 'form-control'}
= select_tag :key_data_alg,
options_for_select(Depp::Dnskey::ALGORITHMS, params['key_data_alg']), {class: 'form-control'}
.form-group
= label_tag :key_data_public_key, t(:public_key), class: 'col-md-3 control-label'
.col-md-3.control-label
= label_tag :key_data_public_key, t(:public_key), class: 'required'
.col-md-7
= text_field_tag :key_data_public_key, params['key_data_public_key'], class: 'form-control'
= text_field_tag :key_data_public_key, params['key_data_public_key'],
class: 'form-control', required: true
.form-group
= label_tag :legal_document, t(:legal_document),class: 'col-md-3 control-label'
.col-md-3.control-label
= label_tag :legal_document, t(:legal_document)
.col-md-7
= file_field_tag :legal_document

View file

@ -2,8 +2,10 @@
.form-signin.col-md-4.center-block.text-center
%h2.form-signin-heading.text-center= t(:log_in_with_mid)
%hr
= form_for @user, url: registrar_mid_path, html: {class: 'form-signin'} do |f|
= f.text_field :phone, class: 'form-control', placeholder: t(:phone_no), autocomplete: 'off'
= form_for @user, url: registrar_mid_path, auto_html5_validation: false,
html: {class: 'form-signin'} do |f|
= f.text_field :phone, class: 'form-control',
placeholder: t(:phone_no), autocomplete: 'off', required: true
%button.btn.btn-lg.btn-primary.btn-block.js-login{:type => 'submit'}= t(:log_in)
- if ['development', 'alpha'].include?(Rails.env)

View file

@ -39,7 +39,8 @@ module Registry
# Precompile additional assets
config.assets.precompile += %w(*.svg *.eot *.woff *.ttf)
config.assets.precompile += %w(admin-manifest.css)
config.assets.precompile += %w(admin-manifest.css admin-manifest.js)
config.assets.precompile += %w(registrar-manifest.css registrar-manifest.js)
# Active Record used to suppresses errors raised within
# `after_rollback`/`after_commit` callbacks and only printed them to the logs.

View file

@ -0,0 +1,28 @@
class ActionView::Helpers::FormBuilder
alias_method :orig_label, :label
# add a 'required' CSS class to the field label if the field is required
# rubocop:disable Metrics/CyclomaticComplexity
# rubocop:disable Metrics/PerceivedComplexity
def label(method, content_or_options = nil, options = nil, &block)
if content_or_options && content_or_options.class == Hash
options = content_or_options
else
content = content_or_options
end
if object.class.respond_to?(:validators_on) &&
object.class.validators_on(method).map(&:class).include?(ActiveRecord::Validations::PresenceValidator)
if options.class != Hash
options = { class: 'required' }
else
options[:class] = ((options[:class] || "") + ' required').split(' ').uniq.join(' ')
end
end
orig_label(method, content, options || {}, &block)
end
# rubocop:enable Metrics/PerceivedComplexity
# rubocop:enable Metrics/CyclomaticComplexity
end

View file

@ -641,7 +641,7 @@ en:
m_id: 'M-ID'
destroyed: It was successfully deleted.
not_found: Not found
no_connection_to_registry: Connection issue to the registry server! Please try again later.
no_connection_to_registry: Connection issue to the registry EPP or REPP server! Please try again later.
domain_not_found: 'Domain was not found'
new_contact: 'New contact'
add_deposit: 'Add deposit'

View file

@ -741,7 +741,7 @@ describe 'EPP Domain', epp: true do
response[:msg].should == 'Command completed successfully; ack to dequeue'
msg_q = response[:parsed].css('msgQ')
msg_q.css('qDate').text.should_not be_blank
contacts = domain.contacts.pluck(:code)
contacts = domain.contacts.pluck(:code).sort
msg_q.css('msg').text.should == "Domain transfer was approved, associated contacts are: #{contacts}"
msg_q.first['id'].should_not be_blank
msg_q.first['count'].should == '1'
@ -1146,8 +1146,7 @@ describe 'EPP Domain', epp: true do
domain.registrant.code.should == original_oc_code
domain.registrant.registrar_id.should == @registrar2.id
original_contacts_codes.should == domain.contacts.pluck(:code)
original_contacts_codes.sort.should == domain.contacts.pluck(:code).sort
end
it 'should not creates transfer without password' do
@ -1446,27 +1445,55 @@ describe 'EPP Domain', epp: true do
response[:results][0][:result_code].should == '2302'
response[:results][0][:msg].should == 'Nameserver already exists on this domain [hostname]'
response[:results][0][:value].should == 'ns1.example.com'
if response[:results][0][:value] == 'ns1.example.com'
response[:results][0][:value].should == 'ns1.example.com'
else
response[:results][0][:value].should == 'ns2.example.com'
end
response[:results][1][:result_code].should == '2302'
response[:results][1][:msg].should == 'Nameserver already exists on this domain [hostname]'
response[:results][1][:value].should == 'ns2.example.com'
if response[:results][1][:value] == 'ns1.example.com'
response[:results][1][:value].should == 'ns1.example.com'
else
response[:results][1][:value].should == 'ns2.example.com'
end
response[:results][2][:result_code].should == '2302'
response[:results][2][:msg].should == 'Contact already exists on this domain [contact_code_cache]'
response[:results][2][:value].should == 'mak21'
response[:results][3][:msg].should == 'Status already exists on this domain [value]'
response[:results][3][:value].should == 'clientHold'
if response[:results][3][:value] == 'clientHold'
response[:results][3][:value].should == 'clientHold'
else
response[:results][3][:value].should == 'clientUpdateProhibited'
end
response[:results][4][:msg].should == 'Status already exists on this domain [value]'
response[:results][4][:value].should == 'clientUpdateProhibited'
if response[:results][4][:value] == 'clientHold'
response[:results][4][:value].should == 'clientHold'
else
response[:results][4][:value].should == 'clientUpdateProhibited'
end
response[:results][5][:msg].should == 'Public key already exists [public_key]'
response[:results][5][:value].should == '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f'
if response[:results][5][:value] == '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f'
response[:results][5][:value].should ==
'700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f'
else
response[:results][5][:value].should ==
'841936717ae427ace63c28d04918569a841936717ae427ace63c28d0'
end
response[:results][6][:msg].should == 'Public key already exists [public_key]'
response[:results][6][:value].should == '841936717ae427ace63c28d04918569a841936717ae427ace63c28d0'
if response[:results][6][:value] == '700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f'
response[:results][6][:value].should ==
'700b97b591ed27ec2590d19f06f88bba700b97b591ed27ec2590d19f'
else
response[:results][6][:value].should ==
'841936717ae427ace63c28d04918569a841936717ae427ace63c28d0'
end
d.domain_statuses.count.should == 2
end
@ -1773,9 +1800,9 @@ describe 'EPP Domain', epp: true do
admin_contacts_from_request.should == admin_contacts_existing
hosts_from_request = inf_data.css('hostName').map(&:text)
hosts_existing = domain.nameservers.pluck(:hostname)
hosts_existing = domain.nameservers.pluck(:hostname).sort
hosts_from_request.should == hosts_existing
hosts_from_request.sort.should == hosts_existing
ns1 = inf_data.css('hostAttr').last

View file

@ -13,7 +13,8 @@ describe AdminUser do
"Country code is missing",
"Email Email is missing",
"Password Password is missing",
"Username Username is missing"
"Username Username is missing",
"Roles is missing"
])
end