<!DOCTYPE html>
<html lang="ko"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	layout:decorator="mob/common/layout/DefaultLayoutMob">
<!--
 *******************************************************************************
 * @source  : PlanningEventPollFormMob.html
 * @desc    : 설문조사 Page
 *============================================================================
 * STYLE24
 * Copyright(C) 2020 TSIT, All rights reserved.
 *============================================================================
 * VER  DATE         AUTHOR      DESCRIPTION
 * ===  ===========  ==========  =============================================
 * 1.0  2021.05.10   sowon     최초 작성
 *******************************************************************************
 -->
<body>
<script src="//developers.kakao.com/sdk/js/kakao.min.js"></script>
<th:block layout:fragment="content">
<main role="" id="" class="container ev">
			<section class="content renew">
				<div class="inner">
					<div class="promotion_tit">
						<h3 th:text="${pollInfo.pollTitle}"></h3>
						<div class="period">
							<span th:text="${pollInfo.pollStdt}"></span> - <span th:text="${pollInfo.pollEddt}"></span>
						</div> 
						<!-- <button type="button" class="share_btn"><img src="/images/mo/ico_share_btn.png" alt="공유" /></button> -->
					</div>
				</div>
				<div class="inner wide">
					<div class="survey_wrap">
						<div class="survey_con">
							<form action="">
							<th:block th:each="pollData, pollStat : ${pollList}">
								<div class="survey_row q1" th:if="${pollData.pollQtype == '10'}">
									<h4><span class="question" th:text="'Q'+${pollStat.index+1}+'.'"></span>[[${pollData.pollQtitle}]]</h4>
									<div class="answer">
										<div class="form_field">
											<ul class="clear" th:id="${pollData.pollQsq+'_'+(pollStat.index+1)}">
												<li th:if="${pollData.pollQval1 != null && pollData.pollQval1 != ''}">
													<th:block th:if="${pollData.pollQval1 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-1-'+${pollData.pollQsq}" th:value="${pollData.pollQval1}" ><label th:for="'rdi-1-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval1}"></span></label>
													</th:block>
													<th:block th:unless="${pollData.pollQval1 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-1-'+${pollData.pollQsq}" th:value="${pollData.pollQval1}" class="etc"><label th:for="'rdi-1-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval1}"></span></label>
														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
													</th:block>
												</li>
												<li th:if="${pollData.pollQval2 != null && pollData.pollQval2 != ''}">
													<th:block th:if="${pollData.pollQval2 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-2-'+${pollData.pollQsq}" th:value="${pollData.pollQval2}" ><label th:for="'rdi-2-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval2}"></span></label>
													</th:block>
													<th:block th:unless="${pollData.pollQval2 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-2-'+${pollData.pollQsq}" th:value="${pollData.pollQval2}" class="etc"><label th:for="'rdi-2-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval2}"></span></label>
														<textarea th:name="'etc_input_'+${pollData.pollQsq}"onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
													</th:block>
												</li>
												<li th:if="${pollData.pollQval3 != null && pollData.pollQval3 != ''}">
													<th:block th:if="${pollData.pollQval3 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-3-'+${pollData.pollQsq}" th:value="${pollData.pollQval3}" ><label th:for="'rdi-3-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval3}"></span></label>
													</th:block>
													<th:block th:unless="${pollData.pollQval3 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-3-'+${pollData.pollQsq}" th:value="${pollData.pollQval3}" class="etc"><label th:for="'rdi-3-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval3}"></span></label>
														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
													</th:block>
												</li>
												<li th:if="${pollData.pollQval4 != null && pollData.pollQval4 != ''}">
													<th:block th:if="${pollData.pollQval4 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-4-'+${pollData.pollQsq}" th:value="${pollData.pollQval4}" ><label th:for="'rdi-4-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval4}"></span></label>
													</th:block>
													<th:block th:unless="${pollData.pollQval4 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-4-'+${pollData.pollQsq}" th:value="${pollData.pollQval4}" class="etc"><label th:for="'rdi-4-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval4}"></span></label>
														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" > </textarea>
													</th:block>
												</li>
												<li th:if="${pollData.pollQval5 != null && pollData.pollQval5 != ''}">
													<th:block th:if="${pollData.pollQval5 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-5-'+${pollData.pollQsq}" th:value="${pollData.pollQval5}" ><label th:for="'rdi-5-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval5}"></span></label>
													</th:block>
													<th:block th:unless="${pollData.pollQval5 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-5-'+${pollData.pollQsq}" th:value="${pollData.pollQval5}" class="etc"><label th:for="'rdi-5-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval5}"></span></label>
														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
													</th:block>
												</li>
												<li th:if="${pollData.pollQval6 != null && pollData.pollQval6 != ''}">
													<th:block th:if="${pollData.pollQval6 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-6-'+${pollData.pollQsq}" th:value="${pollData.pollQval6}"><label th:for="'rdi-6-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval6}"></span></label>
													</th:block>
													<th:block th:unless="${pollData.pollQval6 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-6-'+${pollData.pollQsq}" th:value="${pollData.pollQval6}" class="etc"><label th:for="'rdi-6-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval6}"></span></label>
														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
													</th:block>
												</li>
												<li th:if="${pollData.pollQval7 != null && pollData.pollQval7 != ''}">
													<th:block th:if="${pollData.pollQval7 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-7-'+${pollData.pollQsq}" th:value="${pollData.pollQval7}" ><label th:for="'rdi-7-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval7}"></span></label>
													</th:block>
													<th:block th:unless="${pollData.pollQval7 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-7-'+${pollData.pollQsq}" th:value="${pollData.pollQval7}" class="etc"><label th:for="'rdi-7-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval7}"></span></label>
														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
													</th:block>
												</li>
												<li th:if="${pollData.pollQval8 != null && pollData.pollQval8 != ''}">
													<th:block th:if="${pollData.pollQval8 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-8-'+${pollData.pollQsq}" th:value="${pollData.pollQval8}"><label th:for="'rdi-8-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval8}"></span></label>
													</th:block>
													<th:block th:unless="${pollData.pollQval8 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-8-'+${pollData.pollQsq}" th:value="${pollData.pollQval8}" class="etc"><label th:for="'rdi-8-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval8}"></span></label>
														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
													</th:block>
												</li>
												<li th:if="${pollData.pollQval9 != null && pollData.pollQval9 != ''}">
													<th:block th:if="${pollData.pollQval9 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-9-'+${pollData.pollQsq}" th:value="${pollData.pollQval9}" ><label th:for="'rdi-9-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval9}"></span></label>
													</th:block>
													<th:block th:unless="${pollData.pollQval9 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-9-'+${pollData.pollQsq}" th:value="${pollData.pollQval9}"class="etc"><label th:for="'rdi-9-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval9}"></span></label>
														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
													</th:block>
												</li>
												<li th:if="${pollData.pollQval10 != null && pollData.pollQval10 != ''}">
													<th:block th:if="${pollData.pollQval10 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-10-'+${pollData.pollQsq}" th:value="${pollData.pollQval10}"><label th:for="'rdi-10-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval10}"></span></label>
													</th:block>
													<th:block th:unless="${pollData.pollQval10 != '기타'}">
														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-10-'+${pollData.pollQsq}" th:value="${pollData.pollQval10}" class="etc"><label th:for="'rdi-10-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval10}"></span></label>
														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
													</th:block>
												</li>
											</ul>
										</div>
									</div>
								</div>
								<div class="survey_row q2" th:if="${pollData.pollQtype == '20'}">
									<h4><span class="question" th:text="'Q'+${pollStat.index+1}+'.'"></span>[[${pollData.pollQtitle}]]</h4>
									<div class="answer">
										<div class="form_field">
											<ul class="clear" th:id="${pollData.pollQsq+'_'+(pollStat.index+1)}">
												<li th:if="${pollData.pollQval1 != null && pollData.pollQval1 != ''}">
													<input type="checkbox" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'chk-1-'+${pollData.pollQsq}" th:value="${pollData.pollQval1}"><label th:for="'chk-1-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval1}"></span></label>
												</li>
												<li th:if="${pollData.pollQval2 != null && pollData.pollQval2 != ''}">
														<input type="checkbox" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'chk-2-'+${pollData.pollQsq}" th:value="${pollData.pollQval2}"><label th:for="'chk-2-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval2}"></span></label>
												</li>
												<li th:if="${pollData.pollQval3 != null && pollData.pollQval3 != ''}">
														<input type="checkbox"  th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'chk-3-'+${pollData.pollQsq}" th:value="${pollData.pollQval3}"><label th:for="'chk-3-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval3}"></span></label>
												</li>
												<li th:if="${pollData.pollQval4 != null && pollData.pollQval4 != ''}">
														<input type="checkbox" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'chk-4-'+${pollData.pollQsq}" th:value="${pollData.pollQval4}"><label th:for="'chk-4-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval4}"></span></label>
												</li>
												<li th:if="${pollData.pollQval5 != null && pollData.pollQval5 != ''}">
														<input type="checkbox" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'chk-5-'+${pollData.pollQsq}" th:value="${pollData.pollQval5}"><label th:for="'chk-5-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval5}"></span></label>
												</li>
												<li th:if="${pollData.pollQval6 != null && pollData.pollQval6 != ''}">
														<input type="checkbox" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'chk-6-'+${pollData.pollQsq}" th:value="${pollData.pollQval6}"><label th:for="'chk-6-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval6}"></span></label>
												</li>
												<li th:if="${pollData.pollQval7 != null && pollData.pollQval7 != ''}">
														<input type="checkbox" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'chk-7-'+${pollData.pollQsq}" th:value="${pollData.pollQval7}"><label th:for="'chk-7-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval7}"></span></label>
												</li>
												<li th:if="${pollData.pollQval8 != null && pollData.pollQval8 != ''}">
														<input type="checkbox" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'chk-8-'+${pollData.pollQsq}" th:value="${pollData.pollQval8}"><label th:for="'chk-8-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval8}"></span></label>
												</li>
												<li th:if="${pollData.pollQval9 != null && pollData.pollQval9 != ''}">
														<input type="checkbox" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'chk-9-'+${pollData.pollQsq}" th:value="${pollData.pollQval9}"><label th:for="'chk-9-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval9}"></span></label>
												</li>
												<li th:if="${pollData.pollQval10 != null && pollData.pollQval10 != ''}">
														<input type="checkbox" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'chk-10-'+${pollData.pollQsq}" th:value="${pollData.pollQval10}"><label th:for="'chk-10-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval10}"></span></label>
												</li>
											</ul>
										</div>
									</div>
								</div>

								<div class="survey_row q3" th:if="${pollData.pollQtype == '40'}">
									<h4><span class="question" th:text="'Q'+${pollStat.index+1}+'.'"></span>[[${pollData.pollQtitle}]]</h4>
									<div class="answer">
										<textarea class="doc_ans" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" onkeyup="chkChar(this)" th:id="${pollData.pollQsq+'_'+(pollStat.index+1)}" placeholder="1,000자 이내로 입력해 주세요." style="resize: none;"></textarea>
										<p class="txt_cnt"><span id="ans_cnt" class="c_primary">0</span>/1,000</p>
									</div>
								</div>
								<div class="survey_row q4" th:if="${pollData.pollQtype == '30'}">
								<h4><span class="question" th:text="'Q'+${pollStat.index+1}+'.'"></span>[[${pollData.pollQtitle}]]</h4>
									<div class="answer">
										<textarea class="q4_ans" name=""  onkeyup="chkChar(this)" id="" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="${pollData.pollQsq+'_'+(pollStat.index+1)}"></textarea>
									</div>
							
								</div>
								</th:block>
								
								<div class="btn_wrap">
									<button type="button" id="btn_survey_success" class="btn btn_dark" onclick="fnSubmitPoll()">응답 완료</button>
								</div>
							</form>
						</div>
					</div>
				</div>
			</section>
			
				<!-- (공통) 공유팝업 -->
		<div class="modal fade" id="tglShare" tabindex="-1" role="dialog"
			aria-labelledby="aModalLabel" aria-hidden="true">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<h5 class="modal-title" id="aModalLabel">공유하기</h5>
					</div>
					<div class="modal-body">
						<!-- toggle contents -->
						<div id="layerShare" class="setShare open"
							th:with="stylelUrl=${@environment.getProperty('domain.front')},  planView=${@environment.getProperty('upload.image.view')}">
							<span>
								<button type="button" id="kakao-link-btn" class="kk"
									th:attr="onclick=|cfnSendToKakao('${stylelUrl+'/planning/detail/form?planSq='+pollInfo.planSq}', '${pollInfo.planNm}', '${planView+ '/'+pollInfo.mainMimg}');|">
									<span>카카오톡</span>
								</button>
								<button type="button" class="fb"
									th:attr="onclick=|sendSns('facebook', '${stylelUrl+'/planning/detail/form?planSq='+pollInfo.planSq}', '${pollInfo.planNm}', '', '');|">
									<span>페이스북</span>
								</button>
								<button type="button" class="tw"
									th:attr="onclick=|sendSns('twitter', '${stylelUrl+'/planning/detail/form?planSq='+pollInfo.planSq}',  '${pollInfo.planNm+ '#style24몰'}', '', '');|">
									<span>트위터</span>
								</button>
								<button type="button" class="url btn_copy">
									<span>URL</span>
								</button>
							</span>
						</div>
					</div>
				</div>
			</div>
		</div>
		<script>
			// 공유팝업
			$('.share_btn').click(function(e){
				e.preventDefault();
				$('#tglShare').modal("show");
			});
		</script>
		</main>
