diff --git a/app/controllers/admin/legislation/processes_controller.rb b/app/controllers/admin/legislation/processes_controller.rb index 5d8d828cd..da27f9955 100644 --- a/app/controllers/admin/legislation/processes_controller.rb +++ b/app/controllers/admin/legislation/processes_controller.rb @@ -47,9 +47,12 @@ class Admin::Legislation::ProcessesController < Admin::Legislation::BaseControll :draft_publication_date, :allegations_start_date, :allegations_end_date, + :proposals_phase_start_date, + :proposals_phase_end_date, :result_publication_date, :debate_phase_enabled, :allegations_phase_enabled, + :proposals_phase_enabled, :draft_publication_enabled, :result_publication_enabled, :published diff --git a/app/models/legislation/process.rb b/app/models/legislation/process.rb index b6043df57..0f596b8f8 100644 --- a/app/models/legislation/process.rb +++ b/app/models/legislation/process.rb @@ -2,7 +2,7 @@ class Legislation::Process < ActiveRecord::Base acts_as_paranoid column: :hidden_at include ActsAsParanoidAliases - PHASES_AND_PUBLICATIONS = %i(debate_phase allegations_phase draft_publication result_publication).freeze + PHASES_AND_PUBLICATIONS = %i(debate_phase allegations_phase proposals_phase draft_publication result_publication).freeze has_many :draft_versions, -> { order(:id) }, class_name: 'Legislation::DraftVersion', foreign_key: 'legislation_process_id', dependent: :destroy @@ -33,6 +33,10 @@ class Legislation::Process < ActiveRecord::Base Legislation::Process::Phase.new(allegations_start_date, allegations_end_date, allegations_phase_enabled) end + def proposals_phase + Legislation::Process::Phase.new(proposals_phase_start_date, proposals_phase_end_date, proposals_phase_enabled) + end + def draft_publication Legislation::Process::Publication.new(draft_publication_date, draft_publication_enabled) end diff --git a/app/views/admin/legislation/processes/_form.html.erb b/app/views/admin/legislation/processes/_form.html.erb index 205d97361..ed034544b 100644 --- a/app/views/admin/legislation/processes/_form.html.erb +++ b/app/views/admin/legislation/processes/_form.html.erb @@ -114,6 +114,39 @@ +