附件重复提交问题
This commit is contained in:
parent
91ee5a0d9f
commit
3a1ab607fa
|
@ -1,6 +1,7 @@
|
|||
<div class="clear mb10">
|
||||
<a class="sub_btn fl" name="button" onclick="_file.click()" onmouseover="" style="<%= ie8? ? 'display:none' : ''%>">文件浏览</a>
|
||||
<p class="fl ml5 mt3 sy_cgrey">(未选择文件) 您可以上传小于<span class="c_red">50MB</span>的文件</p>
|
||||
<p class="fl ml5 mt3 sy_cgrey" ><span id="upload_file_count" class="c_red">(未选择文件)</span> 您可以上传小于<span class="c_red">50MB</span>的文件</p>
|
||||
|
||||
</div>
|
||||
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% if @flag %>
|
||||
hideModal();
|
||||
alert('更新成功')
|
||||
$(".re_search").submit();
|
||||
// $(".re_search").submit();
|
||||
<%else%>
|
||||
$("#upload_file_count").html('(更新失败)')
|
||||
<%end %>
|
|
@ -55,4 +55,4 @@
|
|||
<a href="javascript:void(0);" id="upload_files_cancle_btn" class="btn fr" onclick="hideModal();">取消</a>
|
||||
<%= submit_tag '确定', :onclick => 'upload_attachment_version(event);', :onfocus => 'this.blur()', :id => 'upload_files_submit_btn', :class => 'btn btn-blue fr mr5' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -441,12 +441,10 @@
|
|||
if($("#upload_form").find('.upload_filename').length > 1){
|
||||
$("#upload_file_count").html('(只能上传一个更新文件)')
|
||||
event.preventDefault();
|
||||
|
||||
return false;
|
||||
}else if($("#upload_form").find('.upload_filename').length == 0){
|
||||
$("#upload_file_count").html('(请上传一个更新文件)')
|
||||
event.preventDefault();
|
||||
|
||||
return false;
|
||||
}else{
|
||||
$("#upload_form").submit();
|
||||
|
|
Loading…
Reference in New Issue