You are here

function uc_quote_admin_settings_submit in Ubercart 5

Same name and namespace in other branches
  1. 6.2 shipping/uc_quote/uc_quote.admin.inc \uc_quote_admin_settings_submit()
  2. 7.3 shipping/uc_quote/uc_quote.admin.inc \uc_quote_admin_settings_submit()

Submit function for uc_quote_admin_settings() in lieu of system_settings_form().

File

shipping/uc_quote/uc_quote.module, line 714
The controller module for fulfillment modules that process physical goods.

Code

function uc_quote_admin_settings_submit($form_id, $form_values) {
  $address = new stdClass();
  $address->first_name = $form_values['first_name'];
  $address->last_name = $form_values['last_name'];
  $address->company = $form_values['company'];
  $address->phone = $form_values['phone'];
  $address->street1 = $form_values['street1'];
  $address->street2 = $form_values['street2'];
  $address->city = $form_values['city'];
  $address->zone = $form_values['zone'];
  $address->postal_code = $form_values['postal_code'];
  $address->country = $form_values['country'];
  variable_set('uc_quote_store_default_address', $address);
  variable_set('uc_quote_log_errors', $form_values['uc_quote_log_errors']);
  variable_set('uc_quote_display_debug', $form_values['uc_quote_display_debug']);
  variable_set('uc_quote_require_quote', $form_values['uc_quote_require_quote']);
  variable_set('uc_quote_pane_description', $form_values['uc_quote_pane_description']['text']);
  variable_set('uc_quote_desc_format', $form_values['uc_quote_pane_description']['format']);
  variable_set('uc_quote_err_msg', $form_values['uc_quote_err_msg']['text']);
  variable_set('uc_quote_msg_format', $form_values['uc_quote_err_msg']['format']);
  drupal_set_message(t('The configuration options have been saved.'));
}