#set ($categorynotapplicable_text = $CommonFunctions.displayTermFromResourceBundle($currentUserId, "ProjectDialogs", "questionresponse.categorynotapplicable"))
#set ($duplicatequestion_text = $CommonFunctions.displayTermFromResourceBundle($currentUserId, "ProjectDialogs", "questionresponse.duplicatequestion"))
#set ($requiresquestion_text = $CommonFunctions.displayTermFromResourceBundle($currentUserId, "ProjectDialogs", "wizard.questionspage.requiresquestion.hint"))
#parse("questiondependency.vm")
#set ($clientSide = true)
#parse("numbervalidation.vm")
#set ($formID = $legaMF.getLegaFormId())
#set ($questionsTable = $legaMF.getQuestionVector())
#if ($questionsTable.size() > 0)
#if (!$singleQuestionResponse)
$CommonFunctions.displayReady($legaMF.getName())
|
#if ($legaMF.getDescription().length() > 0)
|
#end
#if ($legaMF.getInstructions().length() != 0)
|
#end
#end
#set ($reqIndex = 0)
#set ($statusQuestionAlreadyAsked = false)
#set ($layoutCounter = 1)
#set ($groupItemCounter = 0)
#set ($activeGroupIndex = 0)
#set ($groupLayout = $layoutQuestionList.get($activeGroupIndex).get(0))
#set ($groupLimit = $layoutQuestionList.get($activeGroupIndex).get(1))
#set ($width = 100 / $groupLayout)
#foreach($legaQuestion in $questionsTable)
#set ($question = $legaQuestion.getQuestionHelper())
#set ($isProjName = $question.getQuestion().getLegaResponseTypeId().equals("000000000120"))
#set ($isProjDesc = $question.getQuestion().getLegaResponseTypeId().equals("000000000030"))
#set ($isProjType = $question.getQuestion().getLegaResponseTypeId().equals("000000000012"))
#set ($isProjDept = $question.getQuestion().getLegaResponseTypeId().equals("000000000011"))
#set ($isProjGroup = $question.getQuestion().getLegaResponseTypeId().equals("000000000013"))
#set ($isProjStatus = $question.getQuestion().getLegaResponseTypeId().equals("000000000010"))
#set ($isConfidential = $question.getQuestion().getLegaResponseTypeId().equals("000000000102"))
#set ($isProjCompletion = $question.getQuestion().getLegaResponseTypeId().equals("000000000021"))
#set ($isProjCostPlanned = $question.getQuestion().getLegaResponseTypeId().equals("000000000022"))
#set ($isProjCostSpent = $question.getQuestion().getLegaResponseTypeId().equals("000000000023"))
#set ($isProjMHSpent = $question.getQuestion().getLegaResponseTypeId().equals("000000000025"))
#set ($isProjMHPlanned = $question.getQuestion().getLegaResponseTypeId().equals("000000000024"))
#set ($isProjStart = $question.getQuestion().getLegaResponseTypeId().equals("000000000020"))
#set ($isCustomCat = $question.getQuestion().getLegaResponseTypeId().startsWith("20000000"))
#set ($isDocument = $question.getQuestion().getLegaResponseTypeId().equals("000000000016"))
#set ($isProjRequestor = $question.getQuestion().getLegaResponseTypeId().equals("000000000110"))
#set ($isProjSubmitted = $question.getQuestion().getLegaResponseTypeId().equals("000000000111"))
#set ($isProjPM = $question.getQuestion().getLegaResponseTypeId().equals("000000000112"))
#set ($isProjOwner = $question.getQuestion().getLegaResponseTypeId().equals("000000000113"))
#set ($isProjSponsor = $question.getQuestion().getLegaResponseTypeId().equals("000000000114"))
#set ($isProjMembers = $question.getQuestion().getLegaResponseTypeId().equals("000000000115"))
#set ($isProjAssoc = $isProjRequestor || $isProjSubmitted || $isProjPM || $isProjOwner || $isProjSponsor || $isProjMembers)
#set ($skip = ($isProjDesc && $hasProjDesc) || ($isProjType && $hasProjType) || ($isProjDept && $hasProjDept) || ($isProjGroup && $hasProjGroup) || ($isProjStatus && $hasProjStatus) || ($isProjOwner && $hasProjOwner) || ($isProjRequestor && $hasProjRequestor) || ($isProjSponsor && $hasProjSponsor) || ($isProjMembers && $hasProjMembers) || ($isProjSubmitted && $hasProjSubmitted) || ($isProjPM && $hasProjPM) || ($isConfidential && $hasConfidential) || ($isProjCompletion && $hasProjCompletion) || ($isProjCostPlanned && $hasProjCostPlanned) || ($isProjCostSpent && $hasProjCostSpent) || ($isProjMHSpent && $hasProjMHSpent) || ($isProjMHPlanned && $hasProjMHPlanned) || ($isProjStart && $hasProjStart) || ($isCustomCat && $ccVector.indexOf($question.getQuestion().getLegaResponseTypeId()) != -1))
#set ($notApplicableCC = false)
#if ($isCustomCat)
#set ($applicableCatId = "0")
#set ($applicableCatId = $applicableCatId.concat($question.getQuestion().getLegaResponseTypeId().substring(1)))
#if (!$CommonFunctions.categoryApplicableForProject($applicableCatId, $project.getId()))
#set ($notApplicableCC = true)
#end
#end
#if ($groupItemCounter == 0)
#end
#if ($layoutCounter == 1)
#end
#set ($isHeader = $question.getQuestion().getLegaResponseTypeId().equals("100000000001"))
#if ($legaQuestion.getAnsweredAbove().length() == 0)
#set ($responseValueList = $question.getResponseValues())
#set ($questionID = $question.getQuestion().getLegaQuestionId())
#set ($isRequiredQuestion = $question.getQuestion().getRequired().equals("TRUE"))
#set ($isRequired = $isRequiredQuestion && ($legaMF.getResponseOptions().indexOf("ALLOWSAVE") == -1))
#if ($isRequired)
#set ($reqIndex = $reqIndex + 1)
#end
|
#if (!$skip && !$notApplicableCC)
#if ($isRequiredQuestion) #end
|
|
#if ($question.getQuestion().getInstructions().length() > 0)
|
#end
#end
#if (!$skip && !$notApplicableCC)
#if ( $question.getQuestion().getLegaResponseTypeId().equals("000000000001") || $question.getQuestion().getLegaResponseTypeId().equals("000000000201") || ($isProjCostPlanned) || ($isProjCostSpent) || ($isProjMHPlanned) || ($isProjMHSpent))
#parse("responsetypenumeric.vm")
#elseif ($isProjDesc)
#parse("responsetypedescription.vm")
#elseif ($question.getQuestion().getLegaResponseTypeId().compareTo("000000000015") == 0)
#parse("responsetypedate.vm")
#elseif ($isProjStart)
#parse("responsetypestartdate.vm")
#elseif ($isDocument)
#parse("responsetypedocument.vm")
#elseif ($isProjCompletion)
#set ($hasProjCompletion = true)
#parse("responsetypecompletiondate.vm")
#elseif ($isProjDept)
#parse("responsetypedepartment.vm")
#elseif ($isProjType)
#parse("responsetypetype.vm")
#elseif ($isProjGroup)
#parse("responsetypegroup.vm")
#elseif ($isProjStatus)
#parse("responsetypestatus.vm")
#elseif ($question.getQuestion().getLegaResponseTypeId().compareTo("000000000007") == 0)
#parse("responsetypetext.vm")
#elseif ($question.getQuestion().getLegaResponseTypeId().compareTo("000000000101") == 0)
#parse("responsetypesingleline.vm")
#elseif ($question.getQuestion().getLegaResponseTypeId().compareTo("000000000002") == 0)
#parse("responsetypeboolean.vm")
#elseif ($isConfidential)
#parse("responsetypeconfidentiality.vm")
#elseif ($question.getQuestion().getLegaResponseTypeId().compareTo("000000000003") == 0)
#parse("responsetypeobjective.vm")
#elseif ($question.getQuestion().getLegaResponseTypeId().compareTo("000000000004") == 0)
#parse("responsetypeuser.vm")
#elseif ($question.getQuestion().getLegaResponseTypeId().compareTo("000000000005") == 0)
#parse("responsetypeproject.vm")
#elseif ($question.getQuestion().getLegaResponseTypeId().compareTo("000000000008") == 0)
#parse("responsetypecustom.vm")
#elseif ($question.getQuestion().getLegaResponseTypeId().compareTo("000000000006") == 0)
#parse("responsetypecustommulti.vm")
#elseif ($question.getQuestion().getLegaResponseTypeId().compareTo("000000000009") == 0)
#parse("responsetypetimebased.vm")
#elseif ($question.getQuestion().getLegaResponseTypeId().compareTo("000000000010") == 0)
#parse("responsetypecoredatastatus.vm")
#elseif ($isProjAssoc)
#parse("responsetypecoredataassociations.vm")
#elseif ($isCustomCat)
#parse("responsetypecustomcategories.vm")
#elseif ($isProjName)
#parse("responsetypeprojectname.vm")
#end
#elseif ($notApplicableCC)
$categorynotapplicable_text
$CommonFunctions.displayReady($question.getQuestion().getQuestion())
|
#else
$duplicatequestion_text
$CommonFunctions.displayReady($question.getQuestion().getQuestion())
|
#end
#else
$CommonFunctions.displayReady($question.getQuestion().getQuestion())
|
$CommonFunctions.displayReady($legaQuestion.getAnsweredAbove())
|
#end
|
#set ($groupItemCounter = $groupItemCounter + 1)
#set ($doneWithGroup = ($groupItemCounter >= $groupLimit))
#if ($groupItemCounter >= $groupLimit)
#set( $whileloop = [1,2,3,4,5] )
#set ($c = $layoutCounter)
#foreach($loop in $whileloop)
#if ($c < $groupLayout)
|
#set ($c = $c + 1)
#end
#end
|
#set ($activeGroupIndex = $activeGroupIndex + 1)
#if ($activeGroupIndex < $layoutQuestionList.size())
#set ($groupLayout = $layoutQuestionList.get($activeGroupIndex).get(0))
#set ($groupLimit = $layoutQuestionList.get($activeGroupIndex).get(1))
#set ($width = 100 / $groupLayout)
#end
#set ($groupItemCounter = 0)
#set ($layoutCounter = 1)
#else
#set ($layoutCounter = $layoutCounter + 1)
#if ($layoutCounter > $groupLayout)
#set ($layoutCounter = 1)
#end
#end
#end
|
|