Fix share dropdown when links are not allowed

When links are not allowed, the email field does not exist and
autocomplete returns null. This causes Javascript errors.

The fix prevents entering the bogus block when links aren't allowed, as
it doesn't make sense to enter it in such cases anyway.
Merge pull request #10573 from owncloud/share-dropdownfixwhenlinkdisallowed

Fix share dropdown when links are not allowed