<table width="100%" >
<tr><td class="label" >区块名称</td><td><input name='art_box[block_name]' value='<%{$out.block_data.block_name}%>'></td>
<tr>
<td class="label" >对应分类</td><td>
	<select name="art_box[cat_id]" >
	 	<option value="0">所有分类</option>
	 	<option value="this_cat"  <%{if $out.block_data.block_setting.art_box.cat_id=='this_cat' }%> selected=true <%{/if}%> >当前分类</option>
		<%{foreach from=$out.art_category_res item=c_v key=c_k}%>
			<option value="<%{$c_v.parent.cat_id}%>" <%{if $out.block_data.block_setting.art_box.cat_id==$c_v.parent.cat_id}%> selected=true<%{/if}%>  ><%{$c_v.parent.cat_name|escape:html}%></option>
			<%{foreach from=$c_v.children item=c_v_c key=c_k_c}%>			
				<option value="<%{$c_v_c.cat_id}%>"  <%{if $out.block_data.block_setting.art_box.cat_id==$c_v_c.cat_id}%> selected=true<%{/if}%>>&nbsp;&nbsp;&nbsp;&nbsp;<%{$c_v_c.cat_name|escape:html}%></option>
			<%{/foreach}%>
		<%{/foreach}%>
		</select>&nbsp;&nbsp; 是否显示当前分类名称 <input type='checkbox' value=1 name='art_box[is_catname]' <%{if $out.block_data.block_setting.art_box.is_catname }%> checked=true <%{/if}%>  >
</td>
</tr>
<tr>
<td class="label" >提取顺序</td><td><select name='art_box[order_type]'>
<option value='last_update' <%{if $out.block_data.block_setting.art_box.order_type=='last_update'}%> selected=true<%{/if}%>  > 按发布 / 更新日期 </option>
</select>&nbsp;&nbsp;
<select name='art_box[order_sort]'>
	<option value='DESC' <%{if $out.block_data.block_setting.art_box.order_sort=='DESC'}%> selected=true<%{/if}%>>倒序</option>
	<option value='ASC'  <%{if $out.block_data.block_setting.art_box.order_sort=='ASC'}%> selected=true<%{/if}%> >顺序</option>
</select>
<tr>
<td class="label" >类型过滤</td><td>
<input type='checkbox' value='is_article'   name='art_box[type][]' <%{if $smarty.get.block_id&& 'is_article'|in_array:$out.block_data.block_setting.art_box.type}%> checked=true <%{else if !$out.block_data.block_setting.art_box.type}%> checked=true<%{/if}%>  >文章频道&nbsp;&nbsp; 
<input type='checkbox' value='is_support' name='art_box[type][]'  <%{if  $smarty.get.block_id&& 'is_support'|in_array:$out.block_data.block_setting.art_box.type}%> checked=true <%{/if}%> >Support频道&nbsp;&nbsp;
<input type='checkbox' value='is_news' name='art_box[type][]' <%{if $smarty.get.block_id&& 'is_news'|in_array:$out.block_data.block_setting.art_box.type}%> checked=true <%{/if}%> >新闻栏目&nbsp;&nbsp;
</tr>

<tr>
<td class="label" >显示数量</td><td><input name='art_box[num]' size=4 value='<%{if $out.block_data.block_setting.art_box.num}%><%{$out.block_data.block_setting.art_box.num}%><%{else}%>10<%{/if}%>'></td>
</tr>

<tr>
<td class="label" >文章名最大字节数</td><td> <input name='art_box[name_length]' size=4   value='<%{ if $out.block_data.block_setting.art_box.name_length}%><%{$out.block_data.block_setting.art_box.name_length}%><%{else}%>50<%{/if}%>'></td>
</tr>

<script>
$(document).ready(function(){
	$("#block_form_id").submit(function(){
		if(!$("input[name='art_box[block_name]']").val()){
			alert('请填写区块名称');
			$("input[name='art_box[block_name]']")[0].focus();
			return false;
		}
	});			
		
});
</script>
