<form lang="true">

	<title>{SELF.TITLE} Category</title>

	<action>{SELF.URI.STORE}</action>
	<name>edit</name>
	<width>100%</width>
	<alternance>true</alternance>
	<encoding>multipart/form-data</encoding>

	<skin>DarkBlue</skin>



	<formtag>true</formtag>
	<border>true</border>
	
	<buttons>		
		<set>
			<header>true</header>
		</set>


		<button_back onclick="" button="return">
			<location>{PRIVATE.FORM_PREVIOUS_PAGE}</location>
		</button_back>

		<button_edit onclick="" button="edit">
			<location>{SELF.URI.EDIT}</location>
		</button_edit>

		<button_save button="saveall">
			<location>javascript:$('form').first().trigger('submit');</location>
		</button_save>

	</buttons>

	<redirect>{PHP}?sub=accounts</redirect>

	<fields>
		<cat_id type="hidden"/>		
		<cat_order type="hidden"/>		
		<module_id type="hidden" default="eval:$_GET[module_id]"/>		

		<cat_title type="textbox" width="100%" title="Name" required="true" validate="A:2:200" lang="true" restricted="eval:(($_GET['action'] == 'details' && !$_GET[section]) || $_GET[action] != 'details') ;"/>

		<box title="Brief" width="7" restricted="eval:$_GET['section'];">
			<fields>

				<cat_title type="textbox" width="100%" title="Name" required="true" validate="A:2:200" lang="true"/>
				<cat_url type="textbox" width="100%" title="URL" required="true" validate="A:2:200" u_nique="true" preffix="{MODULE.PUB.LINK}"  suffix="/" lang="true"/>
				<cat_icon type="textbox" title="Menu Icon" width="100%" onclick="javascript:BrowseIconFonts(jQuery('#cat_icon').val() , '#cat_icon' );" description="Click inside the field to open the Icon Library."/>

				<cat_brief type="textarea" width="100%" size="1:6" title="Brief" lang="true"/>

				<subtitle title="Resource" type="minititle" />


				<cat_tn_type type="droplist" title="Type" >
					<options>
						<option name="0">none</option>
						<option name="1">image</option>
						<option name="2">icon</option>
					</options>
				</cat_tn_type>

				<cat_tn_icon type="textbox" title="Icon" width="100%" onclick="javascript:BrowseIconFonts(jQuery('#cat_tn_icon').val() , '#cat_tn_icon' );" description="Click inside the field to open the Icon Library."/>

				<cat_tn_image valign="top" adminwidth="100" type="image" path="./faq/" absolute="false" editable="true" title="Image (720px width)" >
					<file default="cat_" field="cat_id" ext=".jpg" />			
						<title></title>
					<error>No available image.</error>						
					<thumbnails>
						<resize generate="true" width="720" _height="480" />
					</thumbnails>
				</cat_tn_image>



				<subtitle_details title="Description" type="subtitle" lang="true"/>

				<cat_description type="textarea" width="100%" size="3:4" height="200" html="true" lang="true" extend="true" _title="Description"/>
			</fields>
		</box>


		<box title="Settings" width="5" restricted="eval:$_GET['section'];">
			<fields>

				<cat_status type="checkbox" checked="1" label="published|unpublished" title="Status" default="1"/>

				<cat_date type="calendar" title="Date"	default="eval:time();">
					<calendar align="Bl" time="true"/>
					<description>If you set a date in the future it will be published automatically then.</description>
				</cat_date>

				<subtitle_animations title="CSS Class(es)" type="subtitle" collapsed="true"/>
				<comment type="comment">
					<description><![CDATA[Apply <a href="javascript:CSSClasses();">animations</a> or classes that you created in <a href="index.php?mod=skineditor&sub=skins" target="_blank">Style & Skins</a>.]]></description>
				</comment>


				<cat_css_list type="textbox" width="100%" title="Listing" />
				<cat_css_details type="textbox" width="100%" title="Details" />

				<subtitle_seo title="SEO Settings" type="subtitle" />
				<seo_title type="textarea" size="1:2" width="100%" title="Meta Title" lang="true" description="Use 55-65 chars although you can test for slightly longer titles."/>
				<seo_desc type="textarea" size="1:3" width="100%" title="Meta Desc" lang="true" description="Use ~150 chars although longer descriptions show for longer queries."/>
				<seo_meta type="checklist" lang="true" newline="false" default="index,follow">
					<options>
						<option name="index">index</option>
						<option name="follow">follow</option>
						<option name="noindex">noindex</option>
						<option name="nofollow">nofollow</option>
					</options>
					<title>Robots &lt;META&gt;</title>
				</seo_meta>


				<sem_title type="subtitle" title="Append HTML Snippets" collapsed="true"/>
				<seo_conv_head type="textarea" width="100%" size="2:4" lang="true" extend="true" script="true">
					<title>&lt;head&gt;&lt;/head&gt;</title>
				</seo_conv_head>

				<seo_conv_body type="textarea" width="100%" size="2:4" lang="true" extend="true" script="true">
					<title>&lt;body&gt;&lt;/body&gt;</title>
				</seo_conv_body>

			</fields>
		</box>

	</fields>

	<javascript>
		<after><![CDATA[


			formPageUrl(
				$("#cat_title"),
				$("#cat_url")
			);

			formFieldAutoFill(
				$("#cat_title"),
				$("#seo_title")
			);

			formSelectShowHide(
				$("#cat_tn_type"),
				{
					0 : {
						"cat_tn_image"	: 0,
						"cat_tn_icon"	: 0
					},
					1 : {
						"cat_tn_image"	: 1,
						"cat_tn_icon"	: 0
					},
					2 : {
						"cat_tn_image"	: 0,
						"cat_tn_icon"	: 1
					},
				}
			);



		]]></after>
	</javascript>

</form>
