<commit_before><!-- peung -->
<script language="javascript">
    function fncAlert(){
        if(document.getElementById('bk').checked) {
           //$("#tbk").css("display","block");
           //$("#tcou").css("display","none");
           document.getElementById('sbk1').disabled=false;
           document.getElementById('sbk2').disabled=false;
           document.getElementById('sbk3').disabled=false;
           document.getElementById('sbk4').disabled=false;
           //document.getElementById('sbk5').disabled=false;
           document.getElementById('scou').disabled=true;
        }else if(document.getElementById('cou').checked) {
           //$("#tbk").css("display","none");
           //$("#tcou").css("display","block");
           document.getElementById('sbk1').disabled=true;
           document.getElementById('sbk2').disabled=true;
           document.getElementById('sbk3').disabled=true;
           document.getElementById('sbk4').disabled=true;
           //document.getElementById('sbk5').disabled=true;
           document.getElementById('scou').disabled=false;
        }
    }

    function getAmpher()
    {
        var  provincename = document.getElementById('selProvince').value;
        //alert(provincename);
        $.get("{{path('FTRWebBundle_search_ampher')}}", { province_name: provincename },
            function(data) {
                if(data != "no")
                {
                    document.getElementById('divAmpher').innerHTML = data;
                }
        });
    }

</script>
<form method="post" action="{{path('FTRWebBundle_list')}}?searchType=fullSearch" id="frmSearch" name="frmSearch">
<div id="search2">
	<img src="{{asset('images/search-i.png')}}" />
	<hr class="line" style="top: 60px;" />
    <div>
		<table>
			<tr height="50" valign="middle">
				<td align="right" style="padding-right:15px;">ประเภทหอพัก :</td>
				<td width="350">
					<div class="styled-select">
						<select class="select" name="selBuildingType" id="selBuildingType">
							{% for bType in buildingTypeList %}
								<option value="{{ bType.id }}"
                                    {% if selBuildingType == bType.id %}
                                        selected="selected"
                                    {% endif %}
                                >{{ bType.type_name }}</option>
							{% endfor %}
						</select>
					</div>
				</td>
				<td align="right" style="padding-right:15px;">ราคาเริ่มต้น :</td>
				<td width="350">
					<input class="price" value="{{ lessPrice }}" name="lessPrice" type="text" maxlength="10" placeholder="ราคาเริ่มต้น" />&nbsp;&nbsp;&nbsp;&nbsp;บาท
				</td>
			</tr>
			<tr height="50" valign="middle">
				<td align="right" style="padding-right:15px;">ชนิด :</td>
				<td>
					<div class="styled-select">
						<select class="select" name="bkkPayType" id="bkkPayType">
							{% for pType in payType %}
								<option value="{{ pType.id }}"
                                    {% if bkkPayType == pType.id %}
                                        selected="selected"
                                    {% endif %}
                                >{{ pType.typename }}</option>
							{% endfor %}
						</select>
					</div>
				</td>
				<td align="right" style="padding-right:15px;">ราคาไม่เกิน :</td>
				<td>
					<input class="price" value="{{ mostPrice }}" name="mostPrice" type="text" maxlength="10" placeholder="ราคาไม่เกิน" />&nbsp;&nbsp;&nbsp;&nbsp;บาท
				</td>
			</tr>
		</table>
	</div>
    <hr class="line" style="top: 185px;" />
    <div style="display:block;padding-bottom:10px;">
		<table>
			<tr height="50" valign="middle">
				<td align="left" width="165">จังหวัด :</td>
				<td width="300">
					<input id="bk" name="bc" type="radio" value="bkk" {% if bc == 'bkk' %} checked {% endif %} OnClick="JavaScript:fncAlert();" /><label for="bk">กรุงเทพฯ</label>
				</td>
				<td width="170">
					<input id="cou" name="bc" type="radio" value="country" {% if bc == 'country' %} checked {% endif %} OnClick="JavaScript:fncAlert();" /><label for="cou">ต่างจังหวัด</label>
				</td>
				<td width="200">
					<div class="styled-select">
						<label for="cou">
						<select class="select" name="selProvince" id="selProvince" onchange="javascript:getAmpher()">
							{% for pvList in province %}
								<option value="{{ pvList.PROVINCE_VALUE }}"
                                    {% if selProvince == pvList.PROVINCE_VALUE %}
                                        selected="selected"
                                    {% endif %}
                                >{{ pvList.PROVINCE_NAME }}</option>
							{% endfor %}
						</select>
						</label>
					</div>
				</td>
			</tr>
		</table>
		
		<table id="tbk" style="margin-top:0px; border-right:1px solid #fff; float:left;">
			<tr height="50" valign="middle">
				<td align="left" width="165">โซนในกรุงเทพฯ :</td>
				<td width="250">
					<div class="styled-select">
                  
						<select class="select" id="sbk1" name="bkkZone" {% if bc == 'country' %} disabled {% endif %} >
							{% for zList in zonelist %}
								<option value="{{ zList.id }}"
                                    {% if bkkZone == zList.id %}
                                        selected="selected"
                                    {% endif %}
                                >{{ zList.zonename }}</option>
							{% endfor %}
						</select>
                  
					</div>
				</td><commit_msg>ทำ jquery หน้า search ให้นิ๊ก<commit_after>
