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.

Please review @MorrisJobke @schiesbn @nickvergessen @th3fallen