<inp2:adm_SetPopupSize width="880" height="680"/>

<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="bb" section="in-portal:browse" title_preset="topics_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('bb','<inp2:bb_SaveEvent/>');
						}
					) );
				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
							submit_event('bb','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('bb', '<inp2:bb_PrevId/>');
						}
				 ) );
				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
							go_to_id('bb', '<inp2:bb_NextId/>');
						}
				 ) );

				//a_toolbar.AddButton( new ToolBarSeparator('sep2') );

				a_toolbar.Render();

				<inp2:m_if check="bb_IsSingle" >
					a_toolbar.HideButton('prev');
					a_toolbar.HideButton('next');
					a_toolbar.HideButton('sep1');
					//a_toolbar.HideButton('sep2');
				<inp2:m_else/>
					<inp2:m_if check="bb_IsLast" >
						a_toolbar.DisableButton('next');
					</inp2:m_if>
					<inp2:m_if check="bb_IsFirst" >
						a_toolbar.DisableButton('prev');
					</inp2:m_if>
				</inp2:m_if>
			</script>
		</td>
	</tr>
</tbody>
</table>

<inp2:bb_SaveWarning name="grid_save_warning"/>
<inp2:bb_ErrorWarning name="form_error_warning"/>

<div id="scroll_container">
	<table class="edit-form">
		<inp2:m_RenderElement name="subsection" title="!la_section_Topic!"/>
			<inp2:m_RenderElement name="inp_id_label" prefix="bb" field="TopicId" title="!la_fld_Id!"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="bb" field="TopicText" title="la_fld_Subject" size="70"/>

			<inp2:m_if check="bb_FieldEquals" name="Posts" value="0">
				<inp2:m_RenderElement name="inp_edit_textarea" prefix="bb" field="PostingText" title="la_fld_MessageBody" control_options="{min_height: 100}" cols="70" rows="8"/>
			</inp2:m_if>

			<inp2:m_RenderElement name="inp_edit_user" prefix="bb" field="OwnerId" title="!la_fld_PostedBy!" size="40"/>
			<inp2:m_RenderElement name="inp_edit_options" prefix="bb" field="CategoryId" title="la_fld_ParentSection" display_original="1"/>

		<inp2:m_RenderElement name="subsection" title="!la_section_Properties!"/>
			<inp2:m_RenderElement name="inp_edit_radio" prefix="bb" field="TopicType" title="!la_fld_TopicType!"/>
			<inp2:m_RenderElement name="inp_edit_radio" prefix="bb" field="Status" title="!la_fld_Status!"/>
			<inp2:m_RenderElement name="inp_edit_radio" prefix="bb" field="NewItem" title="!la_fld_New!"/>
			<inp2:m_RenderElement name="inp_edit_radio" prefix="bb" field="HotItem" title="!la_fld_Hot!"/>
			<inp2:m_RenderElement name="inp_edit_radio" prefix="bb" field="PopItem" title="!la_fld_Pop!"/>
			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="bb" field="EditorsPick" title="!la_fld_EditorsPick!"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="bb" field="Priority" title="!la_fld_Priority!" size="4"/>
			<inp2:m_RenderElement name="inp_edit_date_time" prefix="bb" field="CreatedOn" title="!la_fld_CreatedOn!"/>
			<inp2:m_RenderElement name="inp_edit_date_time" prefix="bb" field="Modified" title="!la_fld_Modified!"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="bb" field="MetaKeywords" title="la_fld_MetaKeywords" size="70"/>
			<inp2:m_RenderElement name="inp_edit_textarea" prefix="bb" field="MetaDescription" title="la_fld_MetaDescription" control_options="{min_height: 100}" cols="70" rows="8"/>

		<inp2:m_RenderElement name="subsection" title="!la_section_Counters!"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="bb" field="CachedRating" title="!la_fld_Rating!" hint_label="la_prompt_RatingLimits" size="4"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="bb" field="CachedVotesQty" title="!la_fld_Votes!" hint_label="la_prompt_VoteLimits" size="4"/>
			<inp2:m_RenderElement name="inp_edit_box" prefix="bb" field="Views" title="!la_fld_Views!" hint_label="la_prompt_HitLimits" size="4"/>
			<input type="hidden" name="Views_original" id="Views_original" value="<inp2:bb_Field name="Views" db="db" />" />

		<!-- custom fields: begin -->
		<inp2:m_include t="incs/custom_blocks"/>
		<inp2:cf.general_PrintList render_as="cv_row_block" SourcePrefix="bb" value_field="Value" per_page="-1" grid="Default" />
		<!-- custom fields: end -->

		<inp2:m_RenderElement name="inp_edit_filler"/>
	</table>
</div>

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