Admin can be declare a procedure for individual people (no SIRET)

This commit is contained in:
Xavier J 2016-08-29 12:07:30 +02:00
parent 0eb2acb959
commit ed8da1552c
4 changed files with 20 additions and 3 deletions

View file

@ -187,7 +187,7 @@ class Admin::ProceduresController < AdminController
private
def create_procedure_params
params.require(:procedure).permit(:libelle, :description, :organisation, :direction, :lien_demarche, :lien_site_web, :lien_notice, :euro_flag, :logo, :cerfa_flag, module_api_carto_attributes: [:id, :use_api_carto, :quartiers_prioritaires, :cadastre]).merge(administrateur_id: current_administrateur.id)
params.require(:procedure).permit(:libelle, :description, :organisation, :direction, :lien_demarche, :lien_site_web, :lien_notice, :euro_flag, :logo, :cerfa_flag, :for_individual, module_api_carto_attributes: [:id, :use_api_carto, :quartiers_prioritaires, :cadastre]).merge(administrateur_id: current_administrateur.id)
end
def create_module_api_carto_params

View file

@ -52,6 +52,17 @@
%h4 Formulaire / CERFA
%label
=f.check_box :cerfa_flag
Activer l'envoi de formulaire / CERFA
Activer l'envoi de formulaire / CERFA
%br
=f.text_field :lien_demarche, class: 'form-control', placeholder: 'URL vers le formulaire vierge (facultatif)'
%br
.row
.col-md-6.col-lg-6
%h4 Particuliers
%label
=f.check_box :for_individual
Cette procédure s'adresse à un public qui
%b
ne possède pas de numéro SIRET,
qui doivent donc s'identifier en tant que personne physique.

View file

@ -0,0 +1,5 @@
class AddForIndividualAttrInProcedureTable < ActiveRecord::Migration
def change
add_column :procedures, :for_individual, :boolean, default: false
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160824094451) do
ActiveRecord::Schema.define(version: 20160829094658) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -278,6 +278,7 @@ ActiveRecord::Schema.define(version: 20160824094451) do
t.boolean "published", default: false, null: false
t.string "lien_site_web"
t.string "lien_notice"
t.boolean "for_individual", default: false
end
create_table "quartier_prioritaires", force: :cascade do |t|