events for modifying group edit form
This commit is contained in:
parent
edeaf8a2f8
commit
5fee38b025
@ -1057,3 +1057,9 @@ StartCloseNoticeListItemElement: Before the closing </li> of a notice list eleme
|
||||
|
||||
EndCloseNoticeListItemElement: After the closing </li> of a notice list element
|
||||
- $nli: The notice list item being shown
|
||||
|
||||
StartGroupEditFormData: Beginning the group edit form entries
|
||||
- $form: The form widget being shown
|
||||
|
||||
EndGroupEditFormData: Ending the group edit form entries
|
||||
- $form: The form widget being shown
|
||||
|
@ -177,6 +177,8 @@ class EditgroupAction extends GroupDesignAction
|
||||
return;
|
||||
}
|
||||
|
||||
if (Event::handle('StartGroupSaveForm', array($this))) {
|
||||
|
||||
$nickname = Nickname::normalize($this->trimmed('nickname'));
|
||||
$fullname = $this->trimmed('fullname');
|
||||
$homepage = $this->trimmed('homepage');
|
||||
@ -287,6 +289,9 @@ class EditgroupAction extends GroupDesignAction
|
||||
|
||||
$this->group->query('COMMIT');
|
||||
|
||||
Event::handle('EndGroupSaveForm', array($this));
|
||||
}
|
||||
|
||||
if ($this->group->nickname != $orig->nickname) {
|
||||
common_redirect(common_local_url('editgroup',
|
||||
array('nickname' => $nickname)),
|
||||
|
@ -147,6 +147,7 @@ class GroupEditForm extends Form
|
||||
}
|
||||
|
||||
$this->out->elementStart('ul', 'form_data');
|
||||
if (Event::handle('StartGroupEditFormData', array($this))) {
|
||||
$this->out->elementStart('li');
|
||||
$this->out->hidden('groupid', $id);
|
||||
$this->out->input('nickname', _('Nickname'),
|
||||
@ -193,6 +194,8 @@ class GroupEditForm extends Form
|
||||
common_config('group', 'maxaliases')));;
|
||||
$this->out->elementEnd('li');
|
||||
}
|
||||
Event::handle('EndGroupEditFormData', array($this));
|
||||
}
|
||||
$this->out->elementEnd('ul');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user