{$layout "layout_popup"}

<h3 v-if="!isUpdating">添加域名绑定</h3>
<h3 v-if="isUpdating">修改域名绑定</h3>
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
	<input type="hidden" name="mode" :value="mode"/>
	<table class="ui table selectable definition">
		<tr v-if="mode == 'single'">
			<td class="title">单个域名 *</td>
			<td>
				<input type="text" name="serverName" ref="focus" maxlength="1024" v-model="serverName.name"/>
                <p class="comment">请输入单个域名，比如<code-label>example.com</code-label>、<code-label>www.example.com</code-label>，<strong>不要</strong>包含<code-label>http://</code-label>或<code-label>https://</code-label>或端口号；也可以使用泛域名，比如<code-label>*.example.com</code-label>。</p>
			</td>
		</tr>
		<tr v-if="mode == 'multiple'">
			<td class="title">多个域名 *</td>
			<td>
				<textarea name="serverNames" ref="serverNames" v-model="multipleServerNames"></textarea>
                <p class="comment">每行一个域名，比如<code-label>example.com</code-label>、<code-label>www.example.com</code-label>，<strong>不要</strong>包含<code-label>http://</code-label>或<code-label>https://</code-label>或端口号；也可以使用泛域名，比如<code-label>*.example.com</code-label>。</p>
			</td>
		</tr>
	</table>
	<submit-btn></submit-btn> &nbsp; <a href="" v-if="mode == 'single'" @click.prevent="switchMode('multiple')">批量添加</a><a href="" v-if="mode == 'multiple'" @click.prevent="switchMode('single')">单个添加</a>
</form>