* @link http://status.net/
*/
-if (!defined('STATUSNET')) {
- exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
/**
* Form for deleting a group
* @see UnsubscribeForm
* @fixme merge a bunch of this stuff with similar form types to reduce boilerplate
*/
-
class DeleteGroupForm extends Form
{
/**
* group for user to delete
*/
-
var $group = null;
/**
* Constructor
*
* @param HTMLOutputter $out output channel
- * @param group $group group to join
+ * @param User_group $group group to join
*/
-
- function __construct($out=null, $group=null)
+ function __construct(HTMLOutputter $out=null, User_group $group=null)
{
parent::__construct($out);
*
* @return string ID of the form
*/
-
function id()
{
- return 'group-delete-' . $this->group->id;
+ return 'group-delete-' . $this->group->getID();
}
/**
*
* @return string of the form class
*/
-
function formClass()
{
return 'form_group_delete';
*
* @return string URL of the action
*/
-
function action()
{
- return common_local_url('deletegroup',
- array('id' => $this->group->id));
+ return common_local_url('deletegroup', array('id' => $this->group->getID()));
}
function formData()
{
$this->out->hidden($this->id() . '-returnto-action', 'groupbyid', 'returnto-action');
- $this->out->hidden($this->id() . '-returnto-id', $this->group->id, 'returnto-id');
+ $this->out->hidden($this->id() . '-returnto-id', $this->group->getID(), 'returnto-id');
}
/**
*
* @return void
*/
-
function formActions()
{
- $this->out->submit('submit', _('Delete'));
+ // TRANS: Button text for deleting a group.
+ $this->out->submit('submit', _m('BUTTON','Delete'));
}
}