client: update the markup for the "Available MIME types" check boxes

This commit is contained in:
Adorian Doran 2025-01-17 01:36:54 +02:00
parent e8f6f68987
commit faa4a5fcd8

View File

@ -92,10 +92,13 @@ export default class CodeMimeTypesOptions extends OptionsWidget {
#buildSelectionForMimeType(mimeType: MimeType) {
const id = "code-mime-type-" + idCtr++;
return $("<li>")
const checkbox = $("<label>")
.append($('<input type="checkbox" class="form-check-input">').attr("id", id).attr("data-mime-type", mimeType.mime).prop("checked", mimeType.enabled))
.on("change", () => this.save())
.append(" &nbsp; ")
.append($("<label>").attr("for", id).text(mimeType.title));
.append(mimeType.title)
return $("<li>")
.append(checkbox);
}
}