diff --git a/plinth/modules/samba/static/samba.js b/plinth/modules/samba/static/samba.js index cc117d558..9fd6f45e1 100644 --- a/plinth/modules/samba/static/samba.js +++ b/plinth/modules/samba/static/samba.js @@ -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(); + }); });