You are here

function key_provider_lockr_build_configuration_form in Lockr 7.3

Same name and namespace in other branches
  1. 7 plugins/key_provider/lockr.inc \key_provider_lockr_build_configuration_form()
  2. 7.2 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) {
  $lc = lockr_client();
  try {
    $info = $lc
      ->getInfo();
  } catch (LockrApiException $e) {
    $info = NULL;
  }
  if (is_null($info)) {
    $form['need_register'] = [
      '#prefix' => '<p>',
      '#markup' => t('This site has not yet registered with Lockr, please <a href="@link">click here to register</a>.', [
        '@link' => 'admin/config/system/lockr',
      ]),
      '#suffix' => '</p>',
    ];
  }
  return $form;
}