You are here

function lockr_admin_register_form in Lockr 7.3

Same name and namespace in other branches
  1. 7 include/register_form.inc \lockr_admin_register_form()
  2. 7.2 include/register_form.inc \lockr_admin_register_form()
1 string reference to 'lockr_admin_register_form'
lockr_admin_page in ./lockr.admin.inc

File

./lockr.admin.inc, line 127
Form callbacks for Lockr register form.

Code

function lockr_admin_register_form($form, &$form_state) {
  $accounts_host = variable_get('lockr_accounts_host', 'accounts.lockr.io');
  $form['#attached']['js'] = [
    [
      'type' => 'setting',
      'data' => [
        'lockr' => [
          'site_name' => variable_get('site_name'),
          'accounts_host' => "https://{$accounts_host}",
        ],
      ],
    ],
    drupal_get_path('module', 'lockr') . '/js/register.js',
  ];
  $form['client_token'] = [
    '#type' => 'hidden',
    '#required' => TRUE,
  ];
  $form['register'] = [
    '#type' => 'button',
    '#value' => t('Register site'),
    '#attributes' => [
      'class' => [
        'register-site',
      ],
    ],
  ];
  $form['submit'] = [
    '#type' => 'submit',
    '#value' => 'Submit',
    '#attributes' => [
      'class' => [
        'register-submit',
      ],
    ],
  ];
  return $form;
}