Lockable template tabs

Adds the ability to lock tabs on templates, making them read only.