#1261: fix the error upon importing template in forms

Changes in the behaviour:
- Load the parameter from allowing anonymous answers from templates
- Load the parameter for enforcing anonymous answers from templates
This commit is contained in:
Fabrice Mouhartem 2023-11-10 14:31:55 +01:00
parent 714f017397
commit 17310c7dec

View File

@ -924,7 +924,14 @@ define([
delete meta.cursor;
if (meta.type === "form") {
// Keep anonymous and makeAnonymous values from templates
var anonymous = parsed.answers.anonymous || false;
var makeAnonymous = parsed.answers.makeAnonymous || false;
delete parsed.answers;
parsed.answers = {
anonymous: anonymous,
makeAnonymous: makeAnonymous
};
}
}
};