/**
  * editAction
  * Get a record and populate the application form 
  * @return unknown_type
  */
 public function editAction()
 {
     $form = $this->getForm('/admin/customers/process');
     $id = $this->getRequest()->getParam('id');
     $this->view->title = $this->translator->translate("Customer edit");
     $this->view->description = $this->translator->translate("Here you can edit the customer details.");
     // Create the buttons in the edit form
     $this->view->buttons = array(array("url" => "#", "label" => $this->translator->translate('Save'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/customers/list", "label" => $this->translator->translate('List'), "params" => array('css' => null)), array("url" => "/admin/customers/new/", "label" => $this->translator->translate('New'), "params" => array('css' => null)));
     if (!empty($id) && is_numeric($id)) {
         $rs = $this->customers->getAllInfo($id);
         if (!empty($rs)) {
             $rs += CustomAttributes::getElementsValues($id, 'customers');
             $rs['birthdate'] = Shineisp_Commons_Utilities::formatDateOut($rs['birthdate']);
             $this->view->id = $id;
             $form->populate($rs);
             if (!empty($rs['company'])) {
                 $this->view->title = $rs['company'] . " - " . $rs['firstname'] . " " . $rs['lastname'];
             } else {
                 $this->view->title = $rs['firstname'] . " " . $rs['lastname'];
             }
             $this->view->buttons[] = array("url" => "/admin/orders/new", "label" => $this->translator->translate('New Order'), "params" => array('css' => null));
             $this->view->buttons[] = array("url" => "/admin/customers/confirm/id/{$id}", "label" => $this->translator->translate('Delete'), "params" => array('css' => null));
             $this->view->buttons[] = array("url" => "/default/index/fastlogin/id/" . Shineisp_Commons_Hasher::hash_string($rs['email']), "label" => $this->translator->translate('Public profile'), "params" => array('css' => null));
         }
     }
     $this->view->mex = $this->getRequest()->getParam('mex');
     $this->view->mexstatus = $this->getRequest()->getParam('status');
     $this->view->editmode = true;
     $this->view->addressesdatagrid = $this->addressesGrid();
     $this->view->contactsdatagrid = $this->contactsGrid();
     $this->view->filesdatagrid = $this->filesGrid();
     $this->view->domainsdatagrid = $this->domainsGrid();
     $this->view->servicesdatagrid = $this->servicesGrid();
     $this->view->ordersdatagrid = $this->ordersGrid();
     $this->view->tickets = $this->ticketsGrid();
     $this->view->invoicesdatagrid = $this->invoicesGrid();
     $this->view->sentmailsdatagrid = $this->sentmailsGrid();
     $this->view->form = $form;
     $this->render('applicantform');
 }
 /**
  * accountAction
  * Manage the Isp account settings.
  * @return void
  */
 public function editAction()
 {
     $id = $this->getRequest()->getParam('id');
     $form = $this->getForm('/admin/servers/process', $id);
     // Create the buttons in the edit form
     $this->view->buttons = array(array("url" => "#", "label" => $this->translator->translate('Save'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/servers/list", "label" => $this->translator->translate('List'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/servers/new/", "label" => $this->translator->translate('New'), "params" => array('css' => null)));
     if (!empty($id) && is_numeric($id)) {
         $rs = Servers::getAll($id);
         if (!empty($rs)) {
             $panel_id = isset($rs['panel_id']) ? $rs['panel_id'] : null;
             $arrCustomAttributes = CustomAttributes::getElementsValues($id, 'servers', $panel_id);
             $rs += $arrCustomAttributes;
             $form->populate($rs);
             $this->view->buttons[] = array("url" => "/admin/servers/confirm/id/{$id}", "label" => $this->translator->translate('Delete'), "params" => array('css' => null));
         }
     }
     $this->view->form = $form;
     $this->view->mex = $this->getRequest()->getParam('mex');
     $this->view->mexstatus = $this->getRequest()->getParam('status');
     $this->view->title = $this->translator->translate("Edit Server");
     $this->view->description = $this->translator->translate("Edit the server parameters.");
     $this->render('applicantform');
 }