X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/4621d8bcc51d2cba552055151ae6696348231b54..refs/pull/5280/head:/resources/js/components/webhook-events.js diff --git a/resources/js/components/webhook-events.js b/resources/js/components/webhook-events.js index 54080d36e..68661972d 100644 --- a/resources/js/components/webhook-events.js +++ b/resources/js/components/webhook-events.js @@ -1,14 +1,14 @@ - /** * Webhook Events * Manages dynamic selection control in the webhook form interface. - * @extends {Component} */ -class WebhookEvents { +import {Component} from './component'; + +export class WebhookEvents extends Component { setup() { this.checkboxes = this.$el.querySelectorAll('input[type="checkbox"]'); - this.allCheckbox = this.$refs.all; + this.allCheckbox = this.$el.querySelector('input[type="checkbox"][value="all"]'); this.$el.addEventListener('change', event => { if (event.target.checked && event.target === this.allCheckbox) { @@ -28,5 +28,3 @@ class WebhookEvents { } } - -export default WebhookEvents; \ No newline at end of file