I've used some Jquery to solve this issue. Where the image is required on new post but not required on edit post.
Currently using V3.7.1 Bender theme
Edit file: /oc-content/themes/bender/item-post.php
LOOK FOR:
<?php if( osc_images_enabled_at_items() ) {
ItemForm::ajax_photos();
} ?>
AND ADD RIGHT AFTER:
<script type="text/javascript">
$(document).ready(function(){
$(".qq-upload-button input[name='qqfile']").attr("required", "required");
<?php if(Params::getParam('action') == 'item_edit') { ?>
$(".qq-upload-button input[name='qqfile']").removeAttr("required");
<?php } ?>
});
</script>
SO RESULT SHOULD LOOK LIKE:
<?php if( osc_images_enabled_at_items() ) {
ItemForm::ajax_photos();
} ?>
<script type="text/javascript">
$(document).ready(function(){
$(".qq-upload-button input[name='qqfile']").attr("required", "required");
<?php if(Params::getParam('action') == 'item_edit') { ?>
$(".qq-upload-button input[name='qqfile']").removeAttr("required");
<?php } ?>
});
</script>
PLEASE NOTE THAT IF YOU ARE USING ANOTHER THEME, THE REFERENCE .qq-upload-button input[name='qqfile'] MAY BE DIFFERENT
WE WILL ALSO NEED TO ADD THIS CODE FOR IOS SUPPORT (place in either header.php or footer.php)
<script>
$(document).ready(function() {
if(isAppleDevice() === true) {
$("body.item.item-post button[type='submit']").on('click', function(event) {
if($("ul.qq-upload-list li").length === 0) {
event.preventDefault();
alert("Opps, it seems you forgot to upload some pictures!");
$('body').animate({
scrollTop: $("input[name='qqfile']").offset().top
}, 500);
$(".qq-upload-button").attr("style","border: 6px solid #ffad00;");
}
});
}
});
function isAppleDevice(){
return (
(navigator.userAgent.toLowerCase().indexOf("ipad") > -1) ||
(navigator.userAgent.toLowerCase().indexOf("iphone") > -1) ||
(navigator.userAgent.toLowerCase().indexOf("ipod") > -1)
);
}
</script>
AGAIN THE ELEMENTS I TARGET IN THE CODE ABOVE MAY VARY BASED ON TEMPLATE.