Hi guys.
I have a doubt about javascript. Is there any way to prevent to upload a file if the user hasn't selected a license? I mean, when you are editing a page and you want to upload a file without going to Special:Upload, you can press the button to do it in the page, however, many people don't pay attention to the "More options" section and they upload the file without any license. How can I do to prevent them to upload the file and to notify them?
I have think in something like the following code, but I don't know if it is going to be working everytime the user opens the modal and closes it. Maybe using an onload attr in the image image_upload_left.png...
if ($('#ImageUploadLicense').find('select').find('option:selected').val() == "") { // Do something... }