samba: Fix javascript constant redeclaration error

Related to #1715

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
Veiko Aasa 2019-12-02 18:09:33 +03:00 committed by Joseph Nuthalapati
parent 06b4a447c6
commit 9d20875b03
No known key found for this signature in database
GPG Key ID: 5398F00A2FA43C35

View File

@ -21,10 +21,13 @@
* in this page.
*/
const share_checkbox = $(".shareform > input[type='checkbox']");
share_checkbox.change(function(event) {
$(document).on('turbolinks:load', function() {
const share_checkbox = $(".shareform > input[type='checkbox']");
share_checkbox.change(function(event) {
this.disabled=true;
this.style.cursor='wait';
this.form.submit();
});
});