$CommonFunctions.displayReady($description)
|
#set ($clientSide = true)
#parse("numbervalidation.vm")
#if ($formsVector.size() == 0)
$CommonFunctions.displayTermFromResourceBundle($currentUserId,"ProjectDialogs","wizard.questionspage.noapplicableforms.message")
|
#end
#set ($reqIndex = 0)
#set ($formIndex = 0)
#foreach ($legaMF in $formsVector)
#set ($formID = $legaMF.getLegaFormId())
#set ($questionsTable = $legaMF.getQuestionVector())
#if ($questionsTable.size() != 0)
#if ($formIndex != 1)
|
#end
$CommonFunctions.displayReady($legaMF.getName())
|
#if ($legaMF.getDescription().length() > 0)
|
#end
#if ($legaMF.getInstructions().length() != 0)
|
#end
#set ($layoutQuestionList = $CommonFunctions.getFormLayoutInfo($legaMF.getLegaFormId()))
#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)
#set ($formIndex = $formIndex + 1)
#foreach ($legaQuestion in $questionsTable)
#set ($question = $legaQuestion.getQuestionHelper())
#set ($isProjName = $question.getQuestion().getLegaResponseTypeId().equals("000000000120"))
#set ($isProjDesc = $question.getQuestion().getLegaResponseTypeId().equals("000000000030"))
#set ($isDocument = $question.getQuestion().getLegaResponseTypeId().equals("000000000016"))
#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("2000"))
#set ($isProjOwner = $question.getQuestion().getLegaResponseTypeId().equals("000000000113"))
#set ($isProjRequestor = $question.getQuestion().getLegaResponseTypeId().equals("000000000110"))
#set ($isProjSponsor = $question.getQuestion().getLegaResponseTypeId().equals("000000000114"))
#set ($isProjSubmitted = $question.getQuestion().getLegaResponseTypeId().equals("000000000111"))
#set ($isProjPM = $question.getQuestion().getLegaResponseTypeId().equals("000000000112"))
#set ($isProjMembers = $question.getQuestion().getLegaResponseTypeId().equals("000000000115"))
#set ($isProjAssoc = $isProjRequestor || $isProjSubmitted || $isProjPM || $isProjOwner || $isProjSponsor || $isProjMembers)
#set ($hasStatusResponse = $question.getQuestion().getLegaResponseTypeId().equals("000000000010"))
#set ($skip = ($isProjName) || ($isProjDesc) || ($isProjType) || ($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.categoryApplicableForType($applicableCatId, $investmentTypeID))
#set ($notApplicableCC = true)
#end
#end
#if ($groupItemCounter == 0)
#end
#if ($layoutCounter == 1)
#end
#if (!$skip && !$notApplicableCC)
#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 ($isRequiredQuestion) #end
|
$CommonFunctions.displayReady($question.getQuestion().getQuestion())
|
#if ($question.getQuestion().getInstructions().length() > 0)
|
#end
#if ( $question.getQuestion().getLegaResponseTypeId().equals("000000000001") || $question.getQuestion().getLegaResponseTypeId().equals("000000000201") || $isProjCostPlanned || $isProjCostSpent || $isProjMHPlanned || $isProjMHSpent)
#parse("responsetypenumeric.vm")
#elseif ($question.getQuestion().getLegaResponseTypeId().compareTo("000000000015") == 0)
#parse("responsetypedate.vm")
#elseif ($isProjStart)
#parse("responsetypestartdate.vm")
#elseif ($isDocument)
#parse("responsetypedocument.vm")
#elseif ($isProjCompletion)
#parse("responsetypecompletiondate.vm")
#elseif ($isProjDept)
#parse("responsetypedepartment.vm")
#elseif ($question.getQuestion().getLegaResponseTypeId().equals("000000000012"))
#parse("responsetypetype.vm")
#elseif ($isProjGroup)
#parse("responsetypegroup.vm")
#elseif ($question.getQuestion().getLegaResponseTypeId().equals("000000000010"))
#parse("responsetypestatus.vm")
#elseif ($isProjAssoc)
#parse("responsetypecoredataassociations.vm")
#elseif ($isCustomCat)
#parse("responsetypecustomcategories.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")
#end
|
#else
|
$CommonFunctions.displayReady($question.getQuestion().getQuestion())
|
$CommonFunctions.displayTermFromResourceBundle($currentUserId,"ProjectDialogs","wizard.questionspage.questioncantbeanswered")
|
|
#end
#elseif ($notApplicableCC)
|
$CommonFunctions.displayTermFromResourceBundle($currentUserId,"ProjectDialogs","wizard.questionspage.categorynotapplicable")
$CommonFunctions.displayReady($question.getQuestion().getQuestion())
|
|
#else
|
$duplicatequestion_text
$CommonFunctions.displayReady($question.getQuestion().getQuestion())
|
|
#end
#set ($groupItemCounter = $groupItemCounter + 1)
#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
|
|
#end
#end
|
|
|
|