update when edit news image checkbox verification

This commit is contained in:
nccu 2014-11-12 15:27:30 +08:00
parent 09dd3a0b1f
commit 709b5a7ccb
1 changed files with 5 additions and 3 deletions

View File

@ -417,9 +417,11 @@
$('.form-actions input[type="submit"]').click(function(){ $('.form-actions input[type="submit"]').click(function(){
var validate = true; var validate = true;
if(validate_files) validate = validate_fileupload(); if(location.pathname=='/admin/news/new'){
if(validate_image) validate = validate_image(); if(validate_files) validate = validate_fileupload();
if(!validate) return false; if(validate_image) validate = validate_image();
if(!validate) return false;
}
}); });
if(validate_files) $(".start-line input[type='file']").on("change", validate_fileupload); if(validate_files) $(".start-line input[type='file']").on("change", validate_fileupload);