enquete.html.svn-base 14.9 KB
Newer Older
Kim Gyeongeun committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347
#set($title = "アンケート回答")
<!-- preHeader -->
#parse( "/WEB-INF/view/common/preHeader.vm" )
##<!-- JAVASCRIPTはここに記載 -->
<link rel="stylesheet" type="text/css" href="/em/css/jquery.datepick.css" media="all">
<script type="text/javascript" src="/em/js/jquery-1.3.1.min.js"></script>
<script type="text/javascript" src="/em/js/jquery.datepick.js"></script>
<script type="text/javascript" src="/em/js/jquery.datepick-ja.js?20170316"></script>

#set($dateIndex=0)
#foreach($question  in  $!enqueteForm.questionList)

	#if($question.controlId == 5)
		#set($dateIndex = $dateIndex+1)
<script language="javascript" type="text/javascript" charset="utf-8">
		<!--
		//開始日
		$(function() {
		  $("#enqStartFrom${dateIndex}").datepick({showTrigger: "#enqFrom${dateIndex}",
			  yearRange: "$question.yearRange",
			  minDate: "$question.startymd",
			  maxDate: "$question.endymd"});
		});
			// -->
</script>
	#end
#end

<body bgcolor="#B3C9E1" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>


<!-- header -->
<table width="1024"  cellspacing="0" cellpadding="0">
	<tr>
		<TD>#parse( "/WEB-INF/view/common/header.vm" )</TD>
	</tr>
	<tr>
		<TD>
			<table width="1024" border="0" cellspacing="0" cellpadding="0">
				<tr>
			   <td width="25" background="/em/images/shadowlft2.jpg"><img src="/em/images/spacer.gif" width="25" height="1" border="0"></td>
				    <td width="1024" bgcolor="#FFFFFF">
				    <table width="100%" border="0" cellspacing="5" cellpadding="0">
					    <tr>
					        <td align="right" width="155" valign="top">#parse( "/WEB-INF/view/common/menu.vm" )</td>
					        <td align="left" width="10" background="/em/images/cts_bar.gif"><img src="/em/images/spacer.gif" border="0"></td>
					        <td align="center" valign="top">
##CONTENT START 各ページコンテンツ
<!-- 管理用ヘッダー //-->
<FORM method="post" action="/em/user/enquete/confirm/" name="enquete">
<input type="hidden" name="resetFlg" value="0"/>##Reset処理しない
<input type="hidden" name="initCount" value="2"/>##初期表示フラグ
<input type="hidden" name="chkeid" value="$!enqueteForm.eid"/>##複数タブ表示異常確認用

<!-- Contents Title Table Start -->
	<table width="780" border="0" cellspacing="0" cellpadding="0">
	    #if($!enqueteForm.type == "pre")
	    <tr>
			<td height="60"><font color="red" style="font-size: 24px;">※※これはテストページです。※※</font></td>
		</tr>
		#end
		<tr>
			<td class="ctsTitle" height="24">アンケート ( <font color="red">[回答]</font> → 確認 → 完了 )</td>
		</tr>
		<tr>
			<td align="center"><img src="/em/images/spacer.gif" width="1" height="10" border="0"></td>
		</tr>
	<tr>
		<td align="center">
			<table width="780" border="0" cellspacing="0" cellpadding="0">
				<tr>
				<!-- 
					<td width="6" background="/em/images/how_topbg.gif"><img src="/em/images/how_toplft.gif" width="6" height="26" border="0"></td>
					<td background="/em/images/how_topbg.gif" class="txt12wh">

					$!escape.html($!enqueteForm.enquete.enqueteName) (
					$!tools.addSlashDate( $!enqueteForm.enquete.startDate )
							 ~ $!tools.addSlashDate($!enqueteForm.enquete.endDate) )</td>
					<td width="6" align="right" background="/em/images/how_topbg.gif"><img src="/em/images/how_toprgt.gif" width="6" height="20"></td>
				-->
					<td width="6" background="/em/images/how_topbg.gif"><img src="/em/images/how_toplft.gif" width="6" height="26" border="0"></td>
					<td style="border: 1px #0000ff solid;" class="txt12bl">
						$!escape.html($!enqueteForm.enquete.enqueteName) (
						$!tools.addSlashDate( $!enqueteForm.enquete.startDate )
								 ~ $!tools.addSlashDate($!enqueteForm.enquete.endDate) )
					</td>
					<td width="6" align="right" background="/em/images/how_topbg.gif"><img src="/em/images/how_toprgt.gif" width="6" height="20"></td>
				</tr>
				<tr>
					<td background="/em/images/how_lft.gif"><img src="/em/images/spacer.gif" width="6" height="6" border="0"></td>
					<td align="center">
						<table width="100%" border="0" cellspacing="3" cellpadding="0">
							<tr>
								<td><DIV ALIGN="left">
								$!enqueteForm.enquete.header
								</div>

								</td>
							</tr>
						</table>
					</td>
					<td background="/em/images/how_rgt.gif"><img src="/em/images/spacer.gif" width="6" height="6" border="0"></td>
				</tr>
				<tr>
					<td background="/em/images/how_btmbg.gif"><img src="/em/images/how_btmlft.gif" width="6" height="6" border="0"></td>
					<td background="/em/images/how_btmbg.gif"><img src="/em/images/spacer.gif" width="6" height="6" border="0"></td>
					<td background="/em/images/how_btmbg.gif"><img src="/em/images/how_btmrgt.gif" width="6" height="6" border="0"></td>
				</tr>
			</table>
			<BR>

			<table width="780" border="0" cellspacing="0" cellpadding="0">
				<tr>
				    <td width="5"><img src="/em/images/cts_cmt01.gif" width="5" height="23" border="0"></td>
				    <td width="740" class="attention">ご回答にあたっての注意</td>
				    <td width="5" align="right"><img src="/em/images/cts_cmt03.gif" width="5" height="23" border="0"></td>
				</tr>
				<tr>
				    <td background="/em/images/cts_cmt02_bg.gif"><img src="/em/images/spacer.gif" width="5" height="5" border="0"></td>
				    <td>「<font class="listpoint" >*</font>」印の項目は必ず回答してください。(※半角カナは使用しないでください)
				    <td background="/em/images/cts_cmt03_bg.gif"><img src="/em/images/spacer.gif" width="5" height="5" border="0"></td>
				</tr>
				<tr>
				    <td><img src="/em/images/cts_cmt02.gif" width="5" height="5" border="0"></td>
				    <td background="/em/images/cts_cmt04_bg.gif"><img src="/em/images/spacer.gif" width="1" height="5" border="0"></td>
				    <td><img src="/em/images/cts_cmt04.gif" width="5" height="5" border="0"></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td><img src="/em/images/spacer.gif" width="1" height="5" border="0"></td>
	</tr>
	</table>

<!-- ここからアンケート回答部分 //-->
<!-- Category Table 01 Start -->
$tools.getMsg("errorheader")
		<table width="780" border="0" cellpadding="2" cellspacing="1" bgcolor="#004080">

			####質問開始######
##$questionFor開始
#set($questionIndex = 0)
#set($dateIndex = 0)
			#foreach($question  in  $!enqueteForm.questionList)

			#set($questionIndex = $velocityCount)
				<tr>
					<td class="listmenu" colspan="2">
					<!-- 質問NO //-->
					Q$!question.questionNo
					<!-- 必須有無 //-->
					#if($!question.requiredFlg == "1")
					<font color="red">&nbsp;*&nbsp;</font>
					#end
					<!-- 質問項目 //-->
					$!question.questionName
					#if($question.question && $question.question != "")
							<BR> $!question.question
					#end
					<br>&nbsp;
					</td>
				</tr>
				<tr>
					<td class="listcts" colspan="2">
							<table width="100%">
								<tr>
								##<!-- 質問の表示列項目数を求める -->
								#if($!question.colNum)
									#set($questionColNum = $!question.colNum)
								#else
									#set($questionColNum = 1)
								#end

								#set($tdWidthPercent = (100/$questionColNum))

								##<!-- ○○番目カラム変数 -->
								#set($colNum = 0)


						##<!-- 2:SELECTMENU answer.answerNo値を値にする。-->
						#if($!question.controlId == "2")
						<td width="$tdWidthPercent%" valign = "top" >
							#set($answerIdValueName = "questionList[$questionIndex].answerList[0].answerIdValue")
							 <select name="$answerIdValueName">
									#foreach($selectAnswer in $question.answerList)
									<option value="$!selectAnswer.answerId" #if($enqueteForm.initCount =="2" && $!selectAnswer.answerId == $!selectAnswer.answerIdValue) selected #elseif($!selectAnswer.defaultFlg == "1" && $enqueteForm.initCount!="2") selected    #end >$!escape.html($!selectAnswer.answer)</option>
										  <!-- <option value="$!selectAnswer.answerId" #if($enqueteForm.initCount =="2" && $!selectAnswer.answerId == $!selectAnswer.answerIdValue) selected $!selectAnswer.answerId , $!selectAnswer.answerIdValue #elseif($!selectAnswer.defaultFlg == "1" ) selected  $!selectAnswer.answerId , $!selectAnswer.answerIdValue  #end >$!escape.html($!selectAnswer.answer)</option> -->
					   				#end
							</select>

						</td></tr>
						</table>
						<font class="error">$!tools.getMsg("$!question.enqueteId.toString(),$!question.questionId.toString()")</font>
						</td>
						#else
								#foreach($answer in $question.answerList)
								    #set($colNum = $colNum + 1)

									#set($answerIdValueName = "questionList[$questionIndex].answerList[$velocityCount].answerIdValue")
									#set($answerIdValueRadioName = "questionList[$questionIndex].answerList[0].answerIdValue")
									#set($answerValue = "questionList[$questionIndex].answerList[$velocityCount].answerValue")

										##<!-- colSpan変数 -->
										#set($colSpan = 1)

										##<!-- 最後のカラムの場合、不足ColSpan数を計算する。 -->
										#if($question.answerList.size() == $velocityCount+1)
												#set($colSpan = $questionColNum - $colNum + 1)
										#end
										<td width="$tdWidthPercent%" valign = "top" colspan="$!colSpan">
										    <!-- 0:RADIO インデクスを値にする。 -->
											#if($!question.controlId == "0")
															##if($!answer.freeTextFlg != "1" && $!answer.freeTextFlg != "2")
													 <input type="radio" name="$!answerIdValueRadioName"  value="$velocityCount"  #if($!answer.answerIdValue ==  $velocityCount.toString() && $enqueteForm.initCount =="2") checked #{end}
													     #if($!answer.defaultFlg == 1 && $enqueteForm.initCount =="1") checked #end
													 > $!escape.html($!answer.answer)
															##end

												##<!-- 自由入力欄。freeTextFlg=1(あり)、2(必須) -->
												#if($!answer.freeTextFlg == "1" || $!answer.freeTextFlg == "2")
												 	<input type="text"  name="$answerValue"  size="$!answer.freeTextColWidth"  value="$!escape.html($!answer.answerValue)" />
												#end
											##<!-- 1:CHECKBOX answer.answerNo値を値にする。-->
											#elseif($!question.controlId == "1")
															##if($!answer.freeTextFlg != "1" && $!answer.freeTextFlg != "2")
													<input type="checkbox" name="$answerIdValueName"  value="$!escape.html($!answer.answerNo)"  #if($answer.answerIdValue != "" && $enqueteForm.initCount =="2") checked #end
																									#if($!answer.defaultFlg == 1 && $enqueteForm.initCount =="1") checked #end
													> $!escape.html($!answer.answer)
															##end

												##<!-- 自由入力欄。freeTextFlg=1(あり)、2(必須) -->
												#if($!answer.freeTextFlg == "1" || $!answer.freeTextFlg == "2")
												 		<input type="text"  name="$answerValue" size="$!answer.freeTextColWidth"  value="$!escape.html($!answer.answerValue)"/>
												#end
											##<!-- 3:TEXTAREA ユーザー入力値を値にする。-->
											#elseif($!question.controlId == "3")
												<textArea type="text" name="$answerIdValueName" cols="$!question.dispWitdth" rows="$!question.rowCount">$!answer.answerIdValue</textarea>
											##<!-- 4:TEXTFIELD ユーザー入力値を値にする。-->
											#elseif($!question.controlId == "4")
												<input type="text" name="$answerIdValueName"  value="$!escape.html($!answer.answerIdValue)"  size="$!question.dispWitdth"/>
											##<!-- 5:日付入力 ユーザー入力値を値にする。-->
											#elseif($!question.controlId == "5")
												#set($dateIndex = $dateIndex+1)
												<input name="$answerValue" id="enqStartFrom${dateIndex}" type="text"  class="w100 mgl10"  value="$!escape.html($!answer.answerValue)" >
												<div style="display: none;"><img id="enqFrom${dateIndex}" src="/em/images/icon_cal.gif" style="padding-left:5px;padding-right:5px; vertical-align: middle;"></div>
												<input type="hidden" name="$answerIdValueName" value="$!answer.answerId" />
											#elseif($!question.controlId == "6")
												<select name="$answerIdValueName">
												<option value="" >下記より選択してください</option>
												#foreach($pecent1 in $enqueteForm.organizationListFor1Percent)
													<option value="$!pecent1.organizationId" #if($!answer.answerIdValue ==  $!pecent1.organizationId) selected #end>$!{pecent1.organizationNo} : $!escape.html($!{pecent1.organizationName})</option>
												#end
												</select>
												</td>
											#end

										</td>
										##<!-- TRの開閉 -->
										#if($questionColNum ==  $colNum)  ##<!-- カラム数と同一になった場合 -->
											#set($colNum = 0)
											</tr>
										#elseif($question.answerList.size() == ($velocityCount+1)) ##<!-- 最後のカラムになった場合 -->
											</tr>
											##終わりじゃない場合開始タグを作る。
										#elseif($question.answerList.size() == ($velocityCount+1)) ##<!-- 表示するのカラムが残っている場合 -->
											<tr>
										#end
								#end
								</table>
							<font class="error">$!tools.getMsg("$!question.enqueteId.toString(),$!question.questionId.toString()") $!tools.getMsg("$!question.enqueteId.toString(),$!question.questionId.toString()_1") $!tools.getMsg("$!question.enqueteId.toString(),$!question.questionId.toString()_2")</font>
						</td>
					</tr>
				#end
			#end  ##<!-- 2:SELECTMENU 終了-->
			####質問終了######
		</table>


<BR>
<font color="#FF0000" ><B>入力情報の確認を行っていただくため確認画面に進みます</B></font>
<BR>


<table width="510" border="0" cellspacing="5" cellpadding="0">
<tr>
    <td>
    <table border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
        <td nowrap>
        	<a href="#" onClick="document.enquete.submit();" ><img border=0 src="/em/images/input_conf.gif" alt="入力情報確認" ></a>
        </td>
    </tr>
    </table>
    </td>
</tr>
</table>


<!-- ここまでアンケート回答部分 //-->
<BR>
#if($enqueteForm.enquete.footer)
   #if($enqueteForm.enquete.footer != "")
		<table width="780" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td align="center">
						<table width="100%" border="0" cellspacing="3" cellpadding="0">
							<tr>
								<td><DIV ALIGN="center">
								$!enqueteForm.enquete.footer
								</div>
								</td>
							</tr>
						</table>
					</td>
				</tr>
		</table>
	#end
#end

</FORM>
##CONTENT END 各ページコンテンツ
					        <!-- Button Table Start 点線-->
							<table width="780" border="0" cellspacing="5" cellpadding="0">
								<tr>
									<td background="/em/images/cts_btnbar.gif"><img src="/em/images/spacer.gif" width="1" height="10" border="0"></td>
								</tr>
							</table>
							<!-- Button Table End -->
					        </td>
					    </tr>
				    </table>
				    </td>
			   <td width="25" background="/em/images/shadowrgt2.jpg"><img src="/em/images/spacer.gif" width="25" height="1" border="0"></td>
				</tr>
			</table>
		</TD>
	</tr>
	<tr>
		<TD>#parse( "/WEB-INF/view/common/footer.vm" )</TD>
	</tr>
</table>

</center>
</body>
</html>