mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
Set single poll message for force delete
This commit is contained in:
parent
f1ceff818e
commit
a9ce9dba51
4 changed files with 16 additions and 5 deletions
|
@ -7,7 +7,9 @@ module Admin
|
||||||
domain.transaction do
|
domain.transaction do
|
||||||
domain.schedule_force_delete(type: force_delete_type)
|
domain.schedule_force_delete(type: force_delete_type)
|
||||||
domain.registrar.notifications.create!(text: t('force_delete_set_on_domain',
|
domain.registrar.notifications.create!(text: t('force_delete_set_on_domain',
|
||||||
domain_name: domain.name))
|
domain_name: domain.name,
|
||||||
|
outzone_date: domain.outzone_date,
|
||||||
|
purge_date: domain.purge_date))
|
||||||
|
|
||||||
notify_by_email if notify_by_email?
|
notify_by_email if notify_by_email?
|
||||||
end
|
end
|
||||||
|
|
|
@ -88,6 +88,15 @@ module Concerns::Domain::ForceDelete # rubocop:disable Metrics/ModuleLength
|
||||||
registrar.notifications.create!(text: I18n.t('force_delete_cancelled', domain_name: name))
|
registrar.notifications.create!(text: I18n.t('force_delete_cancelled', domain_name: name))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def outzone_date
|
||||||
|
(force_delete_start || valid_to) + Setting.expire_warning_period.days
|
||||||
|
end
|
||||||
|
|
||||||
|
def purge_date
|
||||||
|
force_delete_date || valid_to + Setting.expire_warning_period.days +
|
||||||
|
Setting.redemption_grace_period.days + 1.day
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def calculate_soft_delete_date
|
def calculate_soft_delete_date
|
||||||
|
|
|
@ -5,9 +5,10 @@ module Concerns
|
||||||
|
|
||||||
class_methods do
|
class_methods do
|
||||||
def notify_client_hold(domain)
|
def notify_client_hold(domain)
|
||||||
domain.registrar.notifications.create!(text: I18n.t('client_hold_set_on_domain',
|
domain.registrar.notifications.create!(text: I18n.t('force_delete_set_on_domain',
|
||||||
domain_name: domain.name,
|
domain_name: domain.name,
|
||||||
date: domain.force_delete_start))
|
outzone_date: domain.outzone_date,
|
||||||
|
purge_date: domain.purge_date))
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_on_grace_period(domain)
|
def notify_on_grace_period(domain)
|
||||||
|
|
|
@ -618,8 +618,7 @@ en:
|
||||||
created_at_from: 'Created at from'
|
created_at_from: 'Created at from'
|
||||||
created_at_until: 'Created at until'
|
created_at_until: 'Created at until'
|
||||||
is_registrant: 'Is registrant'
|
is_registrant: 'Is registrant'
|
||||||
force_delete_set_on_domain: 'Force delete set on domain %{domain_name}'
|
force_delete_set_on_domain: 'Force delete set on domain %{domain_name}. Outzone date: %{outzone_date}. Purge date: %{purge_date}'
|
||||||
client_hold_set_on_domain: 'clientHold status is set for domain %{domain_name}, ForceDelete is in effect from %{date}'
|
|
||||||
grace_period_started_domain: 'For domain %{domain_name} started 45-days redemption grace period, ForceDelete will be in effect from %{date}'
|
grace_period_started_domain: 'For domain %{domain_name} started 45-days redemption grace period, ForceDelete will be in effect from %{date}'
|
||||||
force_delete_cancelled: 'Force delete is cancelled on domain %{domain_name}'
|
force_delete_cancelled: 'Force delete is cancelled on domain %{domain_name}'
|
||||||
contact_is_not_valid: 'Contact %{value} is not valid, please fix the invalid contact'
|
contact_is_not_valid: 'Contact %{value} is not valid, please fix the invalid contact'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue