<?php
	ob_start();
?>
	<inp2:m_Set module="In-Portal" section="in-portal:configure_general"/>

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

	<inp2:m_DefineElement name="config_edit_text">
		<input type="text" tabindex="<inp2:m_get param='tab_index'/>" name="config[<inp2:Field name='VariableName'/>]" value="<inp2:Field field='$field'/>" <inp2:m_param name='field_params' />/>
	</inp2:m_DefineElement>

	<inp2:m_DefineElement name="config_edit_select">
		<select name="config[<inp2:Field name='VariableName'/>]" tabindex="<inp2:m_get param="tab_index"/>">
			<inp2:PredefinedOptions field="$field" block="config_edit_option" selected="selected"/>
		</select>
	</inp2:m_DefineElement>

	<inp2:m_DefineElement name="config_edit_checkbox" field_class="">
		<input type="hidden" id="<inp2:InputName field="$field"/>" name="config[<inp2:Field name='VariableName'/>]" value="<inp2:Field field="$field" db="db"/>">
		<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:m_param name="field"/>" name="_cb_<inp2:InputName field="$field"/>" <inp2:Field field="$field" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:InputName field="$field"/>'))">
	</inp2:m_DefineElement>

	<inp2:m_DefineElement name="config_edit_textarea">
		<textarea tabindex="<inp2:m_get param='tab_index'/>" name="config[<inp2:Field name='VariableName'/>]" <inp2:m_param name="field_params" />><inp2:Field field="$field" /></textarea>
	</inp2:m_DefineElement>

	<inp2:m_DefineElement name="config_radio_item">
		<input type="radio" <inp2:m_param name='checked'/> name="config[<inp2:Field name='VariableName'/>]" id="<inp2:InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_param name="option"/></label>&nbsp;
	</inp2:m_DefineElement>

	<inp2:m_DefineElement name="config_block">
		<inp2:m_inc param="tab_index" by="1"/>
		<inp2:m_if check="m_ParamEquals" name="show_heading" value="1">
			<tr class="subsectiontitle">
				<td colspan="3" style="<inp2:m_if check='m_Get' name='first_row' inverse='inverse'>border-top: 1px solid #000000; </inp2:m_if>border-bottom: 1px solid #000000;">
		    		<inp2:Field name="heading" as_label="1"/>
		   		</td>
			</tr>
			<inp2:m_Set first_row="0"/>
		</inp2:m_if>
		<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>" id="<inp2:m_param name="PrefixSpecial"/>_<inp2:field field="$IdField"/>" header_label="<inp2:Field name="heading"/>">
			<td>
				<inp2:Field field="prompt" as_label="1" />
				<inp2:m_if check="m_IsDebugMode">
					<br><small>[<inp2:Field field="DisplayOrder"/>] <inp2:Field field="VariableName"/></small>
				</inp2:m_if>
			</td>

			<td>
				<inp2:ConfigFormElement PrefixSpecial="$PrefixSpecial" field="VariableValue" blocks_prefix="config_edit_" element_type_field="element_type" value_list_field="ValueList"/>
			</td>

			<td class="error"><inp2:Error id_field="VariableName"/>&nbsp;</td>
		</tr>
	</inp2:m_DefineElement>

	<inp2:m_DefineElement name="config_block1">
		<inp2:m_inc param="tab_index" by="1"/>
		<inp2:m_if check="m_ParamEquals" name="show_heading" value="1">
			<tr class="subsectiontitle">
				<td colspan="3" style="<inp2:m_if check='m_Get' name='first_row' inverse='inverse'>border-top: 1px solid #000000; </inp2:m_if>border-bottom: 1px solid #000000;">
		    		<inp2:Field name="heading" as_label="1"/>
		   		</td>
			</tr>
			<inp2:m_Set first_row="0"/>
		</inp2:m_if>
		<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>" id="<inp2:m_param name="PrefixSpecial"/>_<inp2:Field field="$IdField"/>" header_label="<inp2:Field name="heading"/>">
			<td>
				<inp2:Field field="prompt" as_label="1" />
				<inp2:m_if check="m_IsDebugMode">
					<br><small>[<inp2:Field field="DisplayOrder"/>] <inp2:Field field="VariableName"/></small>
				</inp2:m_if>
			</td>

			<td>
				<nobr><inp2:ConfigFormElement PrefixSpecial="$PrefixSpecial" field="VariableValue" blocks_prefix="config_edit_" element_type_field="element_type" value_list_field="ValueList"/>&nbsp;&nbsp;
	</inp2:m_DefineElement>

	<inp2:m_Set first_row="1"/>
	<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered" id="config_table">
		<inp2:conf_PrintList list_name="default" block="config_block" full_block="config_block" half_block1="config_block1" half_block2="config_block2" per_page="-1"/>

	</table>
<?php
	define('EDITING_MODE', '');
	$this->Application->InitParser();
	echo '<tr><td colspan="2" style="padding: 0px;">' . $this->Application->Parser->Parse(ob_get_clean(), 'post_config') . '</td></tr>';
?>