From: nicolasconnault Date: Mon, 17 Aug 2009 15:15:42 +0000 (+0000) Subject: MDL-19788 Upgraded calls to choose_from_menu X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=977e5edbd9e5358da6f7d838c7adf245ad3d80b6;p=moodle.git MDL-19788 Upgraded calls to choose_from_menu --- diff --git a/auth/cas/config.html b/auth/cas/config.html index 2ae5721014..7911bc6505 100644 --- a/auth/cas/config.html +++ b/auth/cas/config.html @@ -278,7 +278,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - choose_from_menu($CASLANGUAGES, 'language', $config->language, ''); + echo $OUTPUT->select(html_select::make($CASLANGUAGES, 'language', $config->language, false)); @@ -303,8 +303,9 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? unset($options); $options[1] = get_string('yes'); - - choose_from_menu ($options, 'proxycas', $config->proxycas, get_string('no'), '', ''); + $select = html_select::make($options, 'proxycas', $config->proxycas, get_string('no')); + $select->nothingvalue = ''; + echo $OUTPUT->select($select); ?> @@ -328,7 +329,9 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? $options[1] = get_string('yes'); - choose_from_menu ($options, 'logoutcas', $config->logoutcas, get_string('no'), '', ''); + $select = html_select::make($options, 'logoutcas', $config->logoutcas, get_string('no')); + $select->nothingvalue = ''; + echo $OUTPUT->select($select); ?> @@ -352,7 +355,9 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? $options[1] = get_string('yes'); - choose_from_menu ($options, 'multiauth', $config->multiauth, get_string('no'), '', ''); + $select = html_select::make($options, 'multiauth', $config->multiauth, get_string('no')); + $select->nothingvalue = ''; + echo $OUTPUT->select($select); ?> @@ -412,7 +417,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? $versions[3] = '3'; - choose_from_menu($versions, 'version', $config->version, ''); + echo $OUTPUT->select(html_select::make($versions, 'version', $config->version, false)); if (isset($err['version'])) formerr($err['version']); @@ -530,7 +535,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - ldap_suppported_usertypes(), 'user_type', $config->user_type, ''); ?> + select(html_select::make($this->ldap_suppported_usertypes(), 'user_type', $config->user_type, false)); ?> @@ -574,7 +579,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - search_sub, ''); ?> + select(html_select::make($yesno, 'search_sub', $config->search_sub, false)); ?> @@ -602,7 +607,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? $opt_deref[LDAP_DEREF_ALWAYS] = get_string('yes'); - choose_from_menu($opt_deref, 'opt_deref', $config->opt_deref, LDAP_DEREF_NEVER, ''); + echo $OUTPUT->select(html_select::make($opt_deref, 'opt_deref', $config->opt_deref, LDAP_DEREF_NEVER, false)); if (isset($err['opt_deref'])) formerr($err['opt_deref']); @@ -788,7 +793,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? $deleteopt[AUTH_REMOVEUSER_FULLDELETE] = get_string('auth_remove_delete','auth'); - choose_from_menu($deleteopt, 'removeuser', $config->removeuser, ''); + echo $OUTPUT->select(html_select::make($deleteopt, 'removeuser', $config->removeuser, false)); ?> diff --git a/auth/db/config.html b/auth/db/config.html index 25a0d86703..a4ddfaca4b 100644 --- a/auth/db/config.html +++ b/auth/db/config.html @@ -74,7 +74,7 @@ foreach ($dbtypes as $dbtype) { $dboptions[$dbtype] = $dbtype; } - choose_from_menu($dboptions, "type", $config->type, ""); + echo $OUTPUT->select(html_select::make($dboptions, "type", $config->type, false)); ?> @@ -86,7 +86,7 @@ - sybasequoting, ''); ?> + select(html_select::make($yesno, 'sybasequoting', $config->sybasequoting, false)); ?> @@ -192,7 +192,7 @@ $passtype["md5"] = get_string("md5", "auth"); $passtype["sha1"] = get_string("sha1", "auth"); $passtype["internal"] = get_string("internal", "auth"); - choose_from_menu($passtype, "passtype", $config->passtype, ""); + echo $OUTPUT->select(html_select::make($passtype, "passtype", $config->passtype, false)); ?> @@ -225,7 +225,7 @@ - debugauthdb, ''); ?> + select(html_select::make($yesno, 'debugauthdb', $config->debugauthdb, false)); ?> @@ -259,7 +259,7 @@ $deleteopt[AUTH_REMOVEUSER_KEEP] = get_string('auth_remove_keep','auth'); $deleteopt[AUTH_REMOVEUSER_SUSPEND] = get_string('auth_remove_suspend','auth'); $deleteopt[AUTH_REMOVEUSER_FULLDELETE] = get_string('auth_remove_delete','auth'); - choose_from_menu($deleteopt, 'removeuser', $config->removeuser, ''); + echo $OUTPUT->select(html_select::make($deleteopt, 'removeuser', $config->removeuser, false)); ?> diff --git a/auth/email/config.html b/auth/email/config.html index 8b6b829030..7873cd12d0 100644 --- a/auth/email/config.html +++ b/auth/email/config.html @@ -17,7 +17,7 @@ - recaptcha, ''); ?> + select(html_select::make($yesno, 'recaptcha', $config->recaptcha, false)); ?> changepasswordurl)) { foreach ($imaptypes as $imaptype) { $imapoptions[$imaptype] = $imaptype; } - choose_from_menu($imapoptions, 'type', $config->type, ''); + echo $OUTPUT->select(html_select::make($imapoptions, 'type', $config->type, false)); ?> diff --git a/auth/ldap/config.html b/auth/ldap/config.html index 155832023e..3c04f8d8e9 100644 --- a/auth/ldap/config.html +++ b/auth/ldap/config.html @@ -95,7 +95,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? $versions = array(); $versions[2] = '2'; $versions[3] = '3'; - choose_from_menu($versions, 'version', $config->version, ''); + echo $OUTPUT->select(html_select::make($versions, 'version', $config->version, false)); if (isset($err['version'])) formerr($err['version']); ?> @@ -128,7 +128,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - preventpassindb, ''); ?> + select(html_select::make($yesno, 'preventpassindb', $config->preventpassindb, false)); ?> @@ -163,7 +163,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - ldap_suppported_usertypes(), 'user_type', $config->user_type, ''); ?> + select(html_select::make($this->ldap_suppported_usertypes(), 'user_type', $config->user_type, false)); ?> @@ -185,7 +185,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - search_sub, ''); ?> + select(html_select::make($yesno, 'search_sub', $config->search_sub, false)); ?> @@ -199,7 +199,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? $opt_deref = array(); $opt_deref[LDAP_DEREF_NEVER] = get_string('no'); $opt_deref[LDAP_DEREF_ALWAYS] = get_string('yes'); - choose_from_menu($opt_deref, 'opt_deref', $config->opt_deref, LDAP_DEREF_NEVER, ''); + echo $OUTPUT->select(html_select::make($opt_deref, 'opt_deref', $config->opt_deref, LDAP_DEREF_NEVER, false)); if (isset($err['opt_deref'])) formerr($err['opt_deref']); ?> @@ -261,7 +261,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - forcechangepassword, ''); ?> + select(html_select::make($yesno, 'forcechangepassword', $config->forcechangepassword, false)); ?>

@@ -271,7 +271,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - stdchangepassword, ''); ?> + select(html_select::make($yesno, 'stdchangepassword', $config->stdchangepassword, false)); ?>

@@ -287,7 +287,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? $passtype['plaintext'] = get_string('plaintext', 'auth'); $passtype['md5'] = get_string('md5', 'auth'); $passtype['sha1'] = get_string('sha1', 'auth'); - choose_from_menu($passtype, 'passtype', $config->passtype, ''); + echo $OUTPUT->select(html_select::make($passtype, 'passtype', $config->passtype, false)); ?> @@ -322,7 +322,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? $expiration = array(); $expiration['0'] = 'no'; $expiration['1'] = 'LDAP'; - choose_from_menu($expiration, 'expiration', $config->expiration, ''); + echo $OUTPUT->select(html_select::make($expiration, 'expiration', $config->expiration, false)); if (isset($err['expiration'])) formerr($err['expiration']); ?> @@ -359,7 +359,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - gracelogins, ''); ?> + select(html_select::make($yesno, 'gracelogins', $config->gracelogins, false)); ?> @@ -389,7 +389,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - auth_user_create, ''); ?> + select(html_select::make($yesno, 'auth_user_create', $config->auth_user_create, false)); ?> @@ -437,7 +437,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? $deleteopt[AUTH_REMOVEUSER_KEEP] = get_string('auth_remove_keep','auth'); $deleteopt[AUTH_REMOVEUSER_SUSPEND] = get_string('auth_remove_suspend','auth'); $deleteopt[AUTH_REMOVEUSER_FULLDELETE] = get_string('auth_remove_delete','auth'); - choose_from_menu($deleteopt, 'removeuser', $config->removeuser, ''); + echo $OUTPUT->select(html_select::make($deleteopt, 'removeuser', $config->removeuser, false)); ?> @@ -455,7 +455,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? ntlmsso_enabled, '0'); + echo $OUTPUT->select(html_select::make($yesno, 'ntlmsso_enabled', $config->ntlmsso_enabled)); ?> @@ -474,7 +474,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? ntlmsso_ie_fastpath, '0'); + echo $OUTPUT->select(html_select::make($yesno, 'ntlmsso_ie_fastpath', $config->ntlmsso_ie_fastpath)); ?> diff --git a/auth/mnet/config.html b/auth/mnet/config.html index c45d4dd4db..d40492028e 100644 --- a/auth/mnet/config.html +++ b/auth/mnet/config.html @@ -44,7 +44,7 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict' auto_add_remote_users, ''); + echo $OUTPUT->select(html_select::make($yesno, 'auto_add_remote_users', $config->auto_add_remote_users, false)); ?> diff --git a/auth/pop3/config.html b/auth/pop3/config.html index 7fc609a8ea..a17b3ea15c 100644 --- a/auth/pop3/config.html +++ b/auth/pop3/config.html @@ -51,7 +51,7 @@ if (!isset($config->changepasswordurl)) { foreach ($pop3types as $pop3type) { $pop3options[$pop3type] = $pop3type; } - choose_from_menu($pop3options, 'type', $config->type, ''); + echo $OUTPUT->select(html_select::make($pop3options, 'type', $config->type, false)); ?> diff --git a/auth/radius/config.html b/auth/radius/config.html index 16180a24cf..aa86aa761f 100644 --- a/auth/radius/config.html +++ b/auth/radius/config.html @@ -69,7 +69,7 @@ if (!isset($config->changepasswordurl)) { $radiustype['CHAP_MD5'] = get_string('auth_radiustypechapmd5', 'auth_radius'); $radiustype['MSCHAPv1'] = get_string('auth_radiustypemschapv1', 'auth_radius'); $radiustype['MSCHAPv2'] = get_string('auth_radiustypemschapv2', 'auth_radius'); - choose_from_menu($radiustype, 'radiustype', $config->radiustype, ''); + echo $OUTPUT->select(html_select::make($radiustype, 'radiustype', $config->radiustype, false)); if (isset($err['radiustype'])) { formerr($err['radiustype']);