Can create procédure individual with SIRET for later
This commit is contained in:
parent
551df27192
commit
aa3b1e974d
6 changed files with 44 additions and 16 deletions
|
@ -4,6 +4,7 @@ $(document).ready(button_edit_procedure_init);
|
||||||
function button_edit_procedure_init(){
|
function button_edit_procedure_init(){
|
||||||
buttons_api_carto();
|
buttons_api_carto();
|
||||||
button_cerfa();
|
button_cerfa();
|
||||||
|
button_individual();
|
||||||
}
|
}
|
||||||
|
|
||||||
function buttons_api_carto () {
|
function buttons_api_carto () {
|
||||||
|
@ -25,3 +26,13 @@ function button_cerfa () {
|
||||||
if ($('#procedure_cerfa_flag').is(':checked'))
|
if ($('#procedure_cerfa_flag').is(':checked'))
|
||||||
$("#procedure_lien_demarche").show();
|
$("#procedure_lien_demarche").show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function button_individual () {
|
||||||
|
|
||||||
|
$("#procedure_for_individual").on('change', function() {
|
||||||
|
$("#individual_with_siret").toggle()
|
||||||
|
});
|
||||||
|
|
||||||
|
if ($('#procedure_for_individual').is(':checked'))
|
||||||
|
$("#individual_with_siret").show();
|
||||||
|
}
|
|
@ -5,3 +5,7 @@
|
||||||
#procedure_lien_demarche{
|
#procedure_lien_demarche{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#individual_with_siret {
|
||||||
|
display: none;
|
||||||
|
}
|
|
@ -187,7 +187,7 @@ class Admin::ProceduresController < AdminController
|
||||||
private
|
private
|
||||||
|
|
||||||
def create_procedure_params
|
def create_procedure_params
|
||||||
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)
|
params.require(:procedure).permit(:libelle, :description, :organisation, :direction, :lien_demarche, :lien_site_web, :lien_notice, :euro_flag, :logo, :cerfa_flag, :for_individual, :individual_with_siret, module_api_carto_attributes: [:id, :use_api_carto, :quartiers_prioritaires, :cadastre]).merge(administrateur_id: current_administrateur.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_module_api_carto_params
|
def create_module_api_carto_params
|
||||||
|
|
|
@ -60,9 +60,16 @@
|
||||||
.row
|
.row
|
||||||
.col-md-6.col-lg-6
|
.col-md-6.col-lg-6
|
||||||
%h4 Particuliers
|
%h4 Particuliers
|
||||||
|
%div
|
||||||
%label
|
%label
|
||||||
=f.check_box :for_individual
|
=f.check_box :for_individual
|
||||||
Cette procédure s'adresse à un public qui
|
Cette procédure s'adresse à un public qui
|
||||||
%b
|
%b
|
||||||
ne possède pas de numéro SIRET,
|
ne possède pas (ou pas encore) de numéro SIRET,
|
||||||
qui doivent donc s'identifier en tant que personne physique.
|
qui doivent donc s'identifier en tant que personne physique.
|
||||||
|
|
||||||
|
%ul#individual_with_siret{style:'margin-top: 8px'}
|
||||||
|
%li
|
||||||
|
%label
|
||||||
|
=f.check_box :individual_with_siret
|
||||||
|
Donner la possibilité de renseigner un SIRET au cours de la construction du dossier.
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddIndividualWithSiretInProcedure < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :procedures, :individual_with_siret, :boolean, default: false
|
||||||
|
end
|
||||||
|
end
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20161004175442) do
|
ActiveRecord::Schema.define(version: 20161005082113) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
@ -295,6 +295,7 @@ ActiveRecord::Schema.define(version: 20161004175442) do
|
||||||
t.string "lien_site_web"
|
t.string "lien_site_web"
|
||||||
t.string "lien_notice"
|
t.string "lien_notice"
|
||||||
t.boolean "for_individual", default: false
|
t.boolean "for_individual", default: false
|
||||||
|
t.boolean "individual_with_siret", default: false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "quartier_prioritaires", force: :cascade do |t|
|
create_table "quartier_prioritaires", force: :cascade do |t|
|
||||||
|
|
Loading…
Reference in a new issue