Sha256: 87a80bd1da948b1552389f59a42c77de68248fcd813ddbed31d2f3890ac0b8b7
Contents?: true
Size: 812 Bytes
Versions: 11
Compression:
Stored size: 812 Bytes
Contents
$(() => { const { attachGeocoding } = window.Decidim; const $form = $(".proposal_form_admin"); if ($form.length > 0) { const $proposalCreatedInMeeting = $form.find("#proposal_created_in_meeting"); const $proposalMeeting = $form.find("#proposal_meeting"); const toggleDisabledHiddenFields = () => { const enabledMeeting = $proposalCreatedInMeeting.prop("checked"); $proposalMeeting.find("select").attr("disabled", "disabled"); $proposalMeeting.hide(); if (enabledMeeting) { $proposalMeeting.find("select").attr("disabled", !enabledMeeting); $proposalMeeting.show(); } }; $proposalCreatedInMeeting.on("change", toggleDisabledHiddenFields); toggleDisabledHiddenFields(); attachGeocoding($form.find("#proposal_address")); } });
Version data entries
11 entries across 11 versions & 1 rubygems