<div class="row">
	<span class="cell col1"><?php echo Form::label('sitemap', 'Sitemap'); ?></span>
	<span class="cell col2a">
		<?php /*  Hidden field before checkbox allows setting the checkbox to inactive  */ ?>
		<?php echo Form::hidden('sitemap',0); ?> 
		<?php echo Form::checkbox('sitemap'); ?>
	</span>
	<span class="cell col3"><?php echo Form::label('published', 'Published'); ?></span>
	<span class="cell col4">
		<?php /*  Hidden field before checkbox allows setting the checkbox to inactive  */ ?>
		<?php echo Form::hidden('published',0); ?> 
		<?php echo Form::checkbox('published'); ?>
	</span>
</div>

<div class="row">
	<span class="cell col1 <?php if ($errors->has('name')): ?>err-label<?php endif; ?>"><?php echo Form::label('name', 'Name'); ?> <span class="req">*</span></span>
	<span class="cell col2">
		<?php echo Form::text('name', null, array('class' => 'width_80')); ?>
		<a href="#info-name" rel="facebox" class="icon"></a>
		<div id="info-name" class="facebox-modal">
			<h2>Page Name</h2>
			<p>
				The name is used for administrative purposes only to identify the page you are working
				with.  This will not appear on the public side of your website at any time.
			</p>
		</div>
	</span>
</div>

<div class="row">
	<span class="cell col1 <?php if ($errors->has('title')): ?>err-label<?php endif; ?>"><?php echo Form::label('title', 'Title'); ?> <span class="req">*</span></span>
	<span class="cell col2">
		<?php echo Form::text(	'title', 
						null, 
						array(	
								'class' => 'width_80', 
								'onkeyup' => 'createURLName(this.value)', 
								'onblur' => 'createURLName(this.value)'
		)); ?>
		<a href="#info-title" rel="facebox" class="icon"></a>
		<div id="info-title" class="facebox-modal">
			<h2>Page Title</h2>
			<p>
				The title appears at the top of your browser window and is important for search engine
				optimization purposes.  The title should be descriptive of your page and content 
				with keywords integrated throughout.
			</p>
		</div>
	</span>
</div>

<!--  URL Name  -->
<div class="row">
	
	<span class="cell col1 <?php if ($errors->has('slug')): ?>err-label<?php endif; ?>"><?php echo Form::label('slug', 'Slug'); ?></span>
	
	<span class="cell col2">
		<?php echo Form::text(	'slug_disp', 
						null, 
						array_merge(
							array(	
								'id' => 'slug_disp',
								'class' => 'width_50', 
								'maxlength' => '200',
								'onkeypress' => 'return isSEOKey(event);',
								'onblur' => 'createURLName(this.value);',
							),
							($slug_disabled?array('disabled' => true):array())
		)); ?>
		
		<?php echo Form::hidden('slug'); ?>
		
		<a href="#info-url-name" rel="facebox" class="icon"></a>
		<div id="info-url-name" class="facebox-modal">
			<h2>URL Name</h2>
			<p>
				The URL name is the actual link that will be used to access your page. This should be
				short and include important and descriptive keywords for your page.  Certain special
				characters are not allowed in the URL which are restricted from being entered
				in this field. Use "-" instead of spaces for search engine purposes.
			</p>
			<p>
				Automatically generating the URL name takes the title of your page and converts
				it into a URL friendly format.  It is recommended that you use the automatic generation
				when creating new pages.
			</p>
			<p>
				If you leave the URL Name empty it will be treated as the home page.
			</p>
		</div>
		
		&nbsp;
		<?php /*  XXX: Hidden field here to circumvent Laravel bug  */ ?>
		<?php echo Form::hidden('slug_auto',0,array('id'=>null)); ?>
		<?php echo Form::checkbox('slug_auto', '1', $slug_auto, array("id" => "slug_auto")); ?>
		Automatically Generate
	</span>
</div>

<!--  Link Name & Path Prefix  -->
<div class="row">
	
	<span class="cell col1 <?php if ($errors->has('link_name')): ?>err-label<?php endif; ?>"><?php echo Form::label('link_name', 'Link Name'); ?> <span class="req">*</span></span>
	<span class="cell col2a">
		
		<?php echo Form::text(
						'link_name', 
						null, 
						array(	'class' => 'width_60',
								'maxlength' => '50'
						
		)); ?>
		
		<a href="#info-link-name" rel="facebox" class="icon"></a>
		<div id="info-link-name" class="facebox-modal">
			<h2>Link Name</h2>
			<p>
				The name that will appear as a link when this page is attached to a menu.  Typical link names are names such as "Home", 
				"Services", "About", "Contact", etc.
			</p>
		</div>
	</span>
	
	<span class="cell col3 <?php if ($errors->has('path')): ?>err-label<?php endif; ?>"><?php echo Form::label('path', 'Path Prefix'); ?></span>
	<span class="cell col4">
		
		<?php echo Form::text(
						'path', 
						null, 
						array(	'class' => 'width_60', 
								'maxlength' => '100',
								'onkeypress' => 'return isSEOKey(event);',
								'onblur' => 'autofillPathPrefix();'
		)); ?>
		
		<a href="#info-path" rel="facebox" class="icon"></a>
		<div id="info-path" class="facebox-modal">
			<h2>Path Prefix</h2>
			<p>
				The path prefix will appear before the URL name and after the domain name.  The bold section will be the path prefix: 
				http://www.mywebsite.com/<strong>path-prefix-example</strong>/url-name.
			</p>
			<p>
				Path Prefix: "path-prefix-example"
			</p>
		</div>
	</span>
</div>

<div class="row">
	<span class="cell col1"><?php echo Form::label('has_menu_link', 'Menu Item Linked'); ?></span>
	<span class="cell col2">
		<?php /*  Hidden field before checkbox allows setting the checkbox to inactive  */ ?>
		<?php echo Form::hidden('has_menu_link',0); ?> 
		<?php echo Form::checkbox('has_menu_link'); ?>
		<a href="#info-has_menu_link" rel="facebox" class="icon"></a>
		<div id="info-has_menu_link" class="facebox-modal">
			<h2>Menu Item Linked</h2>
			<p>
				This page can be included and nested in menus. This option specifies whether the resulting menu items should link to this page. This option is useful if you want those menu items to serve only as headings.
			</p>
		</div>
	</span>
</div>

<div class="row">
	<span class="cell col1">Page URL</span>
	<span class="cell col2">
		<?php echo url('/'); ?>/<span id="display_url_path"><?php echo $item->path; ?><?php if(!empty($item->path)): ?>/<?php endif; ?></span><span id="display_url_page"><?php echo $item->slug; ?></span>
	</span>
</div>

<div class="row">
	<span class="cell col1 <?php if ($errors->has('content')): ?>err-label<?php endif; ?>"><?php echo Form::label('content', 'Content'); ?></span>
	<span class="cell col2">                
		 <div id="outer">
	   		<textarea name="content" id="content" class="js-ckeditor width_100" module="pages"><?php echo $item->content; ?></textarea>  
	     </div>
	</span>
</div>

<!--  Save Button  -->
<div class="row">
	<span class="cell col1">&nbsp;</span>
	<span class="cell col2">
		<?php echo Form::submit('Save', array('class' => 'image_button small right')); ?>
	</span>
</div>
