mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Add new setting when creating survey
This commit is contained in:
		@@ -275,6 +275,14 @@ ComunicWeb.components.posts.form = {
 | 
				
			|||||||
			multiple: true,
 | 
								multiple: true,
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// Specify whether anyone can add suggestions to the survey or not
 | 
				
			||||||
 | 
							const allowNewChoicesInput = createFormGroup({
 | 
				
			||||||
 | 
								target: surveyForm,
 | 
				
			||||||
 | 
								type: "checkbox",
 | 
				
			||||||
 | 
								label: tr("Allow everyone to add new answers after the creation of the survey"),
 | 
				
			||||||
 | 
								checked: false
 | 
				
			||||||
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		//Survey message help
 | 
							//Survey message help
 | 
				
			||||||
		var surveyAnswerHelper = createElem2({
 | 
							var surveyAnswerHelper = createElem2({
 | 
				
			||||||
			appendTo: surveyForm,
 | 
								appendTo: surveyForm,
 | 
				
			||||||
@@ -536,6 +544,7 @@ ComunicWeb.components.posts.form = {
 | 
				
			|||||||
				datas.append("kind", "survey");
 | 
									datas.append("kind", "survey");
 | 
				
			||||||
				datas.append("question", surveyQuestionInput.value);
 | 
									datas.append("question", surveyQuestionInput.value);
 | 
				
			||||||
				datas.append("answers", answers.join("<>"));
 | 
									datas.append("answers", answers.join("<>"));
 | 
				
			||||||
 | 
									datas.append("allowNewAnswers", allowNewChoicesInput.checked);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user