{$layout}

	{$template "../waf_menu"}
	{$template "menu"}

	<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
		<input type="hidden" name="firewallPolicyId" :value="firewallPolicyId"/>
        <input type="hidden" name="exceptURLPatternsJSON" :value="JSON.stringify(exceptURLPatterns)"/>
        <input type="hidden" name="onlyURLPatternsJSON" :value="JSON.stringify(onlyURLPatterns)"/>
		<table class="ui table selectable definition">
            <tr>
                <td class="title">仅允许的省份</td>
                <td>
                    <http-firewall-province-selector :v-provinces="allowedProvinces" :v-type="'allow'" @change="changeAllowedProvinces"></http-firewall-province-selector>
                </td>
            </tr>
            <tr>
                <td class="title">仅封禁的省份</td>
                <td>
                    <p class="comment" v-if="allowedProvinces.length > 0">由于你已设置"仅允许的省份"，所以不需要再设置封禁省份。</p>
                    <http-firewall-province-selector :v-provinces="deniedProvinces" :v-type="'deny'" v-show="allowedProvinces.length == 0"></http-firewall-province-selector>
                </td>
            </tr>
            <tr>
                <td colspan="2"><more-options-indicator></more-options-indicator></td>
            </tr>
            <tbody v-show="moreOptionsVisible">
                <tr>
                    <td>例外URL &nbsp;<tip-icon content="对这些URL将不做任何限制。"></tip-icon></td>
                    <td><url-patterns-box v-model="exceptURLPatterns"></url-patterns-box></td>
                </tr>
                <tr>
                    <td>限制URL &nbsp;<tip-icon content="只对这些URL做限制。"></tip-icon></td>
                    <td><url-patterns-box v-model="onlyURLPatterns"></url-patterns-box></td>
                </tr>
                <tr>
                    <td>提示内容</td>
                    <td>
                        <textarea v-model="provinceHTML" name="provinceHTML" rows="3"></textarea>
                        <p class="comment">当客户端所在省份被封禁时提示页面的HTML内容；不填则表示使用默认的提示内容；支持请求变量。</p>
                    </td>
                </tr>
            </tbody>
		</table>
		<submit-btn></submit-btn>
	</form>