Skip to content
Snippets Groups Projects
Commit cbc2bf90 authored by Johannes Wolf's avatar Johannes Wolf
Browse files

fix empty forms in evaluation edit throwing errors

parent 63b3d05f
Branches
No related tags found
No related merge requests found
......@@ -12,8 +12,8 @@
questionnaireChanged = true;
})
roleChanged = ! row.find("input[id$=-role_0]").parent().hasClass("active");
commVisibilityChanged = ! row.find("input[id$=_visibility_0]").parent().hasClass("active");
roleChanged = ! row.find("input[id$=-role_0]").prop("checked");
commVisibilityChanged = ! row.find("input[id$=_visibility_0]").prop("checked");
labelChanged = row.find("input[id$=-label]").val();
return idChanged || nameChanged || questionnaireChanged || roleChanged || commVisibilityChanged || labelChanged;
......
......@@ -27,9 +27,6 @@
// Checkboxes with 'data-keep' need to stay checked.
row.find("input:checkbox:not([data-keep]),:radio").removeAttr("checked");
//Disable active buttons from bootstrap button groups
row.find("label").removeClass("active");
row.find("input:text,textarea").val("");
row.find("select").each(function(){
......@@ -41,7 +38,6 @@
row.find(".btn-group").each(function() {
var inputs = $(this).find("input");
$(inputs[0]).prop("checked", true);
$(inputs[0]).parent().addClass("active");
});
//Remove all error messages
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment