You are here

function livechat_admin_license_form_submit in LiveChat 7

Submit callback for license installation form.

File

./livechat.admin.inc, line 242
Administration pages for the LiveChat module.

Code

function livechat_admin_license_form_submit($form, &$form_state) {
  if ($form_state['values']['op'] === t('Remove')) {

    // Forget license if the "Reset" button was clicked.
    variable_del('livechat_license');
  }
  else {

    // Save the license that was returned by the admin JavaScript.
    variable_set('livechat_license', $form_state['input']['license_number']);
  }
}