Commit f4fe0cf1 authored by Dries's avatar Dries

- Improvement: made the user module use themeable lists.  Patch #32 by Kristjan.
parent 70d1edd8
...@@ -680,11 +680,11 @@ function user_login($edit = array(), $msg = "") { ...@@ -680,11 +680,11 @@ function user_login($edit = array(), $msg = "") {
$output .= form_password(t("Password"), "pass", $pass, 30, 64, t("Enter the password that accompanies your username.")); $output .= form_password(t("Password"), "pass", $pass, 30, 64, t("Enter the password that accompanies your username."));
$output .= form_checkbox(t("Remember me"), "remember_me", 1, 0, 0); $output .= form_checkbox(t("Remember me"), "remember_me", 1, 0, 0);
$output .= form_submit(t("Log in")); $output .= form_submit(t("Log in"));
$output .= "<p>&raquo; ". l(t("Request new password"), "user/password"). "<br />"; $items[] = l(t("Request new password"), "user/password");
if (variable_get("user_register", 1)) { if (variable_get("user_register", 1)) {
$output .= "&raquo; ". l(t("Create new account"), "user/register"); $items[] = l(t("Create new account"), "user/register");
} }
$output .= "</p>"; $output .= theme("theme_item_list", $items);
return form($output, "post", url("user")); return form($output, "post", url("user"));
} }
...@@ -772,11 +772,11 @@ function user_pass($edit = array()) { ...@@ -772,11 +772,11 @@ function user_pass($edit = array()) {
$output .= form_textfield(t("Username"), "name", $edit["name"], 30, 64); $output .= form_textfield(t("Username"), "name", $edit["name"], 30, 64);
$output .= form_textfield(t("E-mail address"), "mail", $edit["mail"], 30, 64); $output .= form_textfield(t("E-mail address"), "mail", $edit["mail"], 30, 64);
$output .= form_submit(t("E-mail new password")); $output .= form_submit(t("E-mail new password"));
$output .= "<p>&raquo; ". l(t("Log in"), "user/login") ."<br />"; $items[] = l(t("Log in"), "user/login");
if (variable_get("user_register", 1)) { if (variable_get("user_register", 1)) {
$output .= "&raquo; ". l(t("Create new account"), "user/register"); $items[] = l(t("Create new account"), "user/register");
} }
$output .= "</p>"; $output .= theme("theme_item_list", $items);
return form($output, "post", url("user")); return form($output, "post", url("user"));
} }
...@@ -904,8 +904,9 @@ function user_register($edit = array()) { ...@@ -904,8 +904,9 @@ function user_register($edit = array()) {
} }
} }
$output .= form_submit(t("Create new account")); $output .= form_submit(t("Create new account"));
$output .= "<p>&raquo; ". l(t("E-mail new password"), "user/password"). "<br />"; $items[] = l(t("E-mail new password"), "user/password");
$output .= "&raquo; ". l(t("Log in"), "user/login") ."</p>"; $items[] = l(t("Log in"), "user/login");
$output .= theme("theme_item_list", $items);
return form($output); return form($output);
} }
......
...@@ -680,11 +680,11 @@ function user_login($edit = array(), $msg = "") { ...@@ -680,11 +680,11 @@ function user_login($edit = array(), $msg = "") {
$output .= form_password(t("Password"), "pass", $pass, 30, 64, t("Enter the password that accompanies your username.")); $output .= form_password(t("Password"), "pass", $pass, 30, 64, t("Enter the password that accompanies your username."));
$output .= form_checkbox(t("Remember me"), "remember_me", 1, 0, 0); $output .= form_checkbox(t("Remember me"), "remember_me", 1, 0, 0);
$output .= form_submit(t("Log in")); $output .= form_submit(t("Log in"));
$output .= "<p>&raquo; ". l(t("Request new password"), "user/password"). "<br />"; $items[] = l(t("Request new password"), "user/password");
if (variable_get("user_register", 1)) { if (variable_get("user_register", 1)) {
$output .= "&raquo; ". l(t("Create new account"), "user/register"); $items[] = l(t("Create new account"), "user/register");
} }
$output .= "</p>"; $output .= theme("theme_item_list", $items);
return form($output, "post", url("user")); return form($output, "post", url("user"));
} }
...@@ -772,11 +772,11 @@ function user_pass($edit = array()) { ...@@ -772,11 +772,11 @@ function user_pass($edit = array()) {
$output .= form_textfield(t("Username"), "name", $edit["name"], 30, 64); $output .= form_textfield(t("Username"), "name", $edit["name"], 30, 64);
$output .= form_textfield(t("E-mail address"), "mail", $edit["mail"], 30, 64); $output .= form_textfield(t("E-mail address"), "mail", $edit["mail"], 30, 64);
$output .= form_submit(t("E-mail new password")); $output .= form_submit(t("E-mail new password"));
$output .= "<p>&raquo; ". l(t("Log in"), "user/login") ."<br />"; $items[] = l(t("Log in"), "user/login");
if (variable_get("user_register", 1)) { if (variable_get("user_register", 1)) {
$output .= "&raquo; ". l(t("Create new account"), "user/register"); $items[] = l(t("Create new account"), "user/register");
} }
$output .= "</p>"; $output .= theme("theme_item_list", $items);
return form($output, "post", url("user")); return form($output, "post", url("user"));
} }
...@@ -904,8 +904,9 @@ function user_register($edit = array()) { ...@@ -904,8 +904,9 @@ function user_register($edit = array()) {
} }
} }
$output .= form_submit(t("Create new account")); $output .= form_submit(t("Create new account"));
$output .= "<p>&raquo; ". l(t("E-mail new password"), "user/password"). "<br />"; $items[] = l(t("E-mail new password"), "user/password");
$output .= "&raquo; ". l(t("Log in"), "user/login") ."</p>"; $items[] = l(t("Log in"), "user/login");
$output .= theme("theme_item_list", $items);
return form($output); return form($output);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment