Merge pull request #9453 from colinux/fix-layout-zones
ETQ admin, fix UX du formulaire de design de zones
This commit is contained in:
commit
606a56807a
3 changed files with 17 additions and 22 deletions
|
@ -117,13 +117,6 @@
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move checkbox to the top-left side of the label
|
|
||||||
&.editable-champ-checkbox {
|
|
||||||
label.admin-default-zone {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.editable-champ-checkbox {
|
&.editable-champ-checkbox {
|
||||||
label {
|
label {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
|
|
@ -7,24 +7,26 @@
|
||||||
.container
|
.container
|
||||||
= form_for @procedure,
|
= form_for @procedure,
|
||||||
url: url_for({ controller: 'administrateurs/procedures', action: :update, id: @procedure.id }),
|
url: url_for({ controller: 'administrateurs/procedures', action: :update, id: @procedure.id }),
|
||||||
html: { multipart: true, class: 'form' } do |f|
|
html: { multipart: true } do |f|
|
||||||
|
|
||||||
%h1.page-title Zones
|
%h1.page-title Zones
|
||||||
|
|
||||||
= f.label :zone do
|
|
||||||
= t('zone', scope: 'activerecord.attributes.procedure')
|
|
||||||
- if Rails.application.config.ds_zonage_enabled
|
- if Rails.application.config.ds_zonage_enabled
|
||||||
= f.collection_check_boxes :zone_ids, current_administrateur.default_zones, :id, :current_label do |b|
|
%fieldset.fr-fieldset{ aria: { labelledby: "zones-legend"} }
|
||||||
.editable-champ.editable-champ-checkbox
|
%legend#zones-legend.fr-fieldset__legend--regular.fr-fieldset__legend= t('zone', scope: 'activerecord.attributes.procedure')
|
||||||
= b.check_box
|
= f.collection_check_boxes :zone_ids, current_administrateur.default_zones, :id, :current_label do |b|
|
||||||
= b.label class: "admin-default-zone"
|
.fr-fieldset__element
|
||||||
= f.collection_check_boxes :zone_ids, Zone.available_at(@procedure.published_or_created_at, current_administrateur.default_zones), :id, :label do |b|
|
.fr-checkbox-group
|
||||||
.editable-champ.editable-champ-checkbox
|
= b.check_box
|
||||||
= b.check_box
|
= b.label class: "fr-label font-weight-bold"
|
||||||
= b.label
|
= f.collection_check_boxes :zone_ids, Zone.available_at(@procedure.published_or_created_at, current_administrateur.default_zones), :id, :label do |b|
|
||||||
|
.fr-fieldset__element
|
||||||
|
.fr-checkbox-group
|
||||||
|
= b.check_box
|
||||||
|
= b.label class: "fr-label"
|
||||||
|
|
||||||
.procedure-form__actions.sticky--bottom
|
.procedure-form__actions.sticky--bottom
|
||||||
.actions-right
|
.actions-right
|
||||||
= link_to 'Annuler', admin_procedure_path(id: @procedure), class: 'button', data: { confirm: 'Êtes-vous sûr de vouloir annuler les modifications effectuées ?'}
|
= link_to 'Annuler', admin_procedure_path(id: @procedure), class: 'fr-btn fr-btn--tertiary fr-mr-2w', data: { confirm: 'Êtes-vous sûr de vouloir annuler les modifications effectuées ?'}
|
||||||
= f.button 'Enregistrer', class: 'button primary send'
|
= f.button 'Enregistrer', class: 'fr-btn fr-btn--primary'
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ describe 'As an administrateur I wanna clone a procedure', js: true, retry: 3 do
|
||||||
|
|
||||||
# select zone
|
# select zone
|
||||||
find("#zones .fr-btn").click
|
find("#zones .fr-btn").click
|
||||||
check Zone.last.current_label
|
check Zone.last.current_label, allow_label_click: true
|
||||||
click_on 'Enregistrer'
|
click_on 'Enregistrer'
|
||||||
|
|
||||||
# then publish
|
# then publish
|
||||||
|
@ -82,7 +82,7 @@ describe 'As an administrateur I wanna clone a procedure', js: true, retry: 3 do
|
||||||
|
|
||||||
# select zone
|
# select zone
|
||||||
find("#zones .fr-btn").click
|
find("#zones .fr-btn").click
|
||||||
check Zone.last.current_label
|
check Zone.last.current_label, allow_label_click: true
|
||||||
click_on 'Enregistrer'
|
click_on 'Enregistrer'
|
||||||
|
|
||||||
# then publish
|
# then publish
|
||||||
|
|
Loading…
Reference in a new issue