You are here

function login_shadowbox_login in Shadowbox 7.4

1 string reference to 'login_shadowbox_login'
login_shadowbox_menu in login_shadowbox/login_shadowbox.module
Implementation of hook_menu()

File

login_shadowbox/login_shadowbox.pages.inc, line 3

Code

function login_shadowbox_login() {
  _login_shadowbox_js_css();

  // LOGIN FORM BEGIN
  $login_form = '<div id="shadowbox_login" class="shadowbox_login_wrapper">';
  $login_form .= '<button class="shadowbox_login_close_button">x</button>';

  // add login form
  $form = drupal_get_form("user_login");
  $login_form .= drupal_render($form);

  // add the registration and reset password links
  if (variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)) {
    $items[] = l(t('Create new account'), 'user/register', array(
      'attributes' => array(
        'title' => t('Create a new user account.'),
      ),
    ));
  }
  $items[] = l(t('Request new password'), 'user/password', array(
    'attributes' => array(
      'title' => t('Request new password via e-mail.'),
    ),
  ));
  $links['links'] = array(
    '#markup' => theme('item_list', array(
      'items' => $items,
    )),
  );
  $login_form .= drupal_render($links);
  $login_form .= '</div>';

  // LOGIN FORM END
  print theme('login_shadowbox_page', array(
    'title' => 'Login',
    'content' => $login_form,
  ));
  return NULL;
}