- common_show_header(_('Invitation(s) sent'));
- if ($already) {
- common_element('p', null, _('You are already subscribed to these users:'));
- common_element_start('ul');
- foreach ($already as $other) {
- common_element('li', null, sprintf(_('%s (%s)'), $other->nickname, $other->email));
+ $this->mode = 'sent';
+
+ $this->showPage();
+ }
+
+ function showScripts()
+ {
+ parent::showScripts();
+ $this->autofocus('addresses');
+ }
+
+ function title()
+ {
+ if ($this->mode == 'sent') {
+ return _('Invitation(s) sent');
+ } else {
+ return _('Invite new users');
+ }
+ }
+
+ function showContent()
+ {
+ if ($this->mode == 'sent') {
+ $this->showInvitationSuccess();
+ } else {
+ $this->showInviteForm();
+ }
+ }
+
+ function showInvitationSuccess()
+ {
+ if ($this->already) {
+ $this->element('p', null, _('You are already subscribed to these users:'));
+ $this->elementStart('ul');
+ foreach ($this->already as $other) {
+ $this->element('li', null, sprintf(_('%s (%s)'), $other->nickname, $other->email));