Disable attribute type field in attribute creation form and remove redundant code