Sha256: 04e8c7b75765e82ac904070a35973dd5242670d0e631bd31fc50871911609179
Contents?: true
Size: 1.39 KB
Versions: 37
Compression:
Stored size: 1.39 KB
Contents
import createFieldDependentInputs from "src/decidim/admin/field_dependent_inputs.component" $(() => { const $assemblyMemberType = $("#assembly_member_existing_user"); createFieldDependentInputs({ controllerField: $assemblyMemberType, wrapperSelector: ".user-fields", dependentFieldsSelector: ".user-fields--full-name", dependentInputSelector: "input", enablingCondition: ($field) => { return $field.val() === "false" } }); createFieldDependentInputs({ controllerField: $assemblyMemberType, wrapperSelector: ".user-fields", dependentFieldsSelector: ".user-fields--non-user-avatar", dependentInputSelector: "input", enablingCondition: ($field) => { return $field.val() === "false" } }); createFieldDependentInputs({ controllerField: $assemblyMemberType, wrapperSelector: ".user-fields", dependentFieldsSelector: ".user-fields--user-picker", dependentInputSelector: "input", enablingCondition: ($field) => { return $field.val() === "true" } }); const $assemblyMemberPosition = $("#assembly_member_position"); createFieldDependentInputs({ controllerField: $assemblyMemberPosition, wrapperSelector: ".position-fields", dependentFieldsSelector: ".position-fields--position-other", dependentInputSelector: "input", enablingCondition: ($field) => { return $field.val() === "other" } }); })
Version data entries
37 entries across 37 versions & 1 rubygems