diff --git a/app/controllers/registrar/bulk_change_controller.rb b/app/controllers/registrar/bulk_change_controller.rb index a87589890..1dc5282a7 100644 --- a/app/controllers/registrar/bulk_change_controller.rb +++ b/app/controllers/registrar/bulk_change_controller.rb @@ -12,16 +12,22 @@ class Registrar authorize! :manage, :repp set_form_data - if domain_ids_for_bulk_renew.present? + if ready_to_renew? domains = Epp::Domain.where(id: domain_ids_for_bulk_renew).to_a task = renew_task(domains) flash[:notice] = flash_message(task) + else + flash[:notice] = nil end render file: 'registrar/bulk_change/new', locals: { active_tab: :bulk_renew } end private + def ready_to_renew? + domain_ids_for_bulk_renew.present? && params[:renew].present? + end + def set_form_data @expire_date = params[:expire_date].to_date @domains = domains_by_date(@expire_date) diff --git a/app/views/registrar/bulk_change/_bulk_renew_form.html.erb b/app/views/registrar/bulk_change/_bulk_renew_form.html.erb index 162376070..239a36815 100644 --- a/app/views/registrar/bulk_change/_bulk_renew_form.html.erb +++ b/app/views/registrar/bulk_change/_bulk_renew_form.html.erb @@ -48,11 +48,10 @@ <% end %> -