Enable new champs editor for all
This commit is contained in:
parent
3446782cd0
commit
9725f2a418
6 changed files with 5 additions and 16 deletions
|
@ -81,11 +81,7 @@ class Admin::ProceduresController < AdminController
|
||||||
gestionnaire.assign_to_procedure(@procedure)
|
gestionnaire.assign_to_procedure(@procedure)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Flipflop.new_champs_editor?
|
redirect_to champs_procedure_path(@procedure)
|
||||||
redirect_to champs_procedure_path(@procedure)
|
|
||||||
else
|
|
||||||
redirect_to admin_procedure_types_de_champ_path(procedure_id: @procedure.id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
- champs_editor_path = Flipflop.new_champs_editor? ? champs_procedure_path(@procedure) : admin_procedure_types_de_champ_path(@procedure)
|
|
||||||
.row.white-back
|
.row.white-back
|
||||||
.alert.alert-info
|
.alert.alert-info
|
||||||
.form-group
|
.form-group
|
||||||
%p
|
%p
|
||||||
Pour vos nouveaux besoins de pièces jointes, nous vous invitons à
|
Pour vos nouveaux besoins de pièces jointes, nous vous invitons à
|
||||||
= link_to(champs_editor_path) do
|
= link_to(champs_procedure_path(@procedure)) do
|
||||||
rajouter des champs
|
rajouter des champs
|
||||||
\ <em>pièce justificative</em> à votre formulaire.
|
\ <em>pièce justificative</em> à votre formulaire.
|
||||||
|
|
||||||
|
@ -18,7 +17,7 @@
|
||||||
%li Support des pièces de grande taille (jusqu’à 200 Mo par pièce)
|
%li Support des pièces de grande taille (jusqu’à 200 Mo par pièce)
|
||||||
%li Pas de limite de soumission simultanée de plusieurs pièces, pour une expérience usager plus confortable
|
%li Pas de limite de soumission simultanée de plusieurs pièces, pour une expérience usager plus confortable
|
||||||
|
|
||||||
= link_to(champs_editor_path, class: 'btn btn-success') do
|
= link_to(champs_procedure_path(@procedure), class: 'btn btn-success') do
|
||||||
Ajouter un champ PJ
|
Ajouter un champ PJ
|
||||||
|
|
||||||
- if @procedure.has_old_pjs?
|
- if @procedure.has_old_pjs?
|
||||||
|
|
|
@ -38,8 +38,7 @@
|
||||||
%p.missing-steps (à compléter)
|
%p.missing-steps (à compléter)
|
||||||
|
|
||||||
- if !@procedure.locked?
|
- if !@procedure.locked?
|
||||||
- champs_editor_path = Flipflop.new_champs_editor? ? champs_procedure_path(@procedure) : admin_procedure_types_de_champ_path(@procedure)
|
%a#onglet-champs{ href: champs_procedure_path(@procedure) }
|
||||||
%a#onglet-champs{ href: champs_editor_path }
|
|
||||||
.procedure-list-element{ class: ('active' if active == 'Champs') }
|
.procedure-list-element{ class: ('active' if active == 'Champs') }
|
||||||
Champs
|
Champs
|
||||||
|
|
||||||
|
@ -49,8 +48,7 @@
|
||||||
Pièces jointes
|
Pièces jointes
|
||||||
|
|
||||||
- if !@procedure.locked?
|
- if !@procedure.locked?
|
||||||
- annotations_editor_path = Flipflop.new_champs_editor? ? annotations_procedure_path(@procedure) : admin_procedure_types_de_champ_private_path(@procedure)
|
%a#onglet-private-champs{ href: annotations_procedure_path(@procedure) }
|
||||||
%a#onglet-private-champs{ href: annotations_editor_path }
|
|
||||||
.procedure-list-element{ class: ('active' if active == 'Annotations privées') }
|
.procedure-list-element{ class: ('active' if active == 'Annotations privées') }
|
||||||
Annotations privées
|
Annotations privées
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ Flipflop.configure do
|
||||||
|
|
||||||
feature :web_hook
|
feature :web_hook
|
||||||
feature :enable_email_login_token
|
feature :enable_email_login_token
|
||||||
feature :new_champs_editor
|
|
||||||
|
|
||||||
feature :operation_log_serialize_subject
|
feature :operation_log_serialize_subject
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,6 @@ describe Admin::ProceduresController, type: :controller do
|
||||||
|
|
||||||
context 'when procedure is correctly save' do
|
context 'when procedure is correctly save' do
|
||||||
before do
|
before do
|
||||||
Flipflop::FeatureSet.current.test!.switch!(:new_champs_editor, true)
|
|
||||||
post :create, params: { procedure: procedure_params }
|
post :create, params: { procedure: procedure_params }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,8 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
|
||||||
include ProcedureSpecHelper
|
include ProcedureSpecHelper
|
||||||
|
|
||||||
let(:administrateur) { create(:administrateur, :with_procedure) }
|
let(:administrateur) { create(:administrateur, :with_procedure) }
|
||||||
let(:test_strategy) { Flipflop::FeatureSet.current.test! }
|
|
||||||
|
|
||||||
before do
|
before do
|
||||||
test_strategy.switch!(:new_champs_editor, true)
|
|
||||||
login_as administrateur, scope: :administrateur
|
login_as administrateur, scope: :administrateur
|
||||||
visit root_path
|
visit root_path
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue