{$layout "layout_popup"}

<!-- <h3>修改IP</h3> -->

<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
	<input type="hidden" name="itemId" :value="item.id"/>
	<csrf-token></csrf-token>
	<table class="ui table definition selectable">
        <tr>
            <td>IP或IP段 *</td>
            <td>
                <input type="text" name="value" maxlength="64" placeholder="x.x.x.x" ref="focus" style="width: 20em" v-model="item.value"/>
                <p class="comment">支持IPv4和IPv6；支持三种格式：单个IP（比如192.168.1.100）、IP范围（比如192.168.1.1-192.168.1.255）、CIDR（比如192.168.1.1/24）。</p>
            </td>
        </tr>
        <tr>
            <td class="title">过期时间</td>
            <td>
                <input type="text" name="expiredAt" v-model="expiredAtTimestamp" style="display: none;" />
                <p-calendar v-model="expiredAt" date-format="yy-mm-dd" :show-button-bar="true" @input="changeExpiredAt">
                    <template #date="{date}">
                        <span>{{date.day}}</span>
                    </template>
                </p-calendar>
                <!-- <datetime-input :v-name="'expiredAt'" :v-timestamp="item.expiredAt"></datetime-input> -->
                <p class="comment">在加入名单某一段时间后会失效，留空表示永久有效。</p>
            </td>
        </tr>
		<tr>
			<td colspan="2"><more-options-indicator></more-options-indicator></td>
		</tr>
		<tbody v-show="moreOptionsVisible">
			<tr>
				<td>备注</td>
				<td><input type="text" name="reason" maxlength="100" v-model="item.reason"/></td>
			</tr>
		</tbody>
	</table>
	<submit-btn></submit-btn>
</form>