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(){
|
||||
buttons_api_carto();
|
||||
button_cerfa();
|
||||
button_individual();
|
||||
}
|
||||
|
||||
function buttons_api_carto () {
|
||||
|
@ -25,3 +26,13 @@ function button_cerfa () {
|
|||
if ($('#procedure_cerfa_flag').is(':checked'))
|
||||
$("#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{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#individual_with_siret {
|
||||
display: none;
|
||||
}
|
|
@ -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, :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
|
||||
|
||||
def create_module_api_carto_params
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
%h4 Drapeau européen
|
||||
%label
|
||||
=f.check_box :euro_flag
|
||||
Afficher le drapeau européen
|
||||
Afficher le drapeau européen
|
||||
|
||||
%br
|
||||
|
||||
|
@ -60,9 +60,16 @@
|
|||
.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.
|
||||
%div
|
||||
%label
|
||||
=f.check_box :for_individual
|
||||
Cette procédure s'adresse à un public qui
|
||||
%b
|
||||
ne possède pas (ou pas encore) de numéro SIRET,
|
||||
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
|
17
db/schema.rb
17
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# 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
|
||||
enable_extension "plpgsql"
|
||||
|
@ -282,19 +282,20 @@ ActiveRecord::Schema.define(version: 20161004175442) do
|
|||
t.string "organisation"
|
||||
t.string "direction"
|
||||
t.string "lien_demarche"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.boolean "test"
|
||||
t.integer "administrateur_id"
|
||||
t.boolean "archived", default: false
|
||||
t.boolean "euro_flag", default: false
|
||||
t.boolean "archived", default: false
|
||||
t.boolean "euro_flag", default: false
|
||||
t.string "logo"
|
||||
t.boolean "cerfa_flag", default: false
|
||||
t.boolean "cerfa_flag", default: false
|
||||
t.string "logo_secure_token"
|
||||
t.boolean "published", default: false, null: false
|
||||
t.boolean "published", default: false, null: false
|
||||
t.string "lien_site_web"
|
||||
t.string "lien_notice"
|
||||
t.boolean "for_individual", default: false
|
||||
t.boolean "for_individual", default: false
|
||||
t.boolean "individual_with_siret", default: false
|
||||
end
|
||||
|
||||
create_table "quartier_prioritaires", force: :cascade do |t|
|
||||
|
|
Loading…
Reference in a new issue