You are here

function logintoboggan_form_block_admin_configure_alter in LoginToboggan 7

Implement hook_form_block_admin_configure_alter().

Related topics

File

./logintoboggan.module, line 131
LoginToboggan module

Code

function logintoboggan_form_block_admin_configure_alter(&$form, &$form_state) {
  if ($form['module']['#value'] == 'user' && $form['delta']['#value'] == 'login') {
    $form['#submit'][] = 'logintoboggan_user_block_admin_configure_submit';
    $form['settings']['title']['#description'] .= '<div id="logintoboggan-block-title-description">' . t('<strong>Note:</strong> Logintoboggan module is installed. If you are using one of the custom login block types below, it is recommended that you set this to <em>&lt;none&gt;</em>.') . '</div>';
    $form['settings']['logintoboggan_login_block_type'] = array(
      '#type' => 'radios',
      '#title' => t('Block type'),
      '#default_value' => variable_get('logintoboggan_login_block_type', 0),
      '#options' => array(
        t('Standard'),
        t('Link'),
        t('Collapsible form'),
      ),
      '#description' => t("'Standard' is a standard login block, 'Link' is a login link that returns the user to the original page after logging in, 'Collapsible form' is a JavaScript collapsible login form."),
    );
    $form['settings']['logintoboggan_login_block_message'] = array(
      '#type' => 'textarea',
      '#title' => t('Set a custom message to appear at the top of the login block'),
      '#default_value' => variable_get('logintoboggan_login_block_message', ''),
    );
  }
}