mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +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
|
||||
|
|
|
@ -12,6 +12,17 @@
|
|||
<div class="row">
|
||||
<%= form_tag schedule_force_delete_admin_domain_path, method: :patch,
|
||||
id: 'domain-force-delete-form', class: 'form-horizontal' do %>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-9 col-md-offset-2">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<%= check_box_tag 'notify_by_email', 1, true %>
|
||||
<%= t '.notify_by_email' %>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><%= t '.template' %>:</label>
|
||||
<div class="col-sm-9">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue