*
* @see UnsubscribeForm
*/
-
class GroupEditForm extends Form
{
/**
* group for user to join
*/
-
var $group = null;
/**
* @param Action $out output channel
* @param User_group $group group to join
*/
-
function __construct($out=null, $group=null)
{
parent::__construct($out);
*
* @return string ID of the form
*/
-
function id()
{
if ($this->group) {
*
* @return string of the form class
*/
-
function formClass()
{
return 'form_settings';
*
* @return string URL of the action
*/
-
function action()
{
if ($this->group) {
*
* @return void
*/
-
function formLegend()
{
$this->out->element('legend', null, _('Create a new group'));
*
* @return void
*/
-
function formData()
{
if ($this->group) {
common_config('group', 'maxaliases')));;
$this->out->elementEnd('li');
}
+ $this->out->elementStart('li');
+ $this->out->dropdown('join_policy',
+ _('Membership policy'),
+ array(0 => _('Open to all'),
+ 1 => _('Admin must approve all members')),
+ _('Whether admin approval is required to join this group.'),
+ false,
+ (empty($this->group->join_policy)) ? 0 : $this->group->join_policy);
+ $this->out->elementEnd('li');
Event::handle('EndGroupEditFormData', array($this));
}
$this->out->elementEnd('ul');
*
* @return void
*/
-
function formActions()
{
$this->out->submit('submit', _m('BUTTON','Save'));