<form class="layui-form ct-form" table="list">
	<fieldset class="layui-elem-field layui-field-title"><legend>列表url</legend></fieldset>
    <div class="layui-form-item">
        <label class="layui-form-label">动态列表渲染采集</label>
        <div class="layui-input-inline">
            <input type="checkbox" value="<?php echo CTspider_html('ctspider_task','list','dynamic',0) ?>" <?php checked(1,CTspider_html('ctspider_task','list','dynamic')) ?> name="dynamic" lay-skin="switch" lay-filter="dynamic" lay-text="开启|关闭">
        </div>
        <div class="layui-form-mid layui-word-aux">
            如果当前列表是动态渲染加载开启此功能，请确保当前采集项目列表均为动态加载
            <br>(Ps:使用本功能会增加服务器负载，目前支持90%动态渲染页面)
            <br>请先到系统配置,配置动态渲染组件。<a href="<?php echo home_url('/wp-admin/admin.php?page=ctspider%2Fwp-ctspider-config.php'); ?>">立即设置</a>
        </div>
    </div>
	<div class="layui-form-item">
		<textarea name="urls" lay-verify="required|url" rows="8" placeholder="" class="layui-textarea"><?php echo CTspider_html('ctspider_task', 'list', 'urls') ?></textarea>
		<div class="layui-form-mid layui-word-aux">可以添加多个网址，每个网址以新行开始</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">列表区域选择器</label>
		<div class="layui-input-block">
			<input type="text" name="list_range" value="<?php echo CTspider_html('ctspider_task','list','list_range') ?>" autocomplete="off" class="layui-input">
			<div class="layui-form-mid layui-word-aux">
				设置区域选择器, 采集更精准    ( 也可不设置 )
				<br>
				例如：#list>li 有a和img 两个同级标签
				<br>
				[ 区域css选择器设置: #list>li ],  
				[ 列表网址css选择器可设置: a ],  
				[ 列表缩略图CSS选择器可设置：img ]
				<br>
				直接作用域在当前的节点下查找
			</div>
		</div>
	</div>

	<fieldset class="layui-elem-field layui-field-title"><legend>列表缩略图</legend></fieldset>
	<div class="layui-form-item">
		<label class="layui-form-label">抓取列表缩略图</label>
		<div class="layui-input-inline">
			<input type="checkbox" value="<?php echo CTspider_html('ctspider_task','list','list_thumb',0) ?>" <?php checked(1,CTspider_html('ctspider_task','list','list_thumb')) ?> name="list_thumb" lay-skin="switch" lay-filter="list_thumb" lay-text="开启|关闭">
		</div>
	</div>
	<div class="ct-list-thumb-group"  <?php echo Ctdisplay(checked( 1,CTspider_html('ctspider_task','list','list_thumb') )) ?> >	
		<div class="layui-form-item">
			<label class="layui-form-label">CSS选择器</label>
			<div class="layui-input-block">
				<input type="text" name="list_thumb_select" value="<?php echo CTspider_html('ctspider_task','list','list_thumb_select') ?>" autocomplete="off" class="layui-input">
				<div class="layui-form-mid layui-word-aux">例如: #pic img</div>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">默认图片属性</label>
			<div class="layui-input-inline">
				<input type="text" name="list_thumb_attr" value="<?php echo CTspider_html('ctspider_task','list','list_thumb_attr') ?>" placeholder="src" autocomplete="off" class="layui-input">
			</div>
			<div class="layui-form-mid layui-word-aux">(默认: src)</div>
		</div>
	</div>
	<div class="layui-form-item">
		<br>
		<fieldset class="layui-elem-field layui-field-title"><legend>文章网址匹配</legend></fieldset>
		<label class="layui-form-label">文章网址CSS选择器</label>
		<div class="layui-input-block">
			<input type="text" lay-verify="required" lay-verType="tips" name="url_select" value="<?php echo CTspider_html('ctspider_task','list','url_select') ?>" autocomplete="off" class="layui-input">
			<div class="layui-form-mid layui-word-aux">必须选择 HTML a 标签, 例如: #list a</div>
		</div>
	</div>	
	<div class="layui-form-item">
		<label class="layui-form-label">添加来源网址到自定义字段</label>
		<div class="layui-input-inline">
			<input type="checkbox" value="<?php echo CTspider_html('ctspider_task','list','add_source_url') ?>" <?php @checked(1,CTspider_html('ctspider_task','list','add_source_url')) ?> name="add_source_url" lay-skin="switch" lay-filter="add_source_url" lay-text="开启|关闭">
		</div>
		<div class="layui-form-mid layui-word-aux">添加来源文章url到每篇文章的自定义字段，可以使用 get_post_meta() 函数获取该字段值。</div>
	</div>
	<div class="ct-source-custom-field-group" <?php echo Ctdisplay(checked( 1,CTspider_html('ctspider_task','list','add_source_url') )) ?> >
		<div class="layui-form-item">
			<label class="layui-form-label">自定义字段</label>
			<div class="layui-input-inline">
				<input type="text" name="source_url_custom_field" value="<?php echo CTspider_html('ctspider_task','list','source_url_custom_field') ?>" autocomplete="off" class="layui-input">
			</div>
		</div>	
	</div>
    <br><br>
	<hr>

    
	<button type="button" class="layui-btn" lay-submit lay-filter="list" >保存更改</button>
	<button type="button" class="layui-btn layui-btn-normal" lay-filter="listtest" >列表测试</button>
</form>
