Skip to content

Commit

Permalink
Merge pull request internetee#250 from internetee/registry-240
Browse files Browse the repository at this point in the history
Registry 240
  • Loading branch information
vohmar authored Nov 17, 2016
2 parents a7b6bb1 + 064716b commit 0dcecbc
Show file tree
Hide file tree
Showing 37 changed files with 240 additions and 60 deletions.
6 changes: 0 additions & 6 deletions app/controllers/registrar/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,6 @@ def mid
endpoint = "#{ENV['sk_digi_doc_service_endpoint']}"
client = Digidoc::Client.new(endpoint)

if Rails.env.test? && phone == "123"
@user = ApiUser.find_by(identity_code: "14212128025")
sign_in(@user, event: :authentication)
return redirect_to registrar_root_url
end

# country_codes = {'+372' => 'EST'}
phone.gsub!('+372', '')
response = client.authenticate(
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/account_activities/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
.row
.col-md-12
.form-group
= f.label t(:registrar)
= f.label t(:registrar_name)
= f.select :account_registrar_id_in, Registrar.all.map { |x| [x, x.id] }, {}, class: 'form-control js-combobox', placeholder: t(:choose), multiple: true
.row
.col-md-6
Expand Down Expand Up @@ -56,7 +56,7 @@
%thead
%tr
%th{class: 'col-xs-2'}
= sort_link(@q, 'account_registrar_code', t(:registrar))
= sort_link(@q, 'account_registrar_code', t(:registrar_name))
%th{class: 'col-xs-3'}
= sort_link(@q, 'description')
%th{class: 'col-xs-2'}
Expand Down
12 changes: 6 additions & 6 deletions app/views/admin/api_users/_form.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- field_required = ''


= form_for([:admin, @api_user], multipart: true,
= form_for([:admin, @api_user], multipart: true,
html: {class: 'form-horizontal', autocomplete: 'off'}) do |f|
= render 'shared/full_errors', object: @api_user

Expand All @@ -32,11 +32,11 @@
.form-group
.form-group.has-feedback.js-typeahead-container
.col-md-4.control-label
= f.label :registrar_typeahead, t(:registrar), class: 'required'
= f.label :registrar_typeahead, t(:registrar_name), class: 'required'
.col-md-7
= f.text_field(:registrar_typeahead,
class: 'form-control js-registrar-typeahead typeahead required',
placeholder: t(:registrar), autocomplete: 'off')
= f.text_field(:registrar_typeahead,
class: 'form-control js-registrar-typeahead typeahead required',
placeholder: t(:registrar_name), 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')
Expand All @@ -45,7 +45,7 @@
.col-md-4.control-label
= f.label :role, class: 'required'
.col-md-7
= select_tag 'api_user[roles][]',
= select_tag 'api_user[roles][]',
options_for_select(ApiUser::ROLES.map {|x| [t(x), x] }, @api_user.roles.try(:first)),
class: 'form-control selectize'
.checkbox
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/api_users/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
%th{class: 'col-xs-2'}
= sort_link(@q, 'username')
%th{class: 'col-xs-2'}
= sort_link(@q, 'registrar_name', t(:registrar))
= sort_link(@q, 'registrar_name', t(:registrar_name))
%th{class: 'col-xs-2'}
= sort_link(@q, 'active', t(:active))
%tbody
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/api_users/show.haml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
%dt= t(:password)
%dd= @api_user.password

%dt= t(:registrar)
%dt= t(:registrar_name)
%dd= link_to(@api_user.registrar, admin_registrar_path(@api_user.registrar))

%dt= t(:role)
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/contact_versions/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
%th{class: 'col-xs-2'}
= t(:ident)
%th{class: 'col-xs-2'}
= t(:registrar)
= t(:registrar_name)
%th{class: 'col-xs-2'}
= t(:action)
%th{class: 'col-xs-2'}
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/contact_versions/show.haml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
%dd{class: changing_css_class(@version,"updated_at")}
= l(contact.updated_at, format: :short)

%dt= t(:registrar)
%dt= t(:registrar_name)
%dd{class: changing_css_class(@version,"registrar_id")}
- if contact.registrar.present?
= link_to(contact.registrar, admin_registrar_path(contact.registrar))
Expand Down Expand Up @@ -105,4 +105,4 @@
= l(vs.created_at, format: :short)
= vs.event
%span{:style => "padding-left:10px; position: absolute; bottom: 10px;"}
= paginate @versions, theme: :admin
= paginate @versions, theme: :admin
4 changes: 2 additions & 2 deletions app/views/admin/contacts/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
.row
.col-md-3
.form-group
= f.label t(:registrar)
= 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)
.col-md-3
.form-group
Expand Down Expand Up @@ -88,7 +88,7 @@
%th{class: 'col-xs-2'}
= sort_link(@q, 'email', t(:created_at))
%th{class: 'col-xs-2'}
= sort_link(@q, 'registrar_name', t(:registrar))
= sort_link(@q, 'registrar_name', t(:registrar_name))
%tbody
- @contacts.each do |contact|
%tr
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/contacts/partials/_domains.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
%thead
%tr
%th{class: 'col-xs-3'}=custom_sort_link t(:domain_name), :name
%th{class: 'col-xs-3'}=custom_sort_link t(:registrar), :registrar_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
Expand All @@ -27,4 +27,4 @@
%td= l(x.valid_to, format: :short)
%td= x.roles.join(", ")

= paginate domains, param_name: :domain_page
= paginate domains, param_name: :domain_page
2 changes: 1 addition & 1 deletion app/views/admin/contacts/partials/_general.haml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
by
= updator_link(@contact)

%dt= t(:registrar)
%dt= t(:registrar_name)
%dd
- if @contact.registrar.present?
= link_to(@contact.registrar, admin_registrar_path(@contact.registrar))
4 changes: 2 additions & 2 deletions app/views/admin/domain_versions/archive.haml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
= f.search_field :registrant, value: params[:q][:registrant], class: 'form-control', placeholder: t(:registrant)
.col-md-3
.form-group
= label_tag t(:registrar)
= label_tag t(:registrar_name)
= f.search_field :registrar, value: params[:q][:registrar], class: 'form-control', placeholder: t(:registrant)
.col-md-3
.form-group
Expand Down Expand Up @@ -48,7 +48,7 @@
%th{class: 'col-xs-2'}
= t(:registrant)
%th{class: 'col-xs-2'}
= t(:registrar)
= t(:registrar_name)
%th{class: 'col-xs-2'}
= t(:action)
%th{class: 'col-xs-2'}
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/domain_versions/show.haml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
%br

- if domain.registrar
%dt= t(:registrar)
%dt= t(:registrar_name)
%dd{class: changing_css_class(@version,"registrar_id")}
= link_to admin_registrar_path(domain.registrar), target: "registrar_#{domain.registrar.id}" do
= domain.registrar.name
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/domains/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
.row
.col-md-6
.form-group
= f.label t(:registrar)
= 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)
.col-md-3
.form-group
Expand Down Expand Up @@ -63,7 +63,7 @@
%th{class: 'col-xs-2'}
= sort_link(@q, 'valid_to', t(:valid_to))
%th{class: 'col-xs-2'}
= sort_link(@q, 'registrar_name', t(:registrar))
= sort_link(@q, 'registrar_name', t(:registrar_name))
%tbody
- @domains.each do |x|
%tr
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/domains/partials/_general.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
%dt= t(:registered_at)
%dd= l(@domain.registered_at)

%dt= t(:registrar)
%dt= t(:registrar_name)
%dd= link_to(@domain.registrar, admin_registrar_path(@domain.registrar))

%dt= t(:authinfo_pw)
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/domains/versions.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
%th{class: 'col-xs-2'}= t(:tech)
%th{class: 'col-xs-2'}= t(:nameservers)
%th{class: 'col-xs-2'}= t(:dnskeys)
%th{class: 'col-xs-2'}= t(:registrar)
%th{class: 'col-xs-2'}= t(:registrar_name)

%tbody
-#- if @pending_domain.present?
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/epp_logs/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
.col-md-3
.form-group
= f.label :registrar
= f.search_field :api_user_registrar_cont, class: 'form-control', placeholder: t(:registrar), autocomplete: 'off'
= f.search_field :api_user_registrar_cont, class: 'form-control', placeholder: t(:registrar_name), autocomplete: 'off'
.col-md-3
.form-group
= f.label t(:created_after)
Expand Down Expand Up @@ -55,7 +55,7 @@
%th{class: 'col-xs-2'}= t(:request_object)
%th{class: 'col-xs-2'}= t(:request_successful)
%th{class: 'col-xs-2'}= t(:api_user)
%th{class: 'col-xs-2'}= t(:registrar)
%th{class: 'col-xs-2'}= t(:registrar_name)
%th{class: 'col-xs-2'}
= sort_link(@q, 'created_at')
%tbody
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/epp_logs/show.haml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
%dt= t(:api_user)
%dd= @epp_log.api_user_name

%dt= t(:registrar)
%dt= t(:registrar_name)
%dd= @epp_log.api_user_registrar

%dt= t(:ip)
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/repp_logs/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
.col-md-3
.form-group
= f.label :registrar
= f.search_field :api_user_registrar_cont, class: 'form-control', placeholder: t(:registrar), autocomplete: 'off'
= f.search_field :api_user_registrar_cont, class: 'form-control', placeholder: t(:registrar_name), autocomplete: 'off'
.col-md-3
.form-group
= f.label t(:created_after)
Expand All @@ -52,7 +52,7 @@
%th{class: 'col-xs-2'}= t(:request_method)
%th{class: 'col-xs-2'}= t(:response_code)
%th{class: 'col-xs-2'}= t(:api_user)
%th{class: 'col-xs-2'}= t(:registrar)
%th{class: 'col-xs-2'}= t(:registrar_name)
%th{class: 'col-xs-2'}
= sort_link(@q, 'created_at')
%tbody
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/repp_logs/show.haml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
%dt= t(:api_user)
%dd= @repp_log.api_user_name

%dt= t(:registrar)
%dt= t(:registrar_name)
%dd= @repp_log.api_user_registrar

%dt= t(:ip)
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/white_ips/show.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
%h3.panel-title= t(:general)
.panel-body
%dl.dl-horizontal
%dt= t(:registrar)
%dt= t(:registrar_name)
%dd= link_to(@registrar, [:admin, @registrar])

%dt= t(:ipv4)
Expand Down
4 changes: 2 additions & 2 deletions app/views/registrant/contacts/partials/_domains.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
%thead
%tr
%th{class: 'col-xs-3'}=custom_sort_link t(:domain_name), :name
%th{class: 'col-xs-3'}=custom_sort_link t(:registrar), :registrar_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'}=custom_sort_link t(:roles), :roles
%tbody
Expand All @@ -27,4 +27,4 @@
%td= l(x.valid_to, format: :short)
%td= x.roles.join(", ")

= paginate domains, param_name: :domain_page
= paginate domains, param_name: :domain_page
2 changes: 1 addition & 1 deletion app/views/registrant/contacts/partials/_general.haml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
by
= @contact.name

%dt= t(:registrar)
%dt= t(:registrar_name)
%dd
- if @contact.registrar.present?
= link_to(@contact.registrar, registrant_registrar_path(@contact.registrar))
2 changes: 1 addition & 1 deletion app/views/registrant/domains/download_list.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
%th{class: 'col-xs-2'}
=t(:valid_to)
%th{class: 'col-xs-2'}
=t(:registrar)
=t(:registrar_name)
%tbody
- @domains.result.each do |x|
%tr
Expand Down
2 changes: 1 addition & 1 deletion app/views/registrant/domains/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
%th{class: 'col-xs-2'}
= sort_link(@q, 'valid_to', t(:valid_to))
%th{class: 'col-xs-2'}
= sort_link(@q, 'registrar_name', t(:registrar))
= sort_link(@q, 'registrar_name', t(:registrar_name))
%tbody
- @domains.each do |x|
%tr
Expand Down
2 changes: 1 addition & 1 deletion app/views/registrant/domains/partials/_general.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
%dt= t(:registered_at)
%dd= l(@domain.registered_at)

%dt= t(:registrar)
%dt= t(:registrar_name)
%dd= link_to(@domain.registrar, registrant_registrar_path(@domain.registrar))

%dt= t(:authinfo_pw)
Expand Down
2 changes: 1 addition & 1 deletion app/views/registrar/contacts/download_list.haml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
%th{class: 'col-xs-2'}
=t(:created_at)
%th{class: 'col-xs-2'}
=t(:registrar)
=t(:registrar_name)
%tbody
- @contacts.each do |contact|
%tr
Expand Down
4 changes: 2 additions & 2 deletions app/views/registrar/contacts/index.haml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
.row
.col-md-3
.form-group
= f.label t(:registrar)
= 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)
.col-md-3
.form-group
Expand Down Expand Up @@ -97,7 +97,7 @@
%th{class: 'col-xs-2'}
= sort_link(@q, 'email', t(:created_at))
%th{class: 'col-xs-2'}
= sort_link(@q, 'registrar_name', t(:registrar))
= sort_link(@q, 'registrar_name', t(:registrar_name))
%th{class: 'col-xs-2'}= t(:actions)
%tbody
- @contacts.each do |contact|
Expand Down
4 changes: 2 additions & 2 deletions app/views/registrar/contacts/partials/_domains.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
%thead
%tr
%th{class: 'col-xs-3'}=custom_sort_link t(:domain_name), :name
%th{class: 'col-xs-3'}=custom_sort_link t(:registrar), :registrar_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
Expand All @@ -27,4 +27,4 @@
%td= l(x.valid_to, format: :short)
%td= x.roles.join(", ")

