summaryrefslogtreecommitdiffstats
path: root/app/views/messages/_form.html.erb
blob: e030627a2e3d569972b577408d2d15134ef99813 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<%= error_messages_for 'message' %>
<% replying ||= false %>

<div class="box">
<!--[form:message]-->
<p><label for="message_subject"><%= l(:field_subject) %></label><br />
<%= f.text_field :subject, :size => 120, :id => "message_subject" %>

<% unless replying %>
  <% if @message.safe_attribute? 'sticky' %>
    <%= f.check_box :sticky %> <%= label_tag 'message_sticky', l(:label_board_sticky) %>
  <% end %>
  <% if @message.safe_attribute? 'locked' %>
    <%= f.check_box :locked %> <%= label_tag 'message_locked', l(:label_board_locked) %>
  <% end %>
<% end %>
</p>

<% if !replying && !@message.new_record? && @message.safe_attribute?('board_id') %>
  <p><label><%= l(:label_board) %></label><br />
  <%= f.select :board_id, boards_options_for_select(@message.project.boards) %></p>
<% end %>

<p>
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
<%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'message_content',
                :accesskey => accesskey(:edit),
                :data => {
                    :auto_complete => true
                }
%></p>
<%= wikitoolbar_for 'message_content', preview_board_message_path(:board_id => @board, :id => @message) %>
<!--[eoform:message]-->

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