Enable new champs editor for all

This commit is contained in:
Paul Chavard 2019-01-17 12:04:05 +01:00
parent 3446782cd0
commit 9725f2a418
6 changed files with 5 additions and 16 deletions

View file

@ -81,11 +81,7 @@ class Admin::ProceduresController < AdminController
gestionnaire.assign_to_procedure(@procedure)
end
if Flipflop.new_champs_editor?
redirect_to champs_procedure_path(@procedure)
else
redirect_to admin_procedure_types_de_champ_path(procedure_id: @procedure.id)
end
end
end

View file

@ -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
.alert.alert-info
.form-group
%p
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
\ <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 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
- if @procedure.has_old_pjs?

View file

@ -38,8 +38,7 @@
%p.missing-steps (à compléter)
- 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_editor_path }
%a#onglet-champs{ href: champs_procedure_path(@procedure) }
.procedure-list-element{ class: ('active' if active == 'Champs') }
Champs
@ -49,8 +48,7 @@
Pièces jointes
- 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_editor_path }
%a#onglet-private-champs{ href: annotations_procedure_path(@procedure) }
.procedure-list-element{ class: ('active' if active == 'Annotations privées') }
Annotations privées

View file

@ -15,7 +15,6 @@ Flipflop.configure do
feature :web_hook
feature :enable_email_login_token
feature :new_champs_editor
feature :operation_log_serialize_subject

View file

@ -186,7 +186,6 @@ describe Admin::ProceduresController, type: :controller do
context 'when procedure is correctly save' do
before do
Flipflop::FeatureSet.current.test!.switch!(:new_champs_editor, true)
post :create, params: { procedure: procedure_params }
end

View file

@ -5,10 +5,8 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
include ProcedureSpecHelper
let(:administrateur) { create(:administrateur, :with_procedure) }
let(:test_strategy) { Flipflop::FeatureSet.current.test! }
before do
test_strategy.switch!(:new_champs_editor, true)
login_as administrateur, scope: :administrateur
visit root_path
end