socialforge/app/views/boards/_form_course.html.erb

84 lines
3.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%= error_messages_for 'message' %>
<% replying ||= false %>
<% extra_option = replying ? { readonly: true} : { maxlength: 200 } %>
<% if replying %>
<li style="display: none">
<label><span class="c_red">*</span>&nbsp;<%= l(:field_subject) %>&nbsp;&nbsp;</label>
<%= f.text_field :subject, { size: 60, id: "message_subject",:class=>"talk_input w585", :nhname=>'inputsubject' }.merge(extra_option) %>
<p nhname="subjectmsg" class="ml55"></p>
</li>
<% else %>
<li >
<label><span class="c_red">*</span>&nbsp;<%= l(:field_subject) %>&nbsp;&nbsp;</label>
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", onkeyup: "regexSubject('#{f.object.id}');",:class=>"talk_input w585", :nhname=>'inputsubject' }.merge(extra_option) %>
<p nhname="subjectmsg" class="ml55"></p>
</li>
<% end %>
<li class="ml60 mb5">
<% 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 %>
<div class="cl"></div>
</li>
<li>
<div nhname="quote_show" id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
<% unless replying %>
<label class="fl ml3" ><span class="c_red">*</span>&nbsp;<%= l(:field_description) %>&nbsp;</label>
<% end %>
<%= text_area :quote,:quote,:style => 'display:none',:nhname=>"quote_input" %>
<div class="content <%= replying ? '':'ml55' %>">
<% if replying%>
<%= f.text_area :content,
:width => '89%',
:height => 300,
:id => "message_content#{f.object.id}",
:nhname => 'textarea',
:onkeyup => "regexContent('#{f.object.id}');",
:class => 'talk_text fl',
:placeholder => "最多3000个汉字(或6000个英文字符)",
:maxlength => 5000 %>
<% else %>
<input nhname="init_content_val" value="<%=topic.content%>" type="hidden"/>
<%= f.text_area :content,
:width => '90%',
:height => 300,
:class => 'talk_text fl',
:editor_id => "message_content#{f.object.id}_edit",
:id => "message_content#{f.object.id}",
:onkeyup => "regexContent('#{f.object.id}');",
:class => 'talk_text fl',
:nhname => 'textarea',
:placeholder => "最多3000个汉字(或6000个英文字符)",
:maxlength => 5000 %>
<% end %>
</div>
<div class="cl"></div>
<p id="message_content_span<%= f.object.id%>" nhname="contentmsg" class="ml55"></p>
</li>
<div class="cl"></div>
<li>
<% unless replying %>
<div class="fl ml3" style="padding-left: 52px;">
<%= render :partial => 'attachments/form_course', :locals => {:container => topic,:isReply => @isReply} %>
</div>
<% end %>
</li>
<li >
<div class="cl"></div>
</li>