You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2016/06/23 06:45:28 UTC

svn commit: r1749845 - in /ofbiz/trunk/applications/content: groovyScripts/survey/EditSurveyQuestions.groovy template/survey/EditSurveyQuestions.ftl

Author: ashish
Date: Thu Jun 23 06:45:28 2016
New Revision: 1749845

URL: http://svn.apache.org/viewvc?rev=1749845&view=rev
Log:
Applied patch from jira issue OFBIZ-7527 - Questions from category should not come to apply on survey when creating/editing any question.
Thanks Ravi for the contribution.

Modified:
    ofbiz/trunk/applications/content/groovyScripts/survey/EditSurveyQuestions.groovy
    ofbiz/trunk/applications/content/template/survey/EditSurveyQuestions.ftl

Modified: ofbiz/trunk/applications/content/groovyScripts/survey/EditSurveyQuestions.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/groovyScripts/survey/EditSurveyQuestions.groovy?rev=1749845&r1=1749844&r2=1749845&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/groovyScripts/survey/EditSurveyQuestions.groovy (original)
+++ ofbiz/trunk/applications/content/groovyScripts/survey/EditSurveyQuestions.groovy Thu Jun 23 06:45:28 2016
@@ -62,7 +62,7 @@ if (surveyQuestion && surveyQuestion.sur
 surveyQuestionCategoryId = parameters.surveyQuestionCategoryId;
 surveyQuestionCategory = null;
 categoryQuestions = null;
-if (surveyQuestionCategoryId) {
+if (surveyQuestionCategoryId && "Y".equals(parameters.applyQuestionFromCategory)) {
     surveyQuestionCategory = from("SurveyQuestionCategory").where("surveyQuestionCategoryId", surveyQuestionCategoryId).queryOne();
     if (surveyQuestionCategory) {
         categoryQuestions = surveyQuestionCategory.getRelated("SurveyQuestion", null, null, false);

Modified: ofbiz/trunk/applications/content/template/survey/EditSurveyQuestions.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/template/survey/EditSurveyQuestions.ftl?rev=1749845&r1=1749844&r2=1749845&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/template/survey/EditSurveyQuestions.ftl (original)
+++ ofbiz/trunk/applications/content/template/survey/EditSurveyQuestions.ftl Thu Jun 23 06:45:28 2016
@@ -215,6 +215,7 @@ under the License.
   <div class="screenlet-body">
       <form method="post" action="<@o...@ofbizUrl>">
         <input type="hidden" name="surveyId" value="${requestParameters.surveyId}"/>
+        <input type="hidden" name="applyQuestionFromCategory" value="Y"/>
         <select name="surveyQuestionCategoryId">
           <#list questionCategories as category>
             <option value="${category.surveyQuestionCategoryId}">${category.description?default("??")} [${category.surveyQuestionCategoryId}]</option>