Sha256: fc56e735e4cb06c4e9126c8ba75ec22882d5f307a5211aae3e7598ea3ddb4f2d

Contents?: true

Size: 1 KB

Versions: 6

Compression:

Stored size: 1 KB

Contents

((exports) => {
  const { createFieldDependentInputs } = exports.DecidimAdmin;

  const $participantType = $("#monitoring_committee_member_existing_user");

  createFieldDependentInputs({
    controllerField: $participantType,
    wrapperSelector: ".user-fields",
    dependentFieldsSelector: ".user-fields--email",
    dependentInputSelector: "input",
    enablingCondition: ($field) => {
      return $field.val() === "false"
    }
  });

  createFieldDependentInputs({
    controllerField: $participantType,
    wrapperSelector: ".user-fields",
    dependentFieldsSelector: ".user-fields--name",
    dependentInputSelector: "input",
    enablingCondition: ($field) => {
      return $field.val() === "false"
    }
  });

  createFieldDependentInputs({
    controllerField: $participantType,
    wrapperSelector: ".user-fields",
    dependentFieldsSelector: ".user-fields--user-picker",
    dependentInputSelector: "input",
    enablingCondition: ($field) => {
      return $field.val() === "true"
    }
  });
})(window);

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-elections-0.24.3 app/assets/javascripts/decidim/votings/admin/monitoring_committee_members_form.js.es6
decidim-elections-0.24.2 app/assets/javascripts/decidim/votings/admin/monitoring_committee_members_form.js.es6
decidim-elections-0.24.1 app/assets/javascripts/decidim/votings/admin/monitoring_committee_members_form.js.es6
decidim-elections-0.24.0 app/assets/javascripts/decidim/votings/admin/monitoring_committee_members_form.js.es6
decidim-elections-0.24.0.rc2 app/assets/javascripts/decidim/votings/admin/monitoring_committee_members_form.js.es6
decidim-elections-0.24.0.rc1 app/assets/javascripts/decidim/votings/admin/monitoring_committee_members_form.js.es6