Exemplo n.º 1
0
 /**
  * Loads the client settings form
  *
  * @return	void
  */
 private function loadClientForm()
 {
     // init account settings form
     $this->frmClient = new BackendForm('settingsClient');
     // an account was succesfully made
     if ($this->accountLinked) {
         // get all clients linked to the active account
         $clients = BackendMailmotorCMHelper::getClientsAsPairs();
         // add field for client ID
         $this->frmClient->addDropdown('client_id', $clients, $this->clientID);
     }
     // account was made
     if ($this->accountLinked) {
         // fetch CM countries
         $countries = BackendMailmotorCMHelper::getCountriesAsPairs();
         // fetch CM timezones
         $timezones = BackendMailmotorCMHelper::getTimezonesAsPairs();
         // add fields for campaignmonitor client ID
         $this->frmClient->addText('company_name', $this->settings['cm_client_company_name']);
         $this->frmClient->addText('contact_name', $this->settings['cm_client_contact_name']);
         $this->frmClient->addText('contact_email', $this->settings['cm_client_contact_email']);
         $this->frmClient->addDropdown('countries', $countries, $this->settings['cm_client_country']);
         $this->frmClient->addDropdown('timezones', $timezones, $this->settings['cm_client_timezone']);
     }
     // sender info
     $this->frmClient->addText('from_name', $this->settings['from_name']);
     $this->frmClient->addText('from_email', $this->settings['from_email']);
     // reply to address
     $this->frmClient->addText('reply_to_email', $this->settings['reply_to_email']);
     // add fields for comments
     $this->frmClient->addCheckbox('plain_text_editable', $this->settings['plain_text_editable']);
     // price per email
     if (BackendAuthentication::getUser()->isGod()) {
         $this->frmClient->addText('price_per_email', $this->settings['price_per_email']);
     }
 }