{* Build the category selection *}
{strip}

{if $smarty.const.CAT_SELECTION_METHOD eq 1}
   {if !empty ($CategoryTitle)}{$CategoryTitle}{else}{l}Please select a category!{/l}{/if}
   <input type="hidden" id="CATEGORY_ID" name="CATEGORY_ID" value="{$CATEGORY_ID}" />
   {*validate form="submit_article" id="v_CATEGORY_ID" message=$smarty.capture.no_url_in_top*}

{elseif $smarty.const.CAT_SELECTION_METHOD eq 2}
   <div id="catTitle">
      {if !empty ($CategoryTitle)}{$CategoryTitle}{else}{l}Please select a category!{/l}{/if}
   </div>
   <span id="toggleCategTree">{l}Change category{/l}</span>
   <input type="hidden" id="CATEGORY_ID" name="CATEGORY_ID" value="{$CATEGORY_ID}" />
   {*validate form="submit_article" id="v_CATEGORY_ID" message=$smarty.capture.no_url_in_top*}
   <div id="categtreebox"></div>

{else}
   {*html_options options=$categs selected=$CATEGORY_ID name="CATEGORY_ID"*}
   <select name="CATEGORY_ID">
   	{foreach from=$categs key=k item=v}
  	<option value="{$k}" {if $CATEGORY_ID eq $k} selected="selected" {/if} {if $v.closed eq 1}disabled = "disabled" {/if}>{$v.val}</option>
	{/foreach}
	</select>
   {*validate form="submit_article" id="v_CATEGORY_ID" message=$smarty.capture.no_url_in_top*}
{/if}
{/strip}