fixes #4432 Disable Add-file button on Legacy Files portlet

Fixed the issue and committed code for review, please check it.