I want to disable the modification of both the file name and title of a specific asset type.
How can I do that ?
2 Answers
I guess this feature request will solve my problem... in the future:
http://feedback.buildwithcraft.com/forums/285221-feature-requests/suggestions/7197199-ability-to-hide-or-disable-fields-based-on-a-user
But in the meantime I did it with a small css hacking (no choice):
protected function includeResources()
switch ( $segments[ 0 ] ) {
case 'entries' : case 'categories' : case 'assets' :
craft()->templates->includeCssResource( 'plugin/styles.css' );
break;
}
style.css
// remove title and name fields from modal editor in CP assets page
.hud {
.body.elementeditor {
.field[id$="filename-field"], .field[id$="-title-field"] {
display: none;
}
.field {
margin-top: 0px;
}
}
}
You can disable the capacity to upload, remove, or create subfolders for assets to whomever you wish through the users control panel.
You could potentially solve this problem by limiting the users control to allow them only to upload and not change folders or delete. (see image below)