column name 'Item Name' in user/update
Closed this issue · 4 comments
tamer-hassan commented
in user/update, the "item_name" column (reads 'Item Name') is not translated to "Role" as on user/view page.
I see in models/User.php there's a method attributeLabels() that translate 'item_name' to 'Role'
Why is user/view using it but not user/update page?
nenad-zivkovic commented
It says Role. I don't understand your question ?
tamer-hassan commented
logged in as superadmin (theCreator), updating another user (editor). It says "Item Name" ?
http://prntscr.com/6gfh89
tamer-hassan commented
Adding the following to common/rbac/models/Role.php resolves the issue for the Create & Update forms. (displays "Role" instead of "item_name").
/**
* Returns the attribute labels.
*
* @return array
*/
public function attributeLabels()
{
return [
'item_name' => Yii::t('app', 'Role'),
];
}
nenad-zivkovic commented
Thank you. Sorry for no response, I was very busy, but I will add this fix in the next release.