Sha256: ff65a254681182ea533a354854a23b410e69fecfbfbab3d4b9108b5b36410b5e

Contents?: true

Size: 1.36 KB

Versions: 1

Compression:

Stored size: 1.36 KB

Contents

<% 
  @title = "Editing #{@page.plain_name}"
  @content_width = 810
  @hide_navigation = true
  @hide_menu = true
  @style_additions = "#Content, #Container {width = 820px; padding-left:100px;}"
%>
<%= sub_template "top" %>

<%= render_markup_help %>

<form action="../bliki_save/<%= @page.name %>" method="post" onSubmit="return validateAuthorName();">
<p>
    <textarea name="content" style="width: 450px; height: 430px"><%= @page.content %></textarea>
</p>
<p>
    <% if @web.check_pass_on_edit %>
      Please enter edit password: <input type="password" name="password" id="password"><br />
    <% end %>
    <input type="submit" value="Update"> as 
    <input type="text" name="author" id="authorName" value="<%= @author %>" 
        onClick="this.value == 'AnonymousCoward' ? this.value = '' : true">
    | <a href="../cancel_bliki_edit/<%= @page.name %>">Cancel</a> <small>(unlocks entry)</small>
</p>
</form>

<script language="JavaScript1.2">
function validateAuthorName() {
  if (/^([A-Z][a-z]+[A-Z]\w+)$/.test(document.getElementById('authorName').value)) {
    return true;
  } else {
    alert('You wrote "' + document.getElementById('authorName').value + '" as your name, but it needs to be a wiki word. Try concating first name and last name, like DavidHeinemeierHansson.');
    return false;
  }
}
</script>

<%= sub_template "bottom" %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
Pimki-1.7.092 app/views/wiki/bliki_edit.rhtml