*
* @see GroupEditForm
*/
-
class PeopletagEditForm extends Form
{
/**
* @param Action $out output channel
* @param User_group $group group to join
*/
-
function __construct($out=null, Profile_list $peopletag=null)
{
parent::__construct($out);
$this->peopletag = $peopletag;
- $this->tagger = Profile::staticGet('id', $peopletag->tagger);
+ $this->tagger = Profile::getKV('id', $peopletag->tagger);
}
/**
*
* @return string ID of the form
*/
-
function id()
{
return 'form_peopletag_edit-' . $this->peopletag->id;
*
* @return string of the form class
*/
-
function formClass()
{
return 'form_settings';
*
* @return string URL of the action
*/
-
function action()
{
return common_local_url('editpeopletag',
*
* @return void
*/
-
function formLegend()
{
- $this->out->element('legend', null, sprintf(_('Edit peopletag %s'), $this->peopletag->tag));
+ // TRANS: Form legend for list edit form.
+ // TRANS: %s is a list.
+ $this->out->element('legend', null, sprintf(_('Edit list %s'), $this->peopletag->tag));
}
/**
*
* @return void
*/
-
function formData()
{
$id = $this->peopletag->id;
$this->out->elementStart('li');
$this->out->hidden('id', $id);
- $this->out->input('tag', _('Tag'),
+
+ // TRANS: Field label for list.
+ $this->out->input('tag', _m('LABEL','List'),
($this->out->arg('tag')) ? $this->out->arg('tag') : $tag,
- _('Change the tag (letters, numbers, -, ., and _ are allowed)'));
+ // TRANS: Field title for list.
+ _('Change the list (letters, numbers, -, ., and _ are allowed).'));
$this->out->elementEnd('li');
$this->out->elementStart('li');
$desclimit = Profile_list::maxDescription();
if ($desclimit == 0) {
- $descinstr = _('Describe the people tag or topic');
+ // TRANS: Field title for description of list.
+ $descinstr = _('Describe the list or topic.');
} else {
- $descinstr = sprintf(_('Describe the people tag or topic in %d characters'), $desclimit);
+ // TRANS: Field title for description of list.
+ // TRANS: %d is the maximum number of characters for the description.
+ $descinstr = sprintf(_m('Describe the list or topic in %d character.',
+ 'Describe the list or topic in %d characters.',
+ $desclimit),
+ $desclimit);
}
+ // TRANS: Field label for description of list.
$this->out->textarea('description', _('Description'),
($this->out->arg('description')) ? $this->out->arg('description') : $description,
$descinstr);
+ // TRANS: Checkbox label to mark a list private.
$this->out->checkbox('private', _('Private'), $private);
$this->out->elementEnd('li');
$this->out->elementEnd('ul');
*
* @return void
*/
-
function formActions()
{
+ // TRANS: Button text to save a list.
$this->out->submit('submit', _('Save'));
$this->out->submit('form_action-yes',
+ // TRANS: Button text to delete a list.
_m('BUTTON','Delete'),
'submit',
'delete',
- _('Delete this people tag'));
+ // TRANS: Button title to delete a list.
+ _('Delete this list.'));
}
function showProfileList()
{
$tagged = $this->peopletag->getTagged();
- $this->out->element('h2', null, 'Add or remove people');
+ // TRANS: Header in list edit form.
+ $this->out->element('h2', null, _('Add or remove people'));
$this->out->elementStart('div', 'profile_search_wrap');
- $this->out->element('h3', null, _m('BUTTON', 'Search'));
+ // TRANS: Header in list edit form.
+ $this->out->element('h3', null, _m('HEADER','Search'));
$search = new SearchProfileForm($this->out, $this->peopletag);
$search->show();
$this->out->element('ul', array('id' => 'profile_search_results', 'class' => 'empty'));