socialforge/app/views/words/_new_respond_course.html.erb

33 lines
1.5 KiB
Plaintext
Raw Normal View History

2015-12-18 18:09:20 +08:00
<%= form_tag(words_create_reply_path, :remote => true,:id=>"form_#{journal.id}") do %>
2015-03-26 17:41:25 +08:00
<%= text_area_tag 'user_notes', "", :class => 'w520 h50 mb5',
2015-03-27 16:02:06 +08:00
:style => "resize: none;overflow: hidden;",:rows => 4,
2015-06-11 17:31:47 +08:00
:placeholder => l(:label_feedback_respond_content)#,
2015-03-26 17:41:25 +08:00
2015-06-11 17:31:47 +08:00
#:maxlength => 250
%>
2015-06-11 16:24:09 +08:00
<p nhname="contentmsg"></p>
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %>
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => m_reply_id.user.id %>
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id.id %>
<%= hidden_field_tag 'show_name',params[:show_name],:value => show_name.nil? ? true : show_name %>
2015-03-26 17:41:25 +08:00
2015-06-11 16:24:09 +08:00
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
<%= submit_tag l(:button_feedback_respond), :name => nil ,
2015-12-18 18:09:20 +08:00
:class => "reply_btn" ,:onclick=>"form_sub_#{ journal.id}($(this),event)"%>
2015-06-11 16:24:09 +08:00
<input nhname="cancel_btn" type="button" style="display:none;"/>
2015-12-18 18:09:20 +08:00
<% end %>
<script>
var flag_<%= journal.id %> = false;
function form_sub_<%= journal.id%>(dom,event){
if(flag_<%= journal.id %> == true){
//dom.attr('disabled','disabled');
return;
}else{
//dom.removeAttr('disabled');
}
flag_<%= journal.id %> = true;
$("#form_<%= journal.id%>").submit();
event.preventDefault();
}
</script>