gnu-social/modules/ActivityModeration/forms/deletenotice.php
Diogo Cordeiro 8c0601816f [CORE] Move core plugins to a new modules directory
For reference (raised by rozzin in IRC):

* http://foldoc.org/module
* http://foldoc.org/library
* http://foldoc.org/plugin

As noted by XRevan86, modules are not necessarily non-essential.
As we will keep the modules directory in GS root [therefore, near to
plugins/], it is evidenced the difference between both.

This is a simple yet fundamental structural change. It doesn't change
functionality but makes clearer the way we understand GNU social's
internals.
2019-08-22 03:13:58 +01:00

68 lines
1.8 KiB
PHP

<?php
if (!defined('GNUSOCIAL')) { exit(1); }
class DeletenoticeForm extends Form
{
protected $notice = null;
function __construct(HTMLOutputter $out=null, array $formOpts=array())
{
if (!array_key_exists('notice', $formOpts) || !$formOpts['notice'] instanceof Notice) {
throw new ServerException('No notice provided to DeletenoticeForm');
}
parent::__construct($out);
$this->notice = $formOpts['notice'];
}
function id()
{
return 'form_notice_delete-' . $this->notice->getID();
}
function formClass()
{
return 'form_settings';
}
function action()
{
return common_local_url('deletenotice', array('notice' => $this->notice->getID()));
}
function formLegend()
{
$this->out->element('legend', null, _('Delete notice'));
}
function formData()
{
$this->out->element('p', null, _('Are you sure you want to delete this notice?'));
}
/**
* Action elements
*
* @return void
*/
function formActions()
{
$this->out->submit('form_action-no',
// TRANS: Button label on the delete notice form.
_m('BUTTON','No'),
'submit form_action-primary',
'no',
// TRANS: Submit button title for 'No' when deleting a notice.
_('Do not delete this notice.'));
$this->out->submit('form_action-yes',
// TRANS: Button label on the delete notice form.
_m('BUTTON','Yes'),
'submit form_action-secondary',
'yes',
// TRANS: Submit button title for 'Yes' when deleting a notice.
_('Delete this notice.'));
}
}