mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 05:34:46 +02:00
Add multiple checkboxes to select domains for bulk renew
This commit is contained in:
parent
9c662471a7
commit
40b22cd433
3 changed files with 28 additions and 0 deletions
|
@ -11,6 +11,8 @@ class Registrar
|
|||
def bulk_renew
|
||||
authorize! :manage, :repp
|
||||
@expire_date = params[:expire_date].to_date
|
||||
# binding.pry
|
||||
@domains = domains_by_date(@expire_date)
|
||||
render file: 'registrar/bulk_change/new', locals: { active_tab: :bulk_renew }
|
||||
end
|
||||
|
||||
|
@ -23,5 +25,13 @@ class Registrar
|
|||
def default_tab
|
||||
:technical_contact
|
||||
end
|
||||
|
||||
def domains_scope
|
||||
current_registrar_user.registrar.domains
|
||||
end
|
||||
|
||||
def domains_by_date(date)
|
||||
domains_scope.where('valid_to <= ?', date)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue