2005-01-24 19:52:04 +01:00
|
|
|
<%
|
|
|
|
@title = "Editing #{@page.name}"
|
|
|
|
@content_width = 720
|
|
|
|
@hide_navigation = true
|
|
|
|
%>
|
|
|
|
|
2005-11-14 15:02:36 +01:00
|
|
|
<div id="MarkupHelp">
|
2005-04-08 07:02:48 +02:00
|
|
|
<%= render("#{@web.markup}_help") %>
|
|
|
|
<%= render 'wiki_words_help' %>
|
|
|
|
</div>
|
|
|
|
|
2006-03-23 05:51:13 +01:00
|
|
|
<%= form_tag({ :action => 'save', :web => @web.address, :id => @page.name },
|
|
|
|
{ 'id' => 'editForm', 'method' => 'post', 'onSubmit' => 'cleanAuthorName()',
|
|
|
|
'accept-charset' => 'utf-8' })
|
2005-02-19 00:19:42 +01:00
|
|
|
%>
|
|
|
|
|
2005-01-24 19:52:04 +01:00
|
|
|
<p>
|
2005-11-14 15:02:36 +01:00
|
|
|
<textarea name="content" id="content" style="width: 70%; height: 500px"><%= h(@flash[:content] || @page.content) %></textarea>
|
2005-01-24 19:52:04 +01:00
|
|
|
</p>
|
|
|
|
<p>
|
2005-01-30 06:12:01 +01:00
|
|
|
<input type="submit" value="Submit" accesskey="s"/> as
|
2005-11-04 06:23:34 +01:00
|
|
|
<%= text_field_tag :author, @author,
|
|
|
|
:onfocus => "this.value == 'AnonymousCoward' ? this.value = '' : true;",
|
|
|
|
:onblur => "this.value == '' ? this.value = 'AnonymousCoward' : true" %>
|
2005-02-19 00:19:42 +01:00
|
|
|
|
|
2005-02-19 03:45:28 +01:00
|
|
|
<%= link_to('Cancel', {:web => @web.address, :action => 'cancel_edit', :id => @page.name},
|
2005-02-19 00:19:42 +01:00
|
|
|
{:accesskey => 'c'})
|
|
|
|
%>
|
|
|
|
<small>(unlocks page)</small>
|
2005-01-24 19:52:04 +01:00
|
|
|
</p>
|
2005-02-19 00:19:42 +01:00
|
|
|
<%= end_form_tag %>
|
2005-01-24 19:52:04 +01:00
|
|
|
|
|
|
|
<script language="JavaScript1.2">
|
|
|
|
function cleanAuthorName() {
|
|
|
|
if (document.getElementById('authorName').value == "") {
|
|
|
|
document.getElementById('authorName').value = 'AnonymousCoward';
|
|
|
|
}
|
|
|
|
}
|
2005-11-13 18:48:21 +01:00
|
|
|
document.forms["editForm"].elements["content"].focus();
|
2005-01-24 19:52:04 +01:00
|
|
|
</script>
|