mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
parent
a49b592fac
commit
b5870d3eb5
4 changed files with 34 additions and 2 deletions
|
@ -68,7 +68,7 @@ module Admin
|
|||
@domain.transaction do
|
||||
@domain.schedule_force_delete
|
||||
@domain.registrar.messages.create!(body: I18n.t('force_delete_set_on_domain', domain_name: @domain.name))
|
||||
DomainDeleteForcedEmailJob.enqueue(@domain.id, params[:template_name])
|
||||
DomainDeleteForcedEmailJob.enqueue(@domain.id, params[:template_name]) if notify_by_email?
|
||||
end
|
||||
|
||||
redirect_to edit_admin_domain_url(@domain), notice: t('.scheduled')
|
||||
|
@ -132,5 +132,9 @@ module Admin
|
|||
def force_delete_templates
|
||||
%w(removed_company death)
|
||||
end
|
||||
|
||||
def notify_by_email?
|
||||
ActiveRecord::Type::Boolean.new.type_cast_from_user(params[:notify_by_email])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue