From 542b60a19a3c95df99c6a14493bbc0bf167ae886 Mon Sep 17 00:00:00 2001
From: natrak <>
Date: Mon, 18 Jun 2001 20:51:57 +0000
Subject: Changes - Modifed form_select() to accept an optional 6th parameter
which is appeneded to the select tag. $value can now also be an array. This
allows for multiple selects: form_select($header, $name, $values,
$options, $help, "multiple=\"true\" size=\"10\""); - Updated account.module
to use the extended form_select() functionality.
---
modules/account.module | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
(limited to 'modules/account.module')
diff --git a/modules/account.module b/modules/account.module
index 560d706f0..de547a674 100644
--- a/modules/account.module
+++ b/modules/account.module
@@ -147,14 +147,20 @@ function account_form($account = 0) {
function access($name) {
global $access, $account;
- if (module_hook($name, "admin")) $access .= "";
+ if (module_hook($name, "admin")) $access[$name] = $name;
}
module_iterate("access");
+ $account->access = explode(",", $account->access);
+ foreach ($account->access as $key=>$value) {
+ $account->access[$key] = substr($value, 0, -2);
+ }
+
$form .= $account->id ? form_item("ID", $account->id) . form_hidden("id", $account->id) : "";
$form .= $account->userid ? form_item(t("Username"), check_output($account->userid)) . form_hidden("userid", $account->userid) : form_textfield(t("Username"), "userid", $account->userid, 15, 15);
$form .= form_select(t("Status"), "status", ($account->status ? $account->status : 1), array("blocked", "not confirmed", "open"));
- $form .= form_item(t("Administrator access"), "");
+ $form .= form_select(t("Administrator access"), "access", $account->access, $access, 0, "multiple=\"true\" size=\"10\"");
+// $form .= form_item(t("Administrator access"), "");
$form .= form_textfield(t("Real name"), "name", $account->name, 30, 55);
$form .= form_textfield(t("Real e-mail address"), "real_email", $account->real_email, 30, 55);
$form .= form_textfield(t("Fake e-mail address"), "fake_email", $account->fake_email, 30, 55);
--
cgit v1.2.3