- $this->out->submit('yes', _m('BUTTON', 'Yes'));
- $this->out->submit('no', _m('BUTTON', 'No'));
- $this->out->submit('maybe', _m('BUTTON', 'Maybe'));
+ // TRANS: Button text for RSVP ("please respond") reply to confirm attendence.
+ $this->submitButton('yes', _m('BUTTON', 'Yes'));
+ // TRANS: Button text for RSVP ("please respond") reply to deny attendence.
+ $this->submitButton('no', _m('BUTTON', 'No'));
+ // TRANS: Button text for RSVP ("please respond") reply to indicate one might attend.
+ $this->submitButton('maybe', _m('BUTTON', 'Maybe'));
+ }
+
+ function submitButton($id, $label)
+ {
+ $this->out->element(
+ 'input',
+ array(
+ 'type' => 'submit',
+ 'id' => 'rsvp-submit',
+ 'name' => $id,
+ 'class' => 'submit',
+ 'value' => $label,
+ 'title' => $label,
+ 'onClick' => 'this.form.submitvalue.value = this.name; return true;'
+ )
+ );