Sha256: 6b5c5039a47808cf55aad97dc41ddeaf3f8b9c8023e0fdac2afc56c1ceb56622
Contents?: true
Size: 710 Bytes
Versions: 8
Compression:
Stored size: 710 Bytes
Contents
$(() => { const { attachGeocoding } = window.Decidim; window.DecidimProposals = window.DecidimProposals || {}; window.DecidimProposals.bindProposalAddress = () => { const $checkbox = $("input:checkbox[name$='[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); } if ($addressInput.length > 0) { attachGeocoding($("input", $addressInput)); } }; window.DecidimProposals.bindProposalAddress(); });
Version data entries
8 entries across 8 versions & 1 rubygems