<inp2:adm_SetPopupSize width="790" height="440"/>
<inp2:m_include t="incs/header"/>

<inp2:m_RenderElement name="combined_header" prefix="lst" section="in-link:listing_types" title_preset="listing_type_edit" tab_preset="Default"/>

<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
	<tr>
  	<td>
  		<script type="text/javascript">
				a_toolbar = new ToolBar();
				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
						submit_event('lst','<inp2:lst_SaveEvent/>');
						}
					) );
				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
						submit_event('lst','OnCancelEdit');
						}
				 ) );

				a_toolbar.AddButton( new ToolBarSeparator('sep1') );

				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
							go_to_id('lst', '<inp2:lst_PrevId/>');
						}
				 ) );
				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
							go_to_id('lst', '<inp2:lst_NextId/>');
						}
				 ) );

				a_toolbar.Render();

				<inp2:m_if check="lst_IsSingle" >
					a_toolbar.HideButton('prev');
					a_toolbar.HideButton('next');
					a_toolbar.HideButton('sep1');
				<inp2:m_else/>
					<inp2:m_if check="lst_IsLast" >
						a_toolbar.DisableButton('next');
					</inp2:m_if>
					<inp2:m_if check="lst_IsFirst" >
						a_toolbar.DisableButton('prev');
					</inp2:m_if>
				</inp2:m_if>
			</script>
		</td>
	</tr>
</tbody>
</table>

<inp2:lst_SaveWarning name="grid_save_warning"/>
<inp2:lst_ErrorWarning name="form_error_warning"/>

