Merge "jquery.tablesorter: Silence an expected "sort-rowspan-error" warning"
[mediawiki.git] / resources / src / mediawiki.misc-authed-ooui / special.mute.js
blobec637d81b74e93fb8652368e1512ea99713e8049
1 ( function () {
2 'use strict';
4 $( () => {
5 const $inputs = $( '#mw-specialmute-form input[type="checkbox"]' ),
6 $saveButton = $( '#save' );
8 function isFormChanged() {
9 return $inputs.is( function () {
10 return this.checked !== this.defaultChecked;
11 } );
14 if ( $saveButton.length ) {
15 const saveButton = OO.ui.infuse( $saveButton );
16 saveButton.setDisabled( !isFormChanged() );
18 $inputs.on( 'change', () => {
19 saveButton.setDisabled( !isFormChanged() );
20 } );
22 } );
23 }() );