Turba_Form_EditContact::renderActive PHP Method

renderActive() public method

public renderActive ( $renderer, $vars, $action, $method )
    public function renderActive($renderer, $vars, $action, $method)
    {
        parent::renderActive($renderer, $vars, $action, $method);
        if ($this->_contact->isGroup()) {
            $edit_url = Horde::url('browse.php')->add(array('key' => $this->_contact->getValue('__key'), 'source' => $this->_contact->getSource()));
            echo '<div class="editGroupMembers">' . Horde::link($edit_url) . '<span class="iconImg groupImg"></span>' . _("Edit/View Contact List Members") . '</a>' . '</div>';
        }
    }

Usage Example

Example #1
0
 public function html($active = true)
 {
     global $browser, $vars;
     if (!$this->contact) {
         echo '<h3>' . _("The requested contact was not found.") . '</h3>';
         return;
     }
     if (!$this->contact->hasPermission(Horde_Perms::EDIT)) {
         if (!$this->contact->hasPermission(Horde_Perms::READ)) {
             echo '<h3>' . _("You do not have permission to view this contact.") . '</h3>';
             return;
         } else {
             echo '<h3>' . _("You only have permission to view this contact.") . '</h3>';
             return;
         }
     }
     echo '<div id="EditContact"' . ($active ? '' : ' style="display:none"') . '>';
     $form = new Turba_Form_EditContact($vars, $this->contact);
     $form->renderActive($form->getRenderer(), $vars, Horde::url('edit.php'), 'post');
     echo '</div>';
     if ($active && $browser->hasFeature('dom')) {
         if ($this->contact->hasPermission(Horde_Perms::READ)) {
             $view = new Turba_View_Contact($this->contact);
             $view->html(false);
         }
         if ($this->contact->hasPermission(Horde_Perms::DELETE)) {
             $delete = new Turba_View_DeleteContact($this->contact);
             $delete->html(false);
         }
     }
 }
All Usage Examples Of Turba_Form_EditContact::renderActive