FIX #31 upload/edit forms false submit

prevent individual forms to be submitted and returning errors
This commit is contained in:
colymba 2013-05-19 19:55:59 +03:00
parent 8a8279895a
commit d6ea450ffc
3 changed files with 13 additions and 1 deletions

View File

@ -41,6 +41,12 @@
}
});
$('div.ss-upload .ss-uploadfield-item-editform form').entwine({
onsubmit: function(e) {
return false;
}
});
$('#bulkImageUploadUpdateBtn,#bulkImageUploadUpdateCancelBtn').entwine({
onmatch: function(){
$(this).addClass('ui-state-disabled ssui-button-disabled');

View File

@ -23,7 +23,7 @@ jQuery(document).ready(function(){
'</div>' +
'{% if (!file.error) { %}' +
'<div class="ss-uploadfield-item-editform">'+
'<form action="update" method="post" class="bulkImageUploadUpdateForm" name="BIUUF_{%=file.record.ID%}">'+
'<form action="" method="post" class="bulkImageUploadUpdateForm" name="BIUUF_{%=file.record.ID%}">'+
'<input type="hidden" name="record_{%=file.record.ID%}_ID" value="{%=file.record.ID%}"/>'+
'<img class="imgPreview" src="{%=file.preview_url%}" />'+

View File

@ -141,6 +141,12 @@
}
});
$('.bulkEditingForm').entwine({
onsubmit: function(){
return false;
}
});
$('.bulkEditingForm input, .bulkEditingForm select, .bulkEditingForm textarea').entwine({
onchange: function(){
var form;