Ability to enable input if it was initially disabled

In my project I need to disable input until user "passes all checks".

Changes I done seem do that trick. Can we have this in upstream?

If you think my changes need improvement let me know