*
* @category Form
* @package StatusNet
- * @author Evan Prodromou <evan@controlyourself.ca>
- * @author Sarven Capadisli <csarven@controlyourself.ca>
+ * @author Evan Prodromou <evan@status.net>
+ * @author Sarven Capadisli <csarven@status.net>
* @copyright 2009 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
*
* @category Form
* @package StatusNet
- * @author Evan Prodromou <evan@controlyourself.ca>
- * @author Sarven Capadisli <csarven@controlyourself.ca>
+ * @author Evan Prodromou <evan@status.net>
+ * @author Sarven Capadisli <csarven@status.net>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*
* @see SubscribeForm
*/
-
class UnsubscribeForm extends Form
{
/**
* @param HTMLOutputter $out output channel
* @param Profile $profile profile of user to unsub from
*/
-
function __construct($out=null, $profile=null)
{
parent::__construct($out);
*
* @return int ID of the form
*/
-
function id()
{
return 'unsubscribe-' . $this->profile->id;
*
* @return string of the form class
*/
-
function formClass()
{
- return 'form_user_unsubscribe';
+ return 'form_user_unsubscribe ajax';
}
/**
*
* @return string URL of the action
*/
-
function action()
{
return common_local_url('unsubscribe');
*/
function formLegend()
{
+ // TRANS: Form legend on unsubscribe form.
$this->out->element('legend', null, _('Unsubscribe from this user'));
}
*
* @return void
*/
-
function formData()
{
$this->out->hidden('unsubscribeto-' . $this->profile->id,
*
* @return void
*/
-
function formActions()
{
- $this->out->submit('submit', _('Unsubscribe'), 'submit', null, _('Unsubscribe from this user'));
+ // TRANS: Button text on unsubscribe form.
+ $this->out->submit('submit', _m('BUTTON','Unsubscribe'), 'submit', null,
+ // TRANS: Button title on unsubscribe form.
+ _('Unsubscribe from this user.'));
}
}