
<%= error_messages_for 'page' %>

<!--[form:page]-->

<div class="articles">
<label for="cawko_title">Name:</label><br/>
<%= text_field 'page', 'name', :id => "cawko_title" %></p>
</div>

<div class="articles">

<div class="articles">
<label for="ta2">Content:</label><br/>
<div style="text-align:center">
<%= text_area('page', 'body', { :rows => 20, :id => "ta2"})  %>
</div>
<div id="toolbar2" class="toolbar">
<a onclick="InsertContent($('ta2'), '**', '**', '**'+deft+'**');">bold</a>
<a onclick="InsertContent($('ta2'), '*', '*', '*'+deft+'*');">italic</a>
<a onclick="InsertContent($('ta2'), '#', '#', '#'+deft+'#');">h1</a>
<a onclick="InsertContent($('ta2'), '##', '##', '##'+deft+'##');">h2</a>
<a onclick="InsertContent($('ta2'), '###', '###', '###'+deft+'###');">h3</a>
<a onclick="InsertContent($('ta2'), '', '', '\n\n-------------\n\n');">hr</a>
<a onclick="InsertContent($('ta2'), '[', '] (http://url.com/)', 'An [example](http://url.com/)');">a</a>
<a onclick="InsertContent($('ta2'), '![', '](/path/img.jpg)', '![alt text](/path/img.jpg)');">img</a>
<a onclick="InsertContent($('ta2'), '__','__','__'+deft+'__');">strong</a>
<a onclick="InsertContent($('ta2'), '_','_','_'+deft+'_');">em</a>
<a onclick="InsertContent($('ta2'), '\n> ','\n','\n> '+deft+'\n');">bq</a>
<a onclick="InsertContent($('ta2'), '\n- ','\n','\n- '+deft+'\n');">ol</a>
<a onclick="$('ta2').rows = $('ta2').rows + 5;"><u>plus</u></a>
<a onclick="$('ta2').rows = $('ta2').rows - 5;"><u>minus</u></a>
<a onclick="Element.toggle('toolbar2_preview')"><u>preview</u></a>
<script type="text/javascript">
$('toolbar2').style.display = 'block';
</script>
</div>
<div id="toolbar2_preview" class="articles" style="display:none">Edit the body to trigger the preview.</div>
</div>


<div class="blue" onclick="Element.toggle('advanced'); return false;"><a href="#">Advanced &raquo;</a></div>
<div class="articles" id="advanced">

<p><label for="cawko_url">Url:</label><br/>
<%= text_field 'page', 'url', :id => "cawko_url"  %></p>

<p><label for="page_text_filter">Text Filter:</label><br />
<%= select 'page', 'text_filter', text_filter_options %></p>

<p><label for="page_behaviour">Behaviour:</label><br/>
<div style="text-align:center">
<%= text_area 'page', 'behaviour', :cols => 59, :rows => 10  %>
</div>
<a href="http://bennolan.com/behaviour/">Example usage &raquo;</a></p>

<p><label for="page_meta_tags">Meta tags:</label><br/>
<div style="text-align:center">
<%= text_area 'page', 'meta_tags', :cols => 59, :rows => 10  %></div></p>

<p><label for="page_meta_descs">Meta description:</label><br/>
<div style="text-align:center">
<%= text_area 'page', 'meta_descs', :cols => 59, :rows => 10  %></div></p>

<p><label for="page_updated_at">Created or Updated at:</label><br/>
<%= datetime_select 'page', 'updated_at' %></p>
</div>

<br />
<script type="text/javascript">
Element.hide('advanced');
</script>

<!--[eoform:page]-->

<script type="text/javascript">
googieDecorateTextarea("ta2");
Field.focus('cawko_title')
</script>
