. * * @category Form * @package StatusNet * @author Zach Copley * @copyright 2011 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('STATUSNET')) { exit(1); } require_once INSTALLDIR . '/lib/form.php'; /** * Form for inviting collegues and friends * * @category Form * @package StatusNet * @author Zach Copley * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ class InviteForm extends Form { /** * Constructor * * @param Action $out output channel */ function __construct($out=null) { parent::__construct($out); } /** * ID of the form * * @return string ID of the form */ function id() { return 'form_invite'; } /** * Action of the form * * @return string URL of the action */ function action() { return common_local_url('invite'); } /** * Name of the form * * @return void */ function formLegend() { // TRANS: Form legend. $this->out->element('legend', null, _('Invite collegues')); } /** * Data elements of the form * * @return void */ function formData() { $this->out->elementStart('ul', 'form_data'); $this->out->elementStart('li'); $this->out->textarea( 'addresses', // TRANS: Field label for a list of e-mail addresses. _('Email addresses'), $this->out->trimmed('addresses'), // TRANS: Field title for a list of e-mail addresses. _('Addresses of friends to invite (one per line).') ); $this->out->elementEnd('li'); $this->out->elementStart('li'); $this->out->textarea( // TRANS: Field label for a personal message to send to invitees. 'personal', _('Personal message'), $this->out->trimmed('personal'), // TRANS: Field title for a personal message to send to invitees. _('Optionally add a personal message to the invitation.') ); $this->out->elementEnd('li'); $language = common_language(); $this->out->elementStart('li'); $this->out->dropdown('language', _('Language'), // TRANS: Tooltip for dropdown list label in form for profile settings. get_nice_language_list(), _('Preferred language.'), false, $language); $this->out->elementEnd('li'); $this->out->elementEnd('ul'); } /** * Action elements * * @return void */ function formActions() { $this->out->submit( 'send', // TRANS: Send button for inviting friends _m('BUTTON','Send'), 'submit form_action-primary', 'send', // TRANS: Submit button title. _('Send invitations.') ); } }