admin: add a expects_multiple_submissions
property on procedures
This commit is contained in:
parent
48b89062c8
commit
dd4eae7d62
4 changed files with 18 additions and 3 deletions
|
@ -269,7 +269,7 @@ class Admin::ProceduresController < AdminController
|
|||
end
|
||||
|
||||
def procedure_params
|
||||
editable_params = [:libelle, :description, :organisation, :direction, :lien_site_web, :cadre_juridique, :deliberation, :notice, :web_hook_url, :euro_flag, :logo, :auto_archive_on]
|
||||
editable_params = [:libelle, :description, :organisation, :direction, :lien_site_web, :cadre_juridique, :deliberation, :notice, :expects_multiple_submissions, :web_hook_url, :euro_flag, :logo, :auto_archive_on]
|
||||
if @procedure&.locked?
|
||||
params.require(:procedure).permit(*editable_params)
|
||||
else
|
||||
|
|
|
@ -116,7 +116,16 @@
|
|||
.col-md-6
|
||||
%h4 Options avancées
|
||||
|
||||
- if Flipflop.web_hook?
|
||||
= f.label :expects_multiple_submissions do
|
||||
= f.check_box :expects_multiple_submissions
|
||||
Ajuster pour le dépôt récurrent de dossiers
|
||||
%p.help-block
|
||||
%i.fa.fa-info-circle
|
||||
Si cette démarche est conçue pour qu’une même personne y dépose régulièrement plusieurs
|
||||
dossiers, l’interface est ajustée pour rendre plus facile la création de plusieurs dossiers
|
||||
à la suite.
|
||||
|
||||
- if Flipflop.web_hook?
|
||||
%label{ for: :web_hook_url } Lien de rappel HTTP (webhook)
|
||||
= f.text_field :web_hook_url, class: 'form-control', placeholder: 'https://callback.exemple.fr/'
|
||||
%p.help-block
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddExpectsMultipleSubmissionsColumnToProcedure < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :procedures, :expects_multiple_submissions, :boolean, default: false, null: false
|
||||
end
|
||||
end
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2019_03_18_154812) do
|
||||
ActiveRecord::Schema.define(version: 2019_03_27_102357) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -478,6 +478,7 @@ ActiveRecord::Schema.define(version: 2019_03_18_154812) do
|
|||
t.boolean "juridique_required", default: true
|
||||
t.boolean "durees_conservation_required", default: true
|
||||
t.string "path"
|
||||
t.boolean "expects_multiple_submissions", default: false, null: false
|
||||
t.index ["hidden_at"], name: "index_procedures_on_hidden_at"
|
||||
t.index ["parent_procedure_id"], name: "index_procedures_on_parent_procedure_id"
|
||||
t.index ["service_id"], name: "index_procedures_on_service_id"
|
||||
|
|
Loading…
Reference in a new issue