Change bottom champs editor button from enregistrer to continuer

This commit is contained in:
simon lehericey 2021-06-10 14:39:54 +02:00
parent 9f50ead0fc
commit 6be0bbaa9c
4 changed files with 10 additions and 15 deletions

View file

@ -30,7 +30,8 @@ module ProcedureHelper
typeDeChampsTypes: TypeDeChamp.type_de_champ_types_for(procedure, current_user),
typeDeChamps: (procedure.draft_revision ? procedure.draft_revision : procedure).types_de_champ.as_json_for_editor,
baseUrl: admin_procedure_types_de_champ_path(procedure),
directUploadUrl: rails_direct_uploads_url
directUploadUrl: rails_direct_uploads_url,
continuerUrl: admin_procedure_path(procedure)
}
end
@ -40,7 +41,8 @@ module ProcedureHelper
typeDeChampsTypes: TypeDeChamp.type_de_champ_types_for(procedure, current_user),
typeDeChamps: (procedure.draft_revision ? procedure.draft_revision : procedure).types_de_champ_private.as_json_for_editor,
baseUrl: admin_procedure_types_de_champ_path(procedure),
directUploadUrl: rails_direct_uploads_url
directUploadUrl: rails_direct_uploads_url,
continuerUrl: admin_procedure_path(procedure)
}
end

View file

@ -60,12 +60,9 @@ function TypeDeChamps({ state: rootState, typeDeChamps }) {
  
{addChampLabel(state.isAnnotation)}
</button>
<button
className="button primary"
onClick={() => state.flash.success()}
>
Enregistrer
</button>
<a className="button accepted" href={state.continuerUrl}>
Continuer &gt;
</a>
</div>
</div>
);

View file

@ -22,7 +22,8 @@ class TypesDeChampEditor extends Component {
defaultTypeDeChampAttributes,
typeDeChampsTypes: props.typeDeChampsTypes,
directUploadUrl: props.directUploadUrl,
isAnnotation: props.isAnnotation
isAnnotation: props.isAnnotation,
continuerUrl: props.continuerUrl
};
}
@ -35,6 +36,7 @@ class TypesDeChampEditor extends Component {
TypesDeChampEditor.propTypes = {
baseUrl: PropTypes.string,
continuerUrl: PropTypes.string,
directUploadUrl: PropTypes.string,
isAnnotation: PropTypes.bool,
typeDeChamps: PropTypes.array,

View file

@ -13,12 +13,6 @@ feature 'As an administrateur I can edit types de champ', js: true do
fill_in 'champ-0-libelle', with: 'libellé de champ'
blur
expect(page).to have_content('Formulaire enregistré')
page.refresh
within '.buttons' do
click_on 'Enregistrer'
end
expect(page).to have_content('Formulaire enregistré')
end
it "Add multiple champs" do