<script th:inline="javascript">
let pollList = [[${pollList}]];

var fnSubmitPoll = function () {
	//let pollQsq_20 = new Array();
	let pollQsq_10 = '';
	let pollQsq_20 = '';
	let pollQsq_30 = '';
	let pollQsq_40 = '';
	
	
	// 유효성검사
	for (let i = 0; i < pollList.length; i++) {
		let type = pollList[i].pollQtype;
		let pollQsq = pollList[i].pollQsq;
		
		
		if(type == "10"){
			if($('input:radio[name='+pollQsq+'_'+(i+1)+']').is(':checked')== false){
				mcxDialog.alert("Q"+(i+1)+"항목은 필수항목입니다.");
				return;
			}
			if($('input:radio[name='+pollQsq+'_'+(i+1)+']:checked').val() == '기타'){
				if($('textarea[name=etc_input_'+pollQsq+']').val()==''){
					mcxDialog.alert("Q"+(i+1)+"기타 내용을 입력해주세요.");
					return;
				}
			}
			if ($('input:radio[name='+pollQsq+'_'+(i+1)+']:checked').val() == '기타') {
				pollQsq_10 += pollQsq +'-'+$('textarea[name=etc'+pollQsq+']').val() + '/';
			}else{
				pollQsq_10 += pollQsq +'-'+$('input:radio[name='+pollQsq+'_'+(i+1)+']:checked').val() + '/';
			}
		}
		if(type == "20"){
			if($('input:checkbox[name='+pollQsq+'_'+(i+1)+']').is(':checked')== false){
				mcxDialog.alert("Q"+(i+1)+"항목은 필수항목입니다.");
				return;
			}else{
				let chk = $('input:checkbox[name='+pollQsq+'_'+(i+1)+']:checked');
				pollQsq_20 += pollQsq + '-' ;
				for(let i=0; i< chk.length; i++){
					pollQsq_20 += chk.eq(i).val();
					if (i != chk.length-1) {
						pollQsq_20 += ',';
					}
				}
				pollQsq_20 += '/' ;
			}
		}
		if(type == "30"){
			if($('textarea[name='+pollQsq+'_'+(i+1)+']').val() == ''){
				mcxDialog.alert("Q"+(i+1)+"항목은 필수항목입니다.");
				return;
			}else{
				pollQsq_30 += pollQsq +'-'+$('textarea[name='+pollQsq+'_'+(i+1)+']').val() + '/';
			}
		}
		if(type == "40"){
			if($('textarea[name='+pollQsq+'_'+(i+1)+']').val() == ''){
				mcxDialog.alert("Q"+(i+1)+"항목은 필수항목입니다.");
				return;
			}else{
				//max1.set(pollQsq,$('textarea[name='+pollQsq+'_'+(i+1)+']').val());
				pollQsq_40 += pollQsq +'-'+$('textarea[name='+pollQsq+'_'+(i+1)+']').val() + '/';
			}
		}
	}
	var data = {pollQsq_10 : pollQsq_10,
				pollQsq_20 : pollQsq_20,
			    pollQsq_30 : pollQsq_30,
			    pollQsq_40 : pollQsq_40};
	

	var jsonData = JSON.stringify(data);

	$.ajax({
		type : "POST",
		data : jsonData,
		url : '/planning/event/poll/save',
		contentType : 'application/json',
		dataType : 'json',
		success : function(result) {
			mcxDialog.alertC('설문조사 이벤트 참여가 완료되었습니다.', {
				sureBtnText: "확인",
				sureBtnClick: function() {
					cfnGoToPage(_PAGE_EVENT_MAIN);
				}
			});
		}
	})
}

	function chkChar(obj){
	    var RegExp = /[\{\}\[\]\/?.,;:|\)*~`!^\-_+┼<>@\#$%&\'\"\\\(\=]/gi;	//정규식 구문
	    if (RegExp.test(obj.value)) {
	      // 특수문자 모두 제거    
	      obj.value = obj.value.replace(RegExp , '');
	    }
	}
	
$(document).ready(function(){
	//Q3 글자 수 카운트
	$('.doc_ans').keyup(function (e){
		var content = $(this).val();
		$('#ans_cnt').html(content.length);
		if (content.length > 1000){
			$(this).val(content.substring(0, 1000));
			$('#ans_cnt').html("500");
		}
	});
	
	$('.etc').keyup(function (e){
		var content = $(this).val(); 
		if (content.length > 50){
			$(this).val(content.substring(0, 50));
		}
	});
	
	$('.q4_ans').keyup(function (e){
		var content = $(this).val(); 
		if (content.length > 50){
			$(this).val(content.substring(0, 50));
		}
	});
	
	// $('.ev .survey_wrap .survey_con .survey_row input[type="radio"]').change(function(){
	// 	if ($('.etc_radio').is(':checked')) {
	// 		// $('.etc_input').removeAttr('disabled');
	// 		$('.etc_input').css({'visibility': 'visible'});
	// 	} else {
	// 		// $('.etc_input').attr('disabled', true);
	// 		$('.etc_input').css({'visibility': 'hidden'});
	// 	}
	// });
	
	
})
</script>
</th:block>

</body>
</html>