EditTag: allow designating a tag owner
This commit is contained in:
parent
59b1fa7a72
commit
ad816f10a3
@ -75,6 +75,11 @@ class EditTag extends HTMLController
|
|||||||
'Person' => 'Person',
|
'Person' => 'Person',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'id_user_owner' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'label' => 'Owner',
|
||||||
|
'options' => [0 => '(nobody)'] + Member::getMemberMap(),
|
||||||
|
],
|
||||||
'tag' => [
|
'tag' => [
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'label' => 'Tag title',
|
'label' => 'Tag title',
|
||||||
|
@ -192,4 +192,15 @@ class Member extends User
|
|||||||
// We should probably phase out the use of this function, or refactor the access levels of member properties...
|
// We should probably phase out the use of this function, or refactor the access levels of member properties...
|
||||||
return get_object_vars($this);
|
return get_object_vars($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getMemberMap()
|
||||||
|
{
|
||||||
|
return Registry::get('db')->queryPair('
|
||||||
|
SELECT id_user, CONCAT(first_name, {string:blank}, surname) AS full_name
|
||||||
|
FROM users
|
||||||
|
ORDER BY first_name, surname',
|
||||||
|
[
|
||||||
|
'blank' => ' ',
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user