3 if (!defined('GNUSOCIAL')) { exit(1); }
5 class DeletenoticeForm extends Form
7 protected $notice = null;
9 function __construct(HTMLOutputter $out=null, array $formOpts=array())
11 if (!array_key_exists('notice', $formOpts) || !$formOpts['notice'] instanceof Notice) {
12 throw new ServerException('No notice provided to DeletenoticeForm');
15 parent::__construct($out);
17 $this->notice = $formOpts['notice'];
22 return 'form_notice_delete-' . $this->notice->getID();
27 return 'form_settings';
32 return common_local_url('deletenotice', array('notice' => $this->notice->getID()));
37 $this->out->element('legend', null, _('Delete notice'));
42 $this->out->element('p', null, _('Are you sure you want to delete this notice?'));
50 function formActions()
52 $this->out->submit('form_action-no',
53 // TRANS: Button label on the delete notice form.
55 'submit form_action-primary',
57 // TRANS: Submit button title for 'No' when deleting a notice.
58 _('Do not delete this notice.'));
59 $this->out->submit('form_action-yes',
60 // TRANS: Button label on the delete notice form.
62 'submit form_action-secondary',
64 // TRANS: Submit button title for 'Yes' when deleting a notice.
65 _('Delete this notice.'));