用户留言重复提交问题

This commit is contained in:
huang 2015-12-11 10:53:14 +08:00
parent 01b21ceda1
commit fbd1b2f541
1 changed files with 12 additions and 3 deletions

View File

@ -19,12 +19,12 @@
<div class="message_box mb10" id="users_setting">
<div nhname='new_message' style="display:none;">
<%= form_for('new_form',:url => leave_user_message_path(@user.id),:method => "post") do |f|%>
<%= form_for('new_form',:url => leave_user_message_path(@user.id), :html =>{:id => "user_feedback_new"}, :method => "post") do |f|%>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea' name="new_form[user_message]"></textarea>
<p nhname='contentmsg'></p>
<div nhname='toolbar_container' style="float:left;padding-top:3px;"></div>
<a id="new_message_cancel_btn" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:6px;">取消</a>
<a id="new_message_submit_btn" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:6px;">留言</a>
<a href="javascript:void(0);" class="blue_n_btn fr mr5" id="submit_feedback_user" style="margin-top:6px;" >留言</a>
<% end%>
</div>
<div class="cl"></div>
@ -43,4 +43,13 @@
</div>
<div class="cl"></div>
</div><!--message_box end-->
</div>
</div>
<script type="text/javascript">
$(function(){
$("#submit_feedback_user").one('click',function() {
$("#submit_feedback_user").submit();
});
});
</script>