]> git.mxchange.org Git - friendica-addons.git/commitdiff
[js_upload] Restore public image upload
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 1 Dec 2019 21:33:19 +0000 (16:33 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 1 Dec 2019 21:33:19 +0000 (16:33 -0500)
js_upload/templates/js_upload.tpl

index 4f0ad14fb0232b210e3afd0541d8e3357f35e137..f45b495c62ad7f0926d59328acc65e0d3122d157 100644 (file)
                                let newalbumElm = document.getElementById('photos-upload-newalbum');
                                let albumElm = document.getElementById('photos-upload-album-select');
 
+                               let contact_allow = document.querySelector('[name="contact_allow"]:not(:disabled)');
+                               let group_allow = document.querySelector('[name="group_allow"]:not(:disabled)');
+                               let contact_deny = document.querySelector('[name="contact_deny"]:not(:disabled)');
+                               let group_deny = document.querySelector('[name="group_deny"]:not(:disabled)');
+
                                uploader.setParams({
                                        newalbum      : newalbumElm ? newalbumElm.value : '',
                                        album         : albumElm ? albumElm.value : '',
                                        not_visible   : document.getElementById('photos-upload-noshare').checked,
-                                       contact_allow : document.querySelector('[name="contact_allow"]').value,
-                                       group_allow   : document.querySelector('[name="group_allow"]').value,
-                                       contact_deny  : document.querySelector('[name="contact_deny"]').value,
-                                       group_deny    : document.querySelector('[name="group_deny"]').value,
+                                       contact_allow : contact_allow ? contact_allow.value : '',
+                                       group_allow   : group_allow   ? group_allow.value   : '',
+                                       contact_deny  : contact_deny  ? contact_deny.value  : '',
+                                       group_deny    : group_deny    ? group_deny.value    : '',
                                });
                        }
                });