= paginate domains, param_name: :domain_page
= paginate domains, param_name: :domain_page
2 changes: 1 addition & 1 deletion app/views/registrar/domains/partials/_general.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%dd= @data.css('pw').text.present? ? @data.css('pw').text : t('hidden')

- if @data.css('pw').text.blank?
%dt= t(:registrar)
%dt= t(:registrar_name)
%dd= @data.css('clID').text

- registrant = Contact.find_by_code(@data.css('registrant').text)
Expand Down
6 changes: 3 additions & 3 deletions app/views/registrar/sessions/login.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
- error_class = f.object.errors.any? ? 'has-error' : ''
%div{class: error_class}
= f.text_field :tag, class: 'form-control', placeholder: t(:username), required: true
= f.password_field :password, class: 'form-control',
= f.password_field :password, class: 'form-control',
autocomplete: 'off', placeholder: t(:password), required: true

%button.btn.btn-lg.btn-primary.btn-block{:type => 'submit'}= t(:log_in)
%button.btn.btn-lg.btn-primary.btn-block{:type => 'submit'}= t('.login_btn')

%hr
= link_to '/registrar/login/mid' do
= link_to '/registrar/login/mid', id: 'login-with-mobile-id-btn' do
= image_tag 'mid.gif'
= link_to '/registrar/id', method: :post do
= image_tag 'id_card.gif'
Expand Down
Loading

0 comments on commit 0dcecbc

Please sign in to comment.