Sha256: b1ceaee3d03dc65ee71249f8b060245e6b1246d71ab33651c885042c315982de

Contents?: true

Size: 555 Bytes

Versions: 10

Compression:

Stored size: 555 Bytes

Contents

$(() => {
  window.DecidimProposals = window.DecidimProposals || {};

  window.DecidimProposals.bindProposalAddress = () => {
    const $checkbox = $("#proposal_has_address");
    const $addressInput = $("#address_input");

    if ($checkbox.length > 0) {
      const toggleInput = () => {
        if ($checkbox[0].checked) {
          $addressInput.show();
        } else {
          $addressInput.hide();
        }
      }
      toggleInput();
      $checkbox.on("change", toggleInput);
    }
  };

  window.DecidimProposals.bindProposalAddress();
});

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
decidim-proposals-0.13.1 app/assets/javascripts/decidim/proposals/add_proposal.js.es6
decidim-proposals-0.12.2 app/assets/javascripts/decidim/proposals/add_proposal.js.es6
decidim-proposals-0.13.0 app/assets/javascripts/decidim/proposals/add_proposal.js.es6
decidim-proposals-0.12.1 app/assets/javascripts/decidim/proposals/add_proposal.js.es6
decidim-proposals-0.13.0.pre1 app/assets/javascripts/decidim/proposals/add_proposal.js.es6
decidim-proposals-0.12.0 app/assets/javascripts/decidim/proposals/add_proposal.js.es6
decidim-proposals-0.11.2 app/assets/javascripts/decidim/proposals/add_proposal.js.es6
decidim-proposals-0.12.0.pre app/assets/javascripts/decidim/proposals/add_proposal.js.es6
decidim-proposals-0.11.1 app/assets/javascripts/decidim/proposals/add_proposal.js.es6
decidim-proposals-0.11.0.pre1 app/assets/javascripts/decidim/proposals/add_proposal.js.es6