<!-- peung -->
<script language="javascript">
    function fncAlert(){
        if(document.getElementById('bk').checked) {
           //$("#tbk").css("display","block");
           //$("#tcou").css("display","none");
           document.getElementById('sbk1').disabled=false;
           document.getElementById('sbk2').disabled=false;
           document.getElementById('sbk3').disabled=false;
           document.getElementById('sbk4').disabled=false;
           //document.getElementById('sbk5').disabled=false;
           document.getElementById('scou').disabled=true;
        }else if(document.getElementById('cou').checked) {
           //$("#tbk").css("display","none");
           //$("#tcou").css("display","block");
           document.getElementById('sbk1').disabled=true;
           document.getElementById('sbk2').disabled=true;
           document.getElementById('sbk3').disabled=true;
           document.getElementById('sbk4').disabled=true;
           //document.getElementById('sbk5').disabled=true;
           document.getElementById('scou').disabled=false;
        }
    }

    function getAmpher()
    {
        var  provincename = document.getElementById('selProvince').value;
        $.get("{{path('FTRWebBundle_search_ampher')}}", { province_name: provincename },
            function(data) {
                if(data != "no")
                {
                    document.getElementById('divAmpher').innerHTML = data;
                }
        });
    }

//    Rux
    $(document).ready(function() {

        //เลือกรายการต่างจังหวัด
        $("#selProvince").change(function(){
            $("#cou").attr('checked', true);
            fncAlert();
            getAmpher();
        });

        //คลิกปุ่ม ต่างจังหวัด
        $("#cou").click(function(){
            fncAlert();
            $("#selProvince").focus();
        });
    });
</script>
<form method="post" action="{{path('FTRWebBundle_list')}}?searchType=fullSearch" id="frmSearch" name="frmSearch">
<div id="search2">
	<img src="{{asset('images/search-i.png')}}" />
	<hr class="line" style="top: 60px;" />
    <div>
		<table>
			<tr height="50" valign="middle">
				<td align="right" style="padding-right:15px;">ประเภทหอพัก :</td>
				<td width="350">
					<div class="styled-select">
						<select class="select" name="selBuildingType" id="selBuildingType">
							{% for bType in buildingTypeList %}
								<option value="{{ bType.id }}"
                                    {% if selBuildingType == bType.id %}
                                        selected="selected"
                                    {% endif %}
                                >{{ bType.type_name }}</option>
							{% endfor %}
						</select>
					</div>
				</td>
				<td align="right" style="padding-right:15px;">ราคาเริ่มต้น :</td>
				<td width="350">
					<input class="price" value="{{ lessPrice }}" name="lessPrice" type="text" maxlength="10" placeholder="ราคาเริ่มต้น" />&nbsp;&nbsp;&nbsp;&nbsp;บาท
				</td>
			</tr>
			<tr height="50" valign="middle">
				<td align="right" style="padding-right:15px;">ชนิด :</td>
				<td>
					<div class="styled-select">
						<select class="select" name="bkkPayType" id="bkkPayType">
							{% for pType in payType %}
								<option value="{{ pType.id }}"
                                    {% if bkkPayType == pType.id %}
                                        selected="selected"
                                    {% endif %}
                                >{{ pType.typename }}</option>
							{% endfor %}
						</select>
					</div>
				</td>
				<td align="right" style="padding-right:15px;">ราคาไม่เกิน :</td>
				<td>
					<input class="price" value="{{ mostPrice }}" name="mostPrice" type="text" maxlength="10" placeholder="ราคาไม่เกิน" />&nbsp;&nbsp;&nbsp;&nbsp;บาท
				</td>
			</tr>
		</table>
	</div>
    <hr class="line" style="top: 185px;" />
    <div style="display:block;padding-bottom:10px;">
		<table>
			<tr height="50" valign="middle">
				<td align="left" width="165">จังหวัด :</td>
				<td width="300">
					<input id="bk" name="bc" type="radio" value="bkk" {% if bc == 'bkk' %} checked {% endif %} OnClick="JavaScript:fncAlert();" /><label for="bk">กรุงเทพฯ</label>
				</td>
				<td width="170">
					<input id="cou" name="bc" type="radio" value="country" {% if bc == 'country' %} checked {% endif %} /><label for="cou">ต่างจังหวัด</label>
				</td>
				<td width="200">
					<div class="styled-select">
						{#<label for="cou">#}
                            <select class="select" name="selProvince" id="selProvince">
                                {% for pvList in province %}
                                    <option value="{{ pvList.PROVINCE_VALUE }}"
                                        {% if selProvince == pvList.PROVINCE_VALUE %}
                                            selected="selected"
                                        {% endif %}
                                    >{{ pvList.PROVINCE_NAME }}</option>
                                {% endfor %}
                            </select>
						{#</label>#}
					</div>
				</td>
			</tr>
		</table>
		
		<table id="tbk" style="margin-top:0px; border-right:1px solid #fff; float:left;">
			<tr height="50" valign="middle">
				<td align="left" width="165">โซนในกรุงเทพฯ :</td>
				<td width="250">
					<div class="styled-select">
                  
						<select class="select" id="sbk1" name="bkkZone" {% if bc == 'country' %} disabled {% endif %} >
							{% for zList in zonelist %}
								<option value="{{ zList.id }}"
                                    {% if bkkZone == zList.id %}
                                        selected="selected"
                                    {% endif %}
                                >{{ zList.zonename }}</option>
							{% endfor %}
						</select>
                  
					</div>
				</td>
{'fraction_non_alphanumeric': 0.18441901408450703, 'fraction_numerical': 0.011443661971830986, 'mean_word_length': 1.963996869292982, 'pattern_counts': {'":': 0, '<': 173, '<?xml version=': 0, '>': 173, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 38, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1084580', 'n_tokens_mistral': 4145, 'n_tokens_neox': 3429, 'n_words': 569}