database MDL-23789 fixed disable/enable editor button in templates tab.