Improve geo_node_form.js

parent 1d99729b
export default class GeoNodeForm {
constructor(container) {
this.$container = $(container);
this.$container = container;
this.$namespaces = this.$container.find(".js-namespaces");
this.$namespacesSelect = this.$namespaces.find('.select2');
this.$primaryCheckbox = this.$container.find("input[type='checkbox']");
......@@ -9,11 +9,6 @@ export default class GeoNodeForm {
onPrimaryCheckboxChange(event) {
this.$namespacesSelect.select2('data', null);
if (this.$primaryCheckbox.is(':checked')) {
this.$namespaces.addClass('hidden');
} else {
this.$namespaces.removeClass('hidden');
}
this.$namespaces.toggleClass('hidden', this.$primaryCheckbox.is(':checked'))
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment