diff options
author | Evan Prodromou <evan@status.net> | 2009-11-17 08:04:14 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-11-17 08:04:14 -0500 |
commit | bac2d80c919a78d5cafd57f712872a90cda04847 (patch) | |
tree | d2df10a582edc0bf9e043f1c764953a290927678 /plugins/UserFlag/flagprofileform.php | |
parent | 9a1a83e8ebe5ad39838e6363f1537a1a5232b9cb (diff) | |
parent | 6a1afda259c5223449f679a64f932e36df5ebe39 (diff) |
Merge branch '0.9.x' into adminpanel
Conflicts:
classes/User.php
Diffstat (limited to 'plugins/UserFlag/flagprofileform.php')
-rw-r--r-- | plugins/UserFlag/flagprofileform.php | 96 |
1 files changed, 13 insertions, 83 deletions
diff --git a/plugins/UserFlag/flagprofileform.php b/plugins/UserFlag/flagprofileform.php index 0811dbb9d..262dad4a7 100644 --- a/plugins/UserFlag/flagprofileform.php +++ b/plugins/UserFlag/flagprofileform.php @@ -45,108 +45,38 @@ require_once INSTALLDIR.'/lib/form.php'; * @link http://status.net/ */ -class FlagProfileForm extends Form +class FlagProfileForm extends ProfileActionForm { /** - * Profile of profile to flag - */ - - var $profile = null; - - /** - * Return-to args - */ - - var $args = null; - - /** - * Constructor - * - * @param HTMLOutputter $out output channel - * @param Profile $profile profile of user to flag - * @param array $args return-to args - */ - - function __construct($out=null, $profile=null, $args=null) - { - parent::__construct($out); - - $this->profile = $profile; - $this->args = $args; - } - - /** - * ID of the form - * - * @return int ID of the form - */ - - function id() - { - return 'flagprofile-' . $this->profile->id; - } - - /** - * class of the form + * Action this form provides * - * @return string class of the form + * @return string Name of the action, lowercased. */ - function formClass() + function target() { - return 'form_profile_flag'; + return 'flagprofile'; } /** - * Action of the form + * Title of the form * - * @return string URL of the action + * @return string Title of the form, internationalized */ - function action() - { - return common_local_url('flagprofile'); - } - - /** - * Legend of the Form - * - * @return void - */ - function formLegend() + function title() { - $this->out->element('legend', null, _('Flag profile for review')); - } - - /** - * Data elements of the form - * - * @return void - */ - - function formData() - { - // TODO: let the user choose a flag - - $this->out->hidden('flagprofileto-' . $this->profile->id, - $this->profile->id, - 'flagprofileto'); - - if ($this->args) { - foreach ($this->args as $k => $v) { - $this->out->hidden('returnto-' . $k, $v); - } - } + return _('Flag'); } /** - * Action elements + * Description of the form * - * @return void + * @return string description of the form, internationalized */ - function formActions() + function description() { - $this->out->submit('submit', _('Flag'), 'submit', null, _('Flag profile for review')); + return _('Flag profile for review'); } } |