<div id="selEditableMessages">
	<h2 class="clsManageStaticPageHeading">{$LANG.editable_messages_page_title}</h2>
	{include file='../general/information.tpl'}
	 <h3>{$myobj->staticPageTitle}</h3>
	<div id="selMsgConfirm" class="clsPopupConfirmation" style="display:none;position:absolute;">
		<p id="confirmMessage"></p>
		<form name="msgConfirmform" id="msgConfirmform" method="post" action="{$myobj->getCurrentUrl(true)}">
			<table summary="{$LANG.editable_messages_tbl_summary}">
				<tr>
					<td>
						<input type="submit" class="clsSubmitButton" name="confirm_action" id="confirm_action" tabindex="{smartyTabIndex}" value="{$LANG.common_yes_option}" />&nbsp;
						<input type="button" class="clsCancelButton" name="cancel" id="cancel" tabindex="{smartyTabIndex}" value="{$LANG.common_no_option}"  onClick="return hideAllBlocks('form_disp_editable_message');" />
						<input type="hidden" name="delete" id="delete1" />
						<input type="hidden" name="action" id="action" />
					</td>
				</tr>
			</table>
		</form>
	</div>
	{if $myobj->isShowPageBlock('form_add_messages')}
		<form name="form_editable_message" id="form_editable_message" method="post" action="{if $myobj->getFormField(id)}{$myobj->getCurrentUrl(true)}{else}{$myobj->getCurrentUrl()}{/if}" autocomplete="off">
			<table summary="{$LANG.editable_messages_tbl_summary}" class="clsStaticContentTbl">
				<tr>
					<td class="{$myobj->getCSSFormLabelCellClass('page_title')}"><label for="page_title">{$LANG.editable_messages_title}<span>*</span></label></td>
					<td class="{$myobj->getCSSFormFieldCellClass('page_title')}">
					{if  $myobj->getFormField('id') neq 0 }
						<strong>{$myobj->getFormField('page_title')|stripslashes}</strong>
						<input type="hidden" name="page_title" id="page_title" value="{$myobj->getFormField('page_title')|stripslashes}" />
					{else}
						<input type="text" class="clsTextBox  {$myobj->getCSSFormFieldElementClass('page_title')}"  maxlength="50" name="page_title" id="page_title" tabindex="{smartyTabIndex}" value="{$myobj->getFormField('page_title')|stripslashes}" />
						{$myobj->getFormFieldElementErrorTip('page_title')}
					{/if}
					</td>
			    </tr>
			    <tr>
					<td class="{$myobj->getCSSFormLabelCellClass('page_display_title')}"><label for="page_display_title">{$LANG.editable_messages_display_title}</label></td>
					<td class="{$myobj->getCSSFormFieldCellClass('page_display_title')}">
						<input type="text" class="clsTextBox" maxlength="50" name="page_display_title" id="page_display_title" tabindex="{smartyTabIndex}" value="{$myobj->getFormField('page_display_title')|stripslashes}" />{$myobj->getFormFieldElementErrorTip('page_display_title')}
					</td>
			    </tr>
			    <tr>
					<td class="{$myobj->getCSSFormLabelCellClass('page_content')}"><label for="page_content">{$LANG.editable_messages_content}<span>*</span></label></td>
					<td class="{$myobj->getCSSFormFieldCellClass('page_content')}">
						<textarea name="page_content" id="page_content" class="{$myobj->getCSSFormFieldElementClass('page_content')}" tabindex="{smartyTabIndex}">{$myobj->getFormField('page_content')|stripslashes}</textarea>
						{$myobj->getFormFieldElementErrorTip('page_content')}
					</td>
			    </tr>
			   	<tr>
					<td class="{$myobj->getCSSFormLabelCellClass('page_status')}"><label for="page_status_yes">{$LANG.common_status}</label></td>
					<td class="{$myobj->getCSSFormFieldCellClass('page_status')}">
						<input type="radio" name="page_status" id="page_status_yes" value="Yes"{if $myobj->getFormField('page_status') eq 'Yes'}  checked {/if} /><label for="page_status_yes">{$LANG.common_yes_option}</label>
						<input type="radio" name="page_status" id="page_status_no" value="No"{if $myobj->getFormField('page_status') eq 'No' }   checked  {/if} /><label for="page_status_no">{$LANG.common_no_option}</label>{$myobj->getFormFieldElementErrorTip('page_status')}
					</td>
			   </tr>
			   <tr>
					<td class="{$myobj->getCSSFormLabelCellClass('link_in_footer')}"><label for="link_in_footer_yes">{$LANG.editable_messages_footer_status}</label></td>
					<td class="{$myobj->getCSSFormFieldCellClass('link_in_footer')}">
						<input type="radio" name="link_in_footer" id="link_in_footer_yes" value="Yes"{if $myobj->getFormField('link_in_footer') eq 'Yes' }  checked {/if}  /><label for="link_in_footer_yes">{$LANG.common_yes_option}</label>
						<input type="radio" name="link_in_footer" id="link_in_footer_no" value="No"{if $myobj->getFormField('link_in_footer') eq 'No' }  checked {/if}  /><label for="link_in_footer_no">{$LANG.common_no_option}</label>{$myobj->getFormFieldElementErrorTip('link_in_footer')}
					</td>
			   </tr>
			   <tr>
               <td>&nbsp;</td>
		   			<td class="{$myobj->getCSSFormFieldCellClass('submit')}"><input type="submit" class="clsSubmitButton" name="addeditablemessage" id="addeditablemessage" tabindex="{smartyTabIndex}" value="{$myobj->form_add_messages.submitName}" />
					  	{if $myobj->getFormField('id') neq 0 }
					   		<input type="submit" class="clsCancelButton" name="canceleditablemessage" id="canceleditablemessage" tabindex="{smartyTabIndex}" value="{$LANG.common_cancel}" />
						{/if}
							 <input type="hidden" name="id" id="id" value="{$myobj->getFormField('id')}" /></td>
				</tr>
			</table>
		</form>
	{/if}
	{if  $myobj->isShowPageBlock('form_disp_messages')}
		<form name="form_disp_editable_message" id="form_disp_editable_message" method="post" action="{$myobj->getCurrentUrl(true)}">
		   <table summary="{$LANG.editable_messages_tbl_summary}">
				{if $myobj->isResultsFound()}
					<tr>
						<th class="clsSelectAllItems"><input type="checkbox" name="checkall" id="checkall" tabindex="{smartyTabIndex}" onclick="selectAll(this.form)"/></th>
						<th class="clsStatic{$myobj->getOrderCss('page_title')}"><a href="#" onclick="return changeOrderbyElements('form_disp_editable_message','page_title')">{$LANG.editable_messages_title}</a></th>
						<th class="clsStatic{$myobj->getOrderCss('page_display_title')}"><a href="#" onclick="return changeOrderbyElements('form_disp_editable_message','page_display_title')">{$LANG.editable_messages_display_title}</a></th>
						<th class="clsStatic{$myobj->getOrderCss('page_status')}"><a href="#" onclick="return changeOrderbyElements('form_disp_editable_message','page_status')">{$LANG.common_status}</a></th>
						<th class="clsSpotLightDate{$myobj->getOrderCss('link_in_footer')}"><a href="#" onclick="return changeOrderbyElements('form_disp_editable_message','link_in_footer')">{$LANG.editable_messages_footer_status}</th>
						<th class="clsSpotLightDate{$myobj->getOrderCss('page_added_date')}"><a href="#" onclick="return changeOrderbyElements('form_disp_editable_message','page_added_date')">{$LANG.last_changed}</a></th>
						<th class="clsMembersManage">{$LANG.editable_messages_manage}</th>
					</tr>
					{foreach key=inc item=value from=$myobj->form_disp_messages_arr.row}
						<tr>
							<td class="clsSelectAllItems"><input type="checkbox" name="delete[]" onclick="disableHeading('form_disp_editable_message');" value="{$value.record.page_id}" /></td>
							<td>{$value.record.page_title}</td>
							<td class="clsStaticContent">{$value.record.page_display_title}</td>
							<td>{ if $value.record.page_status eq'Yes' } {$LANG.common_yes_option} {else}{$LANG.common_no_option} {/if}</td>
							<td>{ if $value.record.link_in_footer eq 'Yes'  } {$LANG.common_yes_option} {else}{$LANG.common_no_option} {/if}</td>
							<td class="clsSpotLightDate">{$value.dateWithTime}</td>
							<td class="clsMembersManage"><a href="{$value.manageStaticPages_rul}">{$LANG.common_edit}</a></td>
						</tr>
					{/foreach}
					<tr>
						<td colspan="7" class="clsButtonAlignment">
							<a href="#" id="dAltMlti"></a>
							<select name="to_do" id="to_do">
								<option value="1" {if $myobj->getFormField('to_do') eq 1 } selected='selected' {/if} >{$LANG.common_delete}</option>
							</select>
							<input type="button" class="clsSubmitButton" name="submit_do" value="{$LANG.common_go}" onClick="{$myobj->form_disp_messages.getMultiCheckBoxValue}" tabindex="{smartyTabIndex}" />
						</td>
					</tr>
				{else}
					<tr>
						<td colspan="6">{$LANG.common_no_records_found}</td>
					</tr>
				{/if}
			</table>
			{if $CFG.admin.navigation.bottom}
	   			{include file='../general/pagination.tpl'}
	   		{/if}
				{$myobj->populateHidden($myobj->form_disp_messages_arr.msgConfirmForm_hidden_arr)}
		</form>
	{/if}

</div>