<div id="scroll_container">
	<table class="edit-form">
		<inp2:m_RenderElement name="subsection" title="la_Text_PaidListingType"/>
			<inp2:m_RenderElement name="inp_id_label" prefix="lst" field="ListingTypeId" title="la_fld_ListingTypeId"/>

			<inp2:m_RenderElement name="inp_edit_box" prefix="lst" field="Name" title="la_fld_ListingTypeName" size="20"/>

			<inp2:m_RenderElement name="inp_edit_textarea" prefix="lst" field="Description" title="la_fld_ListingTypeDescription" allow_html="1" rows="10" cols="40"/>

			<inp2:m_RenderElement design="form_row" prefix="lst" field="Duration" title="la_fld_Duration">
				<td class="control-cell">
					<input type="text" name="<inp2:lst_InputName field="Duration" />" id="<inp2:lst_InputName field="Duration" />" value="<inp2:lst_Field name="Duration" />" tabindex="<inp2:m_get param="tab_index"/>" size="5">
					<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:lst_InputName field="DurationType"/>" id="<inp2:lst_InputName field="DurationType"/>">
						<inp2:lst_PredefinedOptions field="DurationType" block="inp_option_phrase" selected="selected" prefix="lst" />
					</select>
				</td>
			</inp2:m_RenderElement>

			<inp2:m_RenderElement design="form_row" prefix="lst" field="RenewalReminder" title="la_fld_RenewalReminder">
				<td class="control-cell">
					<input type="text" name="<inp2:lst_InputName field="RenewalReminder"/>" id="<inp2:lst_InputName field="RenewalReminder" />" value="<inp2:lst_Field field="RenewalReminder" />" tabindex="<inp2:m_get param="tab_index"/>" size="5">
					<inp2:m_Phrase label="la_days" />
				</td>
			</inp2:m_RenderElement>

			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
				<inp2:m_inc param="tab_index" by="1"/>
				<td class="label-cell">&nbsp;</td>
				<td class="control-mid">&nbsp;</td>
				<td class="control-cell">
					<table cellpadding="0" cellspacing="0">
						<tr>
							<td style="width: 300px; text-align: center;">
								<strong><inp2:m_phrase label="la_ActionsUponPurchase" /></strong>
							</td>
							<td style="width: 300px; text-align: center;">
								<strong><inp2:m_phrase label="la_ActionsUponExpire" /></strong>
							</td>
						</tr>
					</table>
				</td>
			</tr>

			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
				<inp2:m_inc param="tab_index" by="1"/>
				<td class="label-cell"><inp2:m_phrase label="la_fld_EditorsPick"/></td>
				<td class="control-mid">&nbsp;</td>
				<td class="control-cell">
					<table cellpadding="0" cellspacing="0">
						<tr>
							<td style="width: 300px;">
								<inp2:lst_PredefinedOptions field="OnPurchaseEdPick" block="inp_radio_phrase" selected="checked" prefix="lst" />
							</td>
							<td style="width: 300px;">
								<inp2:lst_PredefinedOptions field="OnExpireEdPick" block="inp_radio_phrase" selected="checked" prefix="lst" />
							</td>
						</tr>
					</table>
				</td>
			</tr>

			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
				<inp2:m_inc param="tab_index" by="1"/>
				<td class="label-cell"><inp2:m_phrase label="la_fld_LinkStatus"/></td>
				<td class="control-mid">&nbsp;</td>
				<td class="control-cell">
					<table cellpadding="0" cellspacing="0">
						<tr>
							<td style="width: 300px;">
								<inp2:lst_PredefinedOptions field="OnPurchaseStatus" block="inp_radio_phrase" selected="checked" prefix="lst" />
							</td>
							<td style="width: 300px;">
								<inp2:lst_PredefinedOptions field="OnExpireStatus" block="inp_radio_phrase" selected="checked" prefix="lst" />
							</td>
						</tr>
					</table>
				</td>
			</tr>

			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
				<inp2:m_inc param="tab_index" by="1"/>
				<td class="label-cell"><inp2:m_phrase label="la_fld_New"/></td>
				<td class="control-mid">&nbsp;</td>
				<td class="control-cell">
					<table cellpadding="0" cellspacing="0">
						<tr>
							<td style="width: 300px;">
								<inp2:lst_PredefinedOptions field="OnPurchaseNew" block="inp_radio_phrase" selected="checked" prefix="lst" />
							</td>
							<td style="width: 300px;">
								<inp2:lst_PredefinedOptions field="OnExpireNew" block="inp_radio_phrase" selected="checked" prefix="lst" />
							</td>
						</tr>
					</table>
				</td>
			</tr>

			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
				<inp2:m_inc param="tab_index" by="1"/>
				<td class="label-cell"><inp2:m_phrase label="la_fld_Pop"/></td>
				<td class="control-mid">&nbsp;</td>
				<td class="control-cell">
					<table cellpadding="0" cellspacing="0">
						<tr>
							<td style="width: 300px;">
								<inp2:lst_PredefinedOptions field="OnPurchasePop" block="inp_radio_phrase" selected="checked" prefix="lst" />
							</td>
							<td style="width: 300px;">
								<inp2:lst_PredefinedOptions field="OnExpirePop" block="inp_radio_phrase" selected="checked" prefix="lst" />
							</td>
						</tr>
					</table>
				</td>
			</tr>

			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
				<inp2:m_inc param="tab_index" by="1"/>
				<td class="label-cell"><inp2:m_phrase label="la_fld_Hot"/></td>
				<td class="control-mid">&nbsp;</td>
				<td class="control-cell">
					<table cellpadding="0" cellspacing="0">
						<tr>
							<td style="width: 300px;">
								<inp2:lst_PredefinedOptions field="OnPurchaseHot" block="inp_radio_phrase" selected="checked" prefix="lst" />
							</td>
							<td style="width: 300px;">
								<inp2:lst_PredefinedOptions field="OnExpireHot" block="inp_radio_phrase" selected="checked" prefix="lst" />
							</td>
						</tr>
					</table>
				</td>
			</tr>

			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
				<inp2:m_inc param="tab_index" by="1"/>
				<td class="label-cell"><inp2:m_phrase label="la_fld_Priority"/></td>
				<td class="control-mid">&nbsp;</td>
				<td class="control-cell">
					<table cellpadding="0" cellspacing="0">
						<tr>
							<td style="width: 300px;">
								<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:lst_InputName field="OnPurchasePriorityAction"/>" id="<inp2:lst_InputName field="OnPurchasePriorityAction" />" onchange="check_priority('<inp2:lst_InputName field="OnPurchasePriorityAction" />', '<inp2:lst_InputName field="OnPurchasePriorityValue" />')">
									<inp2:lst_PredefinedOptions field="OnPurchasePriorityAction" block="inp_option_phrase" selected="selected" prefix="lst" />
								</select>
								<input type="text" name="<inp2:lst_InputName field="OnPurchasePriorityValue" />" id="<inp2:lst_InputName field="OnPurchasePriorityValue" />" value="<inp2:lst_Field field="OnPurchasePriorityValue" />" tabindex="<inp2:m_get param="tab_index"/>" size="5">
							</td>
							<td style="width: 300px;">
								<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:lst_InputName field="OnExpirePriorityAction"/>" id="<inp2:lst_InputName field="OnExpirePriorityAction" />" onchange="check_priority('<inp2:lst_InputName field="OnExpirePriorityAction" />', '<inp2:lst_InputName field="OnExpirePriorityValue" />')">
									<inp2:lst_PredefinedOptions field="OnExpirePriorityAction" block="inp_option_phrase" selected="selected" prefix="lst" />
								</select>
								<input type="text" name="<inp2:lst_InputName field="OnExpirePriorityValue" />" id="<inp2:lst_InputName field="OnExpirePriorityValue" />" value="<inp2:lst_Field field="OnExpirePriorityValue" />" tabindex="<inp2:m_get param="tab_index"/>" size="5">
							</td>
						</tr>
					</table>
				</td>
			</tr>

			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
				<inp2:m_inc param="tab_index" by="1"/>
				<td class="label-cell"><inp2:m_phrase label="la_fld_CustomDetailTemplate"/></td>
				<td class="control-mid">&nbsp;</td>
				<td class="control-cell">
					<table cellpadding="0" cellspacing="0">
						<tr>
							<td style="width: 300px;">
								<input type="text" name="<inp2:lst_InputName field="OnPurchaseCustomTemplate" />" id="<inp2:lst_InputName field="OnPurchaseCustomTemplate" />" value="<inp2:lst_Field field="OnPurchaseCustomTemplate" />" tabindex="<inp2:m_get param="tab_index"/>" size="40">
							</td>
							<td style="width: 300px;">
								<input type="text" name="<inp2:lst_InputName field="OnExpireCustomTemplate" />" id="<inp2:lst_InputName field="OnExpireCustomTemplate" />" value="<inp2:lst_Field field="OnExpireCustomTemplate" />" tabindex="<inp2:m_get param="tab_index"/>" size="40">
							</td>
						</tr>
					</table>
				</td>
			</tr>

			<inp2:m_DefineElement name="config_edit_cat" >
				<input type="hidden" name="<inp2:lst_InputName field="{$field}"/>" value="<inp2:lst_Field field="{$field}" />" />
			</inp2:m_DefineElement>

			<inp2:m_DefineElement name="category_selector">
				<a href="<inp2:adm_SelectorLink prefix='lst' selection_mode='single' tab_prefixes='none'/>" onclick="openSelector('lst', this.href, '<inp2:m_param name="field"/>', null, 'OnPreSaveListingType'); return false;"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
			</inp2:m_DefineElement>

			<inp2:m_DefineElement name="category_caption" >
				<inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
			</inp2:m_DefineElement>

			<inp2:m_DefineElement name="root_cat_caption" >
				<inp2:m_param name="cat_name"/>
			</inp2:m_DefineElement>

			<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
				<inp2:m_inc param="tab_index" by="1"/>
				<td class="label-cell"><inp2:m_phrase label="la_fld_AdditionalSection"/></td>
				<td class="control-mid">&nbsp;</td>
				<td class="control-cell">
					<table cellpadding="0" cellspacing="0">
						<tr>
							<td style="width: 300px;">
								<input type="hidden" id="<inp2:lst_InputName field="OnPurchaseAddToCatEnabled"/>" name="<inp2:lst_InputName field="OnPurchaseAddToCatEnabled"/>" value="<inp2:lst_Field field="OnPurchaseAddToCatEnabled" db="db"/>">
								<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:lst_InputName field="OnPurchaseAddToCatEnabled"/>" name="_cb_<inp2:lst_InputName field="OnPurchaseAddToCatEnabled"/>" <inp2:lst_Field field="OnPurchaseAddToCatEnabled" checked="checked" db="db"/> onclick="update_checkbox(this, document.getElementById('<inp2:lst_InputName field="OnPurchaseAddToCatEnabled"/>'))">
								<inp2:m_phrase label="la_AddTo" />
								<strong>
								<inp2:lst_CategoryPath separator=" &gt; " root_cat_render_as="root_cat_caption" render_as="category_caption" module="In-Link" field="OnPurchaseAddToCat" /></strong>
								<inp2:m_RenderElement name="config_edit_cat" field="OnPurchaseAddToCat" />
								<inp2:m_RenderElement name="category_selector" field="OnPurchaseAddToCat" />
							</td>
							<td style="width: 300px;">
								<input type="hidden" id="<inp2:lst_InputName field="OnExpireRemoveFromCatEnabled"/>" name="<inp2:lst_InputName field="OnExpireRemoveFromCatEnabled"/>" value="<inp2:lst_Field field="OnExpireRemoveFromCatEnabled" db="db"/>">
								<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:lst_InputName field="OnExpireRemoveFromCatEnabled"/>" name="_cb_<inp2:lst_InputName field="OnExpireRemoveFromCatEnabled"/>" <inp2:lst_Field field="OnExpireRemoveFromCatEnabled" checked="checked" db="db"/> onclick="update_checkbox(this, document.getElementById('<inp2:lst_InputName field="OnExpireRemoveFromCatEnabled"/>'))">
								<inp2:m_phrase label="la_RemoveFrom" />
								<strong>
								<inp2:lst_CategoryPath separator=" &gt; " root_cat_render_as="root_cat_caption" render_as="category_caption" module="In-Link" field="OnExpireRemoveFromCat" /></strong>
								<inp2:m_RenderElement name="config_edit_cat" field="OnExpireRemoveFromCat" />
								<inp2:m_RenderElement name="category_selector" field="OnExpireRemoveFromCat" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
		<inp2:m_RenderElement name="inp_edit_filler"/>
	</table>
</div>

<input type="hidden" name="main_prefix" id="main_prefix" value="lst">

<script type="text/javascript">
	function check_priority(option_field, value_field)
	{
		if(document.getElementById(option_field).value == 0)
		{
			document.getElementById(value_field).disabled = true;
		}
		else
		{
			document.getElementById(value_field).disabled = false;
		}
	}

	check_priority('<inp2:lst_InputName field="OnPurchasePriorityAction" />', '<inp2:lst_InputName field="OnPurchasePriorityValue" />');
	check_priority('<inp2:lst_InputName field="OnExpirePriorityAction" />', '<inp2:lst_InputName field="OnExpirePriorityValue" />')
</script>

<inp2:m_include t="incs/footer"/>