introduce support for separate readonly and disabled modes. closes #1253. fixes #778. closes #1183