コード例 #1
0
 public function memberForm()
 {
     $form->add('add_member', 'textfield');
     $form->add('new_member_submit', 'submit', dgettext('users', 'Add'));
     $template['CURRENT_MEMBERS'] = User_Form::memberListForm($group);
     $template['ADD_MEMBER_LBL'] = dgettext('users', 'Add Member');
     $template['CURRENT_MEMBERS_LBL'] = dgettext('users', 'Current Members');
     if (isset($_POST['new_member_submit']) && !empty($_POST['add_member'])) {
         $result = User_Form::getLikeGroups($_POST['add_member'], $group);
         if (isset($result)) {
             $template['LIKE_GROUPS'] = $result;
             $template['LIKE_INSTRUCTION'] = dgettext('users', 'Members found.');
         } else {
             $template['LIKE_INSTRUCTION'] = dgettext('users', 'No matches found.');
         }
     }
 }