<% @replying = !@memo.parent.nil? %> <%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>

<%=l(:label_memo_edit)%>

<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %> <% if @memo.errors.any? %>

<%= pluralize(@memo.errors.count, "error") %> prohibited this memo from being saved:

<% end %>

<% if @memo.parent.nil? && @memo.children.first.nil? %> <%#= f.text_field :subject, :required => true, :size => 96 ,:readonly => false, :maxlength => 50%> <% else %> <%#= f.text_field :subject, :required => true, :size => 96 ,:readonly => true, :style => "border: 1px solid gray", :maxlength => 50%> <% end %>

<% if User.current.admin?%>

<% unless @replying %> <% if @memo.safe_attribute? 'sticky' %> <%= f.check_box :sticky %> <%= label_tag 'memo_sticky', l(:label_board_sticky) %> <% end %> <% if @memo.safe_attribute? 'lock' %> <%= f.check_box :lock %> <%= label_tag 'memo_locked', l(:label_board_locked) %> <% end %> <% end %>

<% end %>

<%= f.kindeditor :content, :required => true, :size => 80,:owner_id => @memo.id,:owner_type => 1 %>

<%= l(:label_attachment_plural) %>
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>


<%= f.submit :value => l(:button_change) %>  <%= link_to l(:button_back), back_url ,:class => "button-canel",:style => "color: #ffffff;"%>
<% end %>