Skip to content

Commit

Permalink
cms_form: fix master/slave JS
Browse files Browse the repository at this point in the history
Hide the whole field block.
Fixes 2 issues:
* ensure field tech name matches
* hide the whole block, not just the input
  • Loading branch information
simahawk committed Sep 18, 2023
1 parent 99e456f commit 40707c6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cms_form/static/src/js/master_slave.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,10 @@ odoo.define("cms_form.master_slave", function (require) {
});
},
handle_hide: function (slave_fname) {
$('[name="' + slave_fname + '"]')
.closest(".form-group")
.hide();
$(".field-" + slave_fname).hide();
},
handle_show: function (slave_fname) {
$('[name="' + slave_fname + '"]')
.closest(".form-group")
.show();
$(".field-" + slave_fname).show();
},
handle_readonly: function (slave_fname) {
$('[name="' + slave_fname + '"]')
Expand Down

0 comments on commit 40707c6

Please sign in to comment.