Add period parameter to form

This commit is contained in:
Alex Sherman 2020-12-11 13:54:49 +05:00
parent 7dd3005bf3
commit 3ef6c53a8c
4 changed files with 25 additions and 0 deletions

View file

@ -12,6 +12,8 @@ class Registrar
authorize! :manage, :repp
@expire_date = params[:expire_date].to_date
@domains = domains_by_date(@expire_date)
@period = params[:period]
if domain_ids_for_bulk_renew.present?
domains = Epp::Domain.where(id: domain_ids_for_bulk_renew).to_a
task = Domains::BulkRenew::Start.run(domains: domains)

View file

@ -0,0 +1,12 @@
module Domains
module BulkRenew
class SingleDomainRenew < ActiveInteraction::Base
object :domain,
class: Epp::Domain
def execute
end
end
end
end

View file

@ -21,6 +21,16 @@
</div>
</div>
<div class="form-group">
<div class="col-md-2 control-label">
<%= f.label :period, t('.period'), class: 'required' %>
</div>
<div class="col-md-4">
<%= select_tag 'period',
options_for_select(Depp::Domain::PERIODS, @period), { class: 'form-control' } %>
</div>
</div>
<% if @domains.present? %>
<div class="form-group">
<div class="col-md-2 control-label">

View file

@ -36,3 +36,4 @@ en:
expire_date: Expire date until
domain_ids: Domains for bulk renewal
current_balance: Current balance
period: Period