Do not check for path availability when in the “new procedure” form
The user can’t even enter the path here, it’s nil. fixes #3918 The @availability was always PATH_NOT_AVAILABLE when the form was reloaded after an error, because Procedure::path_availability always found an (archived) procedure with a nil path. It got confused and concluded its path was conflicting. 🤷🏻♂️
This commit is contained in:
parent
42a424d67d
commit
43f936ec77
1 changed files with 1 additions and 4 deletions
|
@ -6,7 +6,4 @@
|
|||
= form_for @procedure, url: { controller: 'admin/procedures', action: :create }, multipart: true do |f|
|
||||
= render partial: 'informations', locals: { f: f }
|
||||
.text-right
|
||||
- if @availability.in?(Procedure::PATH_CAN_PUBLISH)
|
||||
= f.button 'Valider', class: 'btn btn-info', id: 'save-procedure'
|
||||
- else
|
||||
= f.button 'Valider', class: 'btn btn-info', id: 'save-procedure', disabled: true
|
||||
|
|
Loading…
Reference in a new issue