You are here

function key_provider_lockr_build_configuration_form in Lockr 7.2

Same name and namespace in other branches
  1. 7.3 plugins/key_provider/lockr.inc \key_provider_lockr_build_configuration_form()
  2. 7 plugins/key_provider/lockr.inc \key_provider_lockr_build_configuration_form()

The settings form.

1 string reference to 'key_provider_lockr_build_configuration_form'
lockr.inc in plugins/key_provider/lockr.inc
Key provider plugin for lockr.

File

plugins/key_provider/lockr.inc, line 36
Key provider plugin for lockr.

Code

function key_provider_lockr_build_configuration_form($form, &$form_state) {
  try {
    $status = lockr_check_registration();
  } catch (LockrServerException $e) {
    watchdog_exception('lockr', $e);
    drupal_set_message('The Lockr service has returned an error. Please try again.', 'error');
    return $form;
  }
  $exists = $status['exists'];
  if (!$exists) {
    $form['need_register'] = array(
      '#prefix' => '<p>',
      '#markup' => t('This site has not yet registered with Lockr, please <a href="@link">click here to register</a>.', array(
        '@link' => 'admin/config/system/lockr',
      )),
      '#suffix' => '</p>',
    );
  }
  return $form;
}