fix linter
This commit is contained in:
parent
7fcc892398
commit
8df0147fd1
3 changed files with 6 additions and 5 deletions
|
@ -266,7 +266,8 @@ ul.dropdown-items {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make child links fill the whole clickable area
|
// Make child links fill the whole clickable area
|
||||||
> a, .dropdown-items-link {
|
> a,
|
||||||
|
.dropdown-items-link {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
margin: -$default-padding;
|
margin: -$default-padding;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
= form_for(BatchOperation.new, url: instructeur_batch_operations_path(procedure_id: procedure.id), method: :post, html: { class: 'flex justify-end', id: "#{dom_id(BatchOperation.new)}" }, data: { "batch-operation-target" => "form"}) do |form|
|
= form_for(BatchOperation.new, url: instructeur_batch_operations_path(procedure_id: procedure.id), method: :post, html: { class: 'flex justify-end', id: "#{dom_id(BatchOperation.new)}" }, data: { "batch-operation-target" => "form"}) do |form|
|
||||||
= form.button opt[:label], class: ['fr-btn fr-btn--icon-left', icons[opt[:operation].to_sym]], disabled: :disabled, name: "#{form.object_name}[operation]", data: { "batch-operation-target" => "submit", "submitter-operation" => opt[:operation] }
|
= form.button opt[:label], class: ['fr-btn fr-btn--icon-left', icons[opt[:operation].to_sym]], disabled: :disabled, name: "#{form.object_name}[operation]", data: { "batch-operation-target" => "submit", "submitter-operation" => opt[:operation] }
|
||||||
|
|
||||||
-else
|
- else
|
||||||
.flex.justify-end
|
.flex.justify-end
|
||||||
.dropdown{ data: { controller: 'menu-button', popover: 'true' } }
|
.dropdown{ data: { controller: 'menu-button', popover: 'true' } }
|
||||||
-# Dropdown button title
|
-# Dropdown button title
|
||||||
|
@ -19,12 +19,12 @@
|
||||||
- if opt[:operation] == 'accepter'
|
- if opt[:operation] == 'accepter'
|
||||||
.wrapper
|
.wrapper
|
||||||
|
|
||||||
%a{ href: '#', class: 'dropdown-items-link', onclick: "DS.showMotivation(event, 'accept');" }
|
%a.dropdown-items-link{ href: '#', onclick: "DS.showMotivation(event, 'accept');" }
|
||||||
%span{ class: icons[opt[:operation].to_sym] }
|
%span{ class: icons[opt[:operation].to_sym] }
|
||||||
.dropdown-description
|
.dropdown-description
|
||||||
%h4= opt[:label]
|
%h4= opt[:label]
|
||||||
|
|
||||||
.motivation.hidden{ class: 'accept' }
|
.motivation.hidden.accept
|
||||||
= form.text_area :motivation, class: 'motivation-text-area'
|
= form.text_area :motivation, class: 'motivation-text-area'
|
||||||
.optional-justificatif{ id: "justificatif_motivation_suggest_accept", onclick: "DS.showImportJustificatif('accept');" }
|
.optional-justificatif{ id: "justificatif_motivation_suggest_accept", onclick: "DS.showImportJustificatif('accept');" }
|
||||||
.button Ajouter un justificatif (optionnel)
|
.button Ajouter un justificatif (optionnel)
|
||||||
|
|
|
@ -38,7 +38,7 @@ export class BatchOperationController extends ApplicationController {
|
||||||
|
|
||||||
toggleSubmitButtonWhenNeeded() {
|
toggleSubmitButtonWhenNeeded() {
|
||||||
const available = this.inputTargets.some((e) => e.checked);
|
const available = this.inputTargets.some((e) => e.checked);
|
||||||
const dropdown = document.querySelector("#batch_operation_dropdown");
|
const dropdown = document.querySelector('#batch_operation_dropdown');
|
||||||
if (available) {
|
if (available) {
|
||||||
this.submitTargets.forEach((e) => e.removeAttribute('disabled'));
|
this.submitTargets.forEach((e) => e.removeAttribute('disabled'));
|
||||||
if (dropdown) {
|
if (dropdown) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue