- function updateChangeset(form, method, url, include_data) {
- $(form).find("input[type=submit]").prop("disabled", true);
- if(include_data) {
- data = {text: $(form.text).val()};
- } else {
- data = {};
+ function updateChangeset(method, url, include_data) {
+ const data = new URLSearchParams();
+
+ content.find("#comment-error").prop("hidden", true);
+ content.find("button[data-method][data-url]").prop("disabled", true);
+
+ if (include_data) {
+ data.set("text", content.find("textarea").val());