Merge pull request #8410 from tchak/refactor-procedures-all

refactor(demarches): use turbo-frame
This commit is contained in:
Paul Chavard 2023-01-12 11:55:06 +01:00 committed by GitHub
commit 247bd6128e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
- content_for :results do
.main-filter-header.fr-my-3w
= form_with(url: administrateurs_admin_procedures_path, method: :get, html: {'data-autosubmit-target': 'form', role: 'search' }) do |f|
= form_with(url: administrateurs_admin_procedures_path, method: :get, html: { 'data-autosubmit-target': 'form', 'data-turbo-frame': 'procedures', role: 'search' }) do |f|
- @filter.zone_ids&.each do |zone_id|
= hidden_field_tag 'zone_ids[]', zone_id
- @filter.statuses&.each do |status|

View file

@ -1,6 +1,6 @@
- content_for :results do
.main-filter-header.fr-my-3w
= form_with(url: all_admin_procedures_path, method: :get, html: { 'data-autosubmit-target': 'form', role: 'search', class: 'search' }) do |f|
= form_with(url: all_admin_procedures_path, method: :get, html: { 'data-autosubmit-target': 'form', 'data-turbo-frame': 'procedures', role: 'search', class: 'search' }) do |f|
- @filter.zone_ids&.each do |zone_id|
= hidden_field_tag 'zone_ids[]', zone_id
- @filter.statuses&.each do |status|

View file

@ -12,7 +12,7 @@
.fr-container--fluid{ 'data-turbo': 'true', 'data-controller': 'autosubmit' }
.fr-grid-row.fr-grid-row--gutters
.fr-col-3
= form_with(url: all_admin_procedures_path, method: :get, html: {'data-autosubmit-target': 'form'}) do |f|
= form_with(url: all_admin_procedures_path, method: :get, html: { 'data-autosubmit-target': 'form', 'data-turbo-frame': 'procedures' }) do |f|
%fieldset.sidebar-filter
%legend
@ -64,6 +64,6 @@
= b.check_box(checked: @filter.status_filtered?(b.value), 'data-action': 'autosubmit#submit')
= b.label(class: 'fr-label') { t b.text, scope: 'activerecord.attributes.procedure.aasm_state' }
.fr-col-9
%turbo-frame#procedures.fr-col-9{ 'data-turbo-action': 'advance' }
= yield(:results)
= render template: 'layouts/application'