- Patch #28320 by Neil: improved the HTML/CSS of the user login block.
parent
a73d5744c3
commit
16262e03d5
|
@ -452,7 +452,7 @@ img.screenshot {
|
||||||
#tracker table {
|
#tracker table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.user-login-block {
|
#user-login-form {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.more-help-link {
|
.more-help-link {
|
||||||
|
|
|
@ -517,8 +517,6 @@ function user_block($op = 'list', $delta = 0, $edit = array()) {
|
||||||
if (!$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1)))) {
|
if (!$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1)))) {
|
||||||
$edit = $_POST['edit'];
|
$edit = $_POST['edit'];
|
||||||
|
|
||||||
$output = "<div class=\"user-login-block\">\n";
|
|
||||||
|
|
||||||
// NOTE: special care needs to be taken because on pages with forms,
|
// NOTE: special care needs to be taken because on pages with forms,
|
||||||
// such as node and comment submission pages, the $edit variable
|
// such as node and comment submission pages, the $edit variable
|
||||||
// might already be set.
|
// might already be set.
|
||||||
|
@ -526,9 +524,8 @@ function user_block($op = 'list', $delta = 0, $edit = array()) {
|
||||||
$output .= form_textfield(t('Username'), 'name', $edit['name'], 15, 64);
|
$output .= form_textfield(t('Username'), 'name', $edit['name'], 15, 64);
|
||||||
$output .= form_password(t('Password'), 'pass', '', 15, 64);
|
$output .= form_password(t('Password'), 'pass', '', 15, 64);
|
||||||
$output .= form_submit(t('Log in'));
|
$output .= form_submit(t('Log in'));
|
||||||
$output .= "</div>\n";
|
|
||||||
|
|
||||||
$output = form($output, 'post', url('user/login', drupal_get_destination()));
|
$output = form($output, 'post', url('user/login', drupal_get_destination()), array('id' => 'user-login-form'));
|
||||||
|
|
||||||
if (variable_get('user_register', 1)) {
|
if (variable_get('user_register', 1)) {
|
||||||
$items[] = l(t('Create new account'), 'user/register', array('title' => t('Create a new user account.')));
|
$items[] = l(t('Create new account'), 'user/register', array('title' => t('Create a new user account.')));
|
||||||
|
|
|
@ -517,8 +517,6 @@ function user_block($op = 'list', $delta = 0, $edit = array()) {
|
||||||
if (!$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1)))) {
|
if (!$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1)))) {
|
||||||
$edit = $_POST['edit'];
|
$edit = $_POST['edit'];
|
||||||
|
|
||||||
$output = "<div class=\"user-login-block\">\n";
|
|
||||||
|
|
||||||
// NOTE: special care needs to be taken because on pages with forms,
|
// NOTE: special care needs to be taken because on pages with forms,
|
||||||
// such as node and comment submission pages, the $edit variable
|
// such as node and comment submission pages, the $edit variable
|
||||||
// might already be set.
|
// might already be set.
|
||||||
|
@ -526,9 +524,8 @@ function user_block($op = 'list', $delta = 0, $edit = array()) {
|
||||||
$output .= form_textfield(t('Username'), 'name', $edit['name'], 15, 64);
|
$output .= form_textfield(t('Username'), 'name', $edit['name'], 15, 64);
|
||||||
$output .= form_password(t('Password'), 'pass', '', 15, 64);
|
$output .= form_password(t('Password'), 'pass', '', 15, 64);
|
||||||
$output .= form_submit(t('Log in'));
|
$output .= form_submit(t('Log in'));
|
||||||
$output .= "</div>\n";
|
|
||||||
|
|
||||||
$output = form($output, 'post', url('user/login', drupal_get_destination()));
|
$output = form($output, 'post', url('user/login', drupal_get_destination()), array('id' => 'user-login-form'));
|
||||||
|
|
||||||
if (variable_get('user_register', 1)) {
|
if (variable_get('user_register', 1)) {
|
||||||
$items[] = l(t('Create new account'), 'user/register', array('title' => t('Create a new user account.')));
|
$items[] = l(t('Create new account'), 'user/register', array('title' => t('Create a new user account.')));
|
||||||
|
|
Loading…
Reference in New Issue