mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Merge remote-tracking branch 'origin/master' into log-bounced-emails
This commit is contained in:
commit
fc34105c40
70 changed files with 791 additions and 4967 deletions
|
@ -57,7 +57,7 @@
|
|||
- if version
|
||||
- attributes = only_present_fields(version, Domain)
|
||||
- domain = Domain.new(attributes)
|
||||
- attach_existing_fields(version, domain)
|
||||
- attach_existing_fields(version, domain) unless version.event == 'destroy'
|
||||
|
||||
%tr
|
||||
%td= link_to(domain.name, admin_domain_version_path(version.id))
|
||||
|
@ -67,7 +67,7 @@
|
|||
- else
|
||||
- contact = Contact.all_versions_for([domain.registrant_id], version.created_at).first
|
||||
- if contact.nil? && ver = ContactVersion.where(item_id: domain.registrant_id).last
|
||||
- contact = Contact.new(ver.object.to_h.merge(ver.object_changes.to_h.each_with_object({}){|(k,v), o| o.public_send("#{k}=", v.last) } ))
|
||||
- contact = Contact.new(ver.object.to_h.merge(ver.object_changes.to_h.each_with_object({}) {|(k,v), o| o[k] = v.last }))
|
||||
= contact.try(:name)
|
||||
= " ".html_safe
|
||||
= "(#{t(:deleted)})"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- present_fields = only_present_fields(@version, Domain)
|
||||
- domain = Domain.new(present_fields)
|
||||
- attach_existing_fields(@version, domain)
|
||||
- attach_existing_fields(@version, domain) unless @version.event == 'destroy'
|
||||
|
||||
- if @version
|
||||
- children = HashWithIndifferentAccess.new(@version.children)
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
.row
|
||||
.form-signin.col-md-4.center-block.text-center
|
||||
%h2.form-signin-heading.text-center= t '.header'
|
||||
%hr
|
||||
= form_for @user, url: registrant_mid_path, 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 '.submit_btn'
|
||||
|
||||
- if ['development', 'alpha'].include?(Rails.env)
|
||||
%div.text-center
|
||||
00007, 60000007, 00000766
|
||||
|
||||
:coffee
|
||||
load_listener = ->
|
||||
$('.js-login').attr('disabled', false)
|
||||
|
||||
status_interval = null
|
||||
mid_status = () ->
|
||||
status_interval = setInterval((->
|
||||
$.post('/registrant/login/mid_status').fail((data) ->
|
||||
clearInterval(status_interval)
|
||||
flash_alert(data.responseJSON.message)
|
||||
$('.js-login').attr('disabled', false)
|
||||
)
|
||||
), 1000)
|
||||
|
||||
$('.js-login').on 'click', (e) ->
|
||||
e.preventDefault();
|
||||
$(this).attr('disabled', true)
|
||||
|
||||
$.post($('form').attr('action'), $('form').serialize()).done((data) ->
|
||||
if data.message
|
||||
flash_notice(data.message)
|
||||
mid_status()
|
||||
).fail((data) ->
|
||||
flash_alert(data.responseJSON.message)
|
||||
$('.js-login').attr('disabled', false)
|
||||
)
|
||||
window.addEventListener 'load', load_listener
|
|
@ -8,11 +8,6 @@
|
|||
<%= t '.hint' %>
|
||||
</div>
|
||||
<br/>
|
||||
<%= link_to '/registrant/login/mid' do %>
|
||||
<%= image_tag 'mid.gif' %>
|
||||
<% end %>
|
||||
<%= link_to registrant_id_card_sign_in_path, method: :post do %>
|
||||
<%= image_tag 'id_card.gif' %>
|
||||
<% end %>
|
||||
<%= link_to t(:sign_in), "/auth/rant_tara", method: :post, class: 'btn btn-lg btn-primary btn-block' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
.row
|
||||
.form-signin.col-md-4.center-block.text-center
|
||||
%h2.form-signin-heading.text-center= t '.header'
|
||||
%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', required: true
|
||||
%button.btn.btn-lg.btn-primary.btn-block.js-login{:type => 'submit'}= t '.submit_btn'
|
||||
|
||||
- if ['development', 'alpha'].include?(Rails.env)
|
||||
%div.text-center
|
||||
00007, 60000007, 00000766
|
||||
|
||||
:coffee
|
||||
load_listener = ->
|
||||
$('.js-login').attr('disabled', false)
|
||||
|
||||
status_interval = null
|
||||
mid_status = () ->
|
||||
status_interval = setInterval((->
|
||||
$.post('/registrar/login/mid_status').fail((data) ->
|
||||
clearInterval(status_interval)
|
||||
flash_alert(data.responseJSON.message)
|
||||
$('.js-login').attr('disabled', false)
|
||||
)
|
||||
), 1000)
|
||||
|
||||
$('.js-login').on 'click', (e) ->
|
||||
e.preventDefault();
|
||||
$(this).attr('disabled', true)
|
||||
|
||||
$.post($('form').attr('action'), $('form').serialize()).done((data) ->
|
||||
if data.message
|
||||
flash_notice(data.message)
|
||||
mid_status()
|
||||
).fail((data) ->
|
||||
flash_alert(data.responseJSON.message)
|
||||
$('.js-login').attr('disabled', false)
|
||||
)
|
||||
window.addEventListener 'load', load_listener
|
|
@ -19,12 +19,10 @@
|
|||
|
||||
<hr>
|
||||
|
||||
<%= link_to '/registrar/login/mid', id: 'login-with-mobile-id-btn' do %>
|
||||
<%= image_tag 'mid.gif' %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to registrar_id_card_sign_in_path, method: :post do %>
|
||||
<%= image_tag 'id_card.gif' %>
|
||||
<% end %>
|
||||
<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>
|
||||
</div>
|
||||
|
|
0
app/views/registrar/tara/callback.html.erb
Normal file
0
app/views/registrar/tara/callback.html.erb
Normal file
Loading…
Add table
Add a link
Reference in a new issue