app: remove leftovers of procedure path autocomplete
We used to pre-validate the procedure, to display in advance if the path could be used. Now that the path autocomplete is long gone, we can remove this kludgy code.
This commit is contained in:
parent
4fc224490e
commit
2227dcc1e7
2 changed files with 1 additions and 23 deletions
|
@ -30,14 +30,5 @@
|
|||
autocomplete: 'off',
|
||||
placeholder: 'https://exemple.gouv.fr/ma_demarche')
|
||||
|
||||
- procedure.validate(:publication)
|
||||
- errors = procedure.errors
|
||||
-# Ignore the :taken error if the path can be claimed
|
||||
- if errors.details[:path]&.pluck(:error)&.include?(:taken) && procedure.path_available?(administrateur, procedure.path)
|
||||
- errors.delete(:path)
|
||||
|
||||
- options = { class: "button primary", id: 'publish' }
|
||||
- if errors.details[:path].present?
|
||||
- options[:disabled] = :disabled
|
||||
.flex.justify-end
|
||||
= submit_tag procedure_publish_label(procedure, :submit), options
|
||||
= submit_tag procedure_publish_label(procedure, :submit), { class: "button primary", id: 'publish' }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue