mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 03:58:27 +02:00
Add period parameter to form
This commit is contained in:
parent
7dd3005bf3
commit
3ef6c53a8c
4 changed files with 25 additions and 0 deletions
|
@ -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)
|
||||
|
|
12
app/interactions/domains/bulk_renew/single_domain_renew.rb
Normal file
12
app/interactions/domains/bulk_renew/single_domain_renew.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
module Domains
|
||||
module BulkRenew
|
||||
class SingleDomainRenew < ActiveInteraction::Base
|
||||
object :domain,
|
||||
class: Epp::Domain
|
||||
|
||||
def execute
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -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">
|
||||
|
|
|
@ -36,3 +36,4 @@ en:
|
|||
expire_date: Expire date until
|
||||
domain_ids: Domains for bulk renewal
|
||||
current_balance: Current balance
|
||||
period: Period
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue