mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 18:56:05 +02:00
Merge branch 'master' into registry-800
# Conflicts: # db/structure.sql
This commit is contained in:
commit
22e1d09dfa
11 changed files with 10 additions and 20 deletions
|
@ -638,6 +638,7 @@ class Domain < ActiveRecord::Base
|
|||
def as_json(_options)
|
||||
hash = super
|
||||
hash['auth_info'] = hash.delete('transfer_code') # API v1 requirement
|
||||
hash['valid_from'] = hash['registered_at'] # API v1 requirement
|
||||
hash
|
||||
end
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@ class Epp::Domain < Domain
|
|||
domain.attributes = domain.attrs_from(frame, current_user)
|
||||
domain.attach_default_contacts
|
||||
domain.registered_at = Time.zone.now
|
||||
domain.valid_from = Time.zone.now
|
||||
|
||||
period = domain.period.to_i
|
||||
plural_period_unit_name = (domain.period_unit == 'm' ? 'months' : 'years').to_sym
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
class: 'form-control input-sm' %>
|
||||
</dd>
|
||||
|
||||
<dt><%= t(:valid_from) %></dt>
|
||||
<dd><%= l(@domain.valid_from) %></dd>
|
||||
|
||||
<dt><%= t(:valid_to) %></dt>
|
||||
<dd><%= l(@domain.valid_to) %></dd>
|
||||
|
||||
|
|
|
@ -66,12 +66,10 @@
|
|||
%p
|
||||
= link_to t(:pending_epp), '#', class: 'js-pending'
|
||||
|
||||
%td{class: changing_css_class(version, "period", "period_unit", "valid_from", "valid_to")}
|
||||
%td{class: changing_css_class(version, "period", "period_unit", "valid_to")}
|
||||
%p
|
||||
= "#{domain.period}#{domain.period_unit}"
|
||||
%br
|
||||
= "#{l(domain.valid_from, format: :date)}"
|
||||
%br
|
||||
= "#{l(domain.valid_to, format: :date)}"
|
||||
|
||||
%td
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
class: 'form-control input-sm' %>
|
||||
</dd>
|
||||
|
||||
<dt><%= t(:valid_from) %></dt>
|
||||
<dd><%= l(@domain.valid_from) %></dd>
|
||||
|
||||
<dt><%= t(:valid_to) %></dt>
|
||||
<dd><%= l(@domain.valid_to) %></dd>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue