#set($title = "アンケート回答")
<script type="text/javascript" src="/em/js/jquery-1.3.1.min.js"></script>
<script language="javascript" type="text/javascript" charset="utf-8">
<!--
window.onload = function () {
	$("input[type=text], input[type=date], textArea[type=text]").each(function(){
		if ($(this).prop("disabled")) {
			$(this).val("");
			$(this).textinput().textinput("disable");
			if ($(this).prop("type") == "date") {
				$(this).next().hide();
			}
		}
	});
}
// -->
</script>
#foreach($question  in  $!enqueteForm.questionList)
	#foreach($answer in $question.answerList)
<script language="javascript" type="text/javascript" charset="utf-8">
<!--
$(function() {
	//条件付必須チェック
    $("input[type=radio], input[type=checkbox], input[type=select]").click(function () {
    	var idArray = $(this).attr("class").split(" ");
    	var thisQuestionId = idArray[0];
    	var thisAnswerId = idArray[1];
    	//表示、非表示対象
    	if (${question.condRequiredQuestionNo} && ${question.condRequiredQuestionNo} == thisQuestionId) {
    		var key;
    		if ("${question.condRequiredAnswer}".split(",").indexOf(thisAnswerId) < 0) {
    			if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
    				key = "${answer.answerId}";
    				$("." + key).prop("checked", false);
    				$("." + key).checkboxradio('refresh').checkboxradio('disable');
    			} else if ("${question.controlId}" == "2" || ${question.controlId} == "6") {
    				key = "${question.questionId}";
    				$("." + key).val("");
    				$("." + key).selectmenu("refresh").selectmenu("disable");
    			} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4") {
    				key = "${question.questionId}";
    				$("." + key).val("");
    				$("." + key).textinput("disable");
    			} else if ("${question.controlId}" == "5") {
    				key = "${question.questionId}";
    				$("." + key).val("");
    				$("." + key).textinput("disable");
    				$("." + key).next().hide();
    			}
    		} else {
    			if ("${question.controlId}" == "0" || "${question.controlId}" == "1") {
    				key = "${answer.answerId}";
    				$("." + key).checkboxradio('enable');
    			} else if ("${question.controlId}" == "2" || "${question.controlId}" == "6") {
    				key = "${question.questionId}";
    				$("." + key).selectmenu("enable");
    			} else if ("${question.controlId}" == "3" || "${question.controlId}" == "4") {
    				key = "${question.questionId}";
    				$("." + key).textinput("enable");
    			} else if ("${question.controlId}" == "5") {
    				key = "${question.questionId}";
    				$("." + key).textinput("enable");
    				$("." + key).next().show();
    			}
    		}
    	}
    });
});
	// -->
</script>
	#end
#end
<!-- preHeader -->
#set($ajaxdisable = "1")
#parse( "/WEB-INF/view/common/preHeader_sp.vm" )

<body>

<div data-role="page" id="enquete" data-theme="f">
<!--ヘッダー-->
#parse( "/WEB-INF/view/common/header_web_sp.vm" )
#if($!enqueteForm.type == "pre")
<hr size="1">
<font color="red" ><b>※※これはテストページです。※※</b></font>
<hr size="1">
#end
<!--コンテンツ-->
#set($confirm-url = $tools.getSecureUrl('/user/enquete/confirm/'))

<form action="$!confirm-url" method="post" data-ajax="false">
<input type="hidden" name="resetFlg" value="0"/>##Reset処理しない
<input type="hidden" name="initCount" value="2"/>##初期表示フラグ
<input type="hidden" name="chkeid" value="$!enqueteForm.eid"/>##複数タブ表示異常確認用

<div class="category" data-role="content" data-theme="d">
<div align="left">
	$!enqueteForm.enquete.header
</div>
<hr>

#parse( "/WEB-INF/view/common/enquete_sp.vm" )

<br><input value="入力情報確認" type="submit">

<hr>
#if($enqueteForm.enquete.footer)
	#if($enqueteForm.enquete.footer != "")
		<div ALIGN="left">
		$!enqueteForm.enquete.footer
		</div>
	#end
#end

</div>
#parse( "/WEB-INF/view/common/footer_web_sp.vm" )
#makeToken()
</form>
</div>


</body>
</html>