Sha256: d5bd55e515db604719cdd0d17aa7f5000307c7c16ab186dd28e3b9886bbe4956

Contents?: true

Size: 728 Bytes

Versions: 6

Compression:

Stored size: 728 Bytes

Contents

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

  const $debateType = $('[name="debate[finite]"');

  createFieldDependentInputs({
    controllerField: $debateType,
    wrapperSelector: ".debate-fields",
    dependentFieldsSelector: ".debate-fields--open",
    dependentInputSelector: "input",
    enablingCondition: () => {
      return $("#debate_finite_false").is(":checked")
    }
  });

  createFieldDependentInputs({
    controllerField: $debateType,
    wrapperSelector: ".debate-fields",
    dependentFieldsSelector: ".debate-fields--finite",
    dependentInputSelector: "input",
    enablingCondition: () => {
      return $("#debate_finite_true").is(":checked")
    }
  });
})(window);

Version data entries

6 entries across 6 versions & 1 rubygems

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