Skip to content
Snippets Groups Projects
Commit 62172207 authored by srosse's avatar srosse
Browse files

OO-1401: check if a file was uploaded before managing it

parent 7559e48b
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,19 @@ public class CalendarFileUploadController extends FormBasicController {
uifactory.addFormCancelButton("cancel", buttonsCont, ureq, getWindowControl());
}
@Override
protected boolean validateFormLogic(UserRequest ureq) {
boolean allOk = true;
uploadEl.clearError();
if(uploadEl.getUploadFile() == null) {
uploadEl.setErrorKey("form.legende.mandatory", null);
allOk &= false;
}
return allOk & super.validateFormLogic(ureq);
}
@Override
protected void formOK(UserRequest ureq) {
File uploadedFile = uploadEl.getUploadFile();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment