dossiers: save draft by default (instead of submitting)
Make the default behavior of `update_brouillon` be to update the draft, instead of submitting the dossier. This makes all requests made to `update_brouillon` without specifying an extra `submit_draft` parameter to just save the draft. It will make autosaving the draft easier and safer.
This commit is contained in:
parent
03a7bc3d5a
commit
8b8a96abda
3 changed files with 16 additions and 15 deletions
|
@ -43,13 +43,14 @@
|
|||
- if dossier.brouillon?
|
||||
= f.button 'Enregistrer le brouillon',
|
||||
formnovalidate: true,
|
||||
name: :save_draft,
|
||||
value: true,
|
||||
class: 'button send secondary',
|
||||
data: { 'disable-with': "Envoi en cours…" }
|
||||
|
||||
- if dossier.can_transition_to_en_construction?
|
||||
= f.button 'Déposer le dossier',
|
||||
name: :submit_draft,
|
||||
value: true,
|
||||
class: 'button send primary',
|
||||
disabled: !current_user.owns?(dossier),
|
||||
data: { 'disable-with': "Envoi en cours…" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue