removed error logs from the javascript and added curly braces
This commit is contained in:
@@ -10,18 +10,16 @@ function ${ id }_load() {
|
||||
$.each($("[id^=input_${ id }_]"), function(index,value){
|
||||
if (value.type==="radio" || value.type==="checkbox"){
|
||||
if (value.checked) {
|
||||
console.log("adding a radio or checkbox value");
|
||||
if (typeof submit_data[value.name] == 'undefined')
|
||||
if (typeof submit_data[value.name] == 'undefined'){
|
||||
submit_data[value.name]=[]
|
||||
}
|
||||
submit_data[value.name]+=value.value;
|
||||
}
|
||||
}
|
||||
else{
|
||||
console.log("adding a standard value");
|
||||
submit_data[value.id]=value.value;
|
||||
}
|
||||
});
|
||||
console.log(submit_data)
|
||||
postJSON('/modx/problem/${ id }/problem_check',
|
||||
submit_data,
|
||||
function(json) {
|
||||
|
||||
Reference in New Issue
Block a user