]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19788 Upgraded calls to choose_from_menu
authornicolasconnault <nicolasconnault>
Mon, 17 Aug 2009 15:15:42 +0000 (15:15 +0000)
committernicolasconnault <nicolasconnault>
Mon, 17 Aug 2009 15:15:42 +0000 (15:15 +0000)
auth/cas/config.html
auth/db/config.html
auth/email/config.html
auth/imap/config.html
auth/ldap/config.html
auth/mnet/config.html
auth/pop3/config.html
auth/radius/config.html

index 2ae572101472861b0bde99d52f872b03c1d69c7b..7911bc65052c7218bc4b69da4259c69e404cf62e 100644 (file)
@@ -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?
 
     <td>
 
-    <?php choose_from_menu($this->ldap_suppported_usertypes(), 'user_type', $config->user_type, ''); ?>
+    <?php echo $OUTPUT->select(html_select::make($this->ldap_suppported_usertypes(), 'user_type', $config->user_type, false)); ?>
 
     <?php  if (isset($err['user_type'])) formerr($err['user_type']); ?>
 
@@ -574,7 +579,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 
     <td>
 
-        <?php choose_from_menu($yesno, 'search_sub', $config->search_sub, ''); ?>
+        <?php echo $OUTPUT->select(html_select::make($yesno, 'search_sub', $config->search_sub, false)); ?>
 
     </td>
 
@@ -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));
 
     ?>
 
index 25a0d86703e9282165eedc41098433430bd31ca6..a4ddfaca4b80c9ea0a2f00ac3377b13a27a4cd5d 100644 (file)
@@ -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));
     ?>
 
     </td>
@@ -86,7 +86,7 @@
 <tr valign="top" class="required">
     <td align="right"><label for="menusybasequoting"><?php print_string("auth_dbsybasequoting", "auth_db") ?></label></td>
     <td>
-        <?php choose_from_menu($yesno, 'sybasequoting', $config->sybasequoting, ''); ?>
+        <?php echo $OUTPUT->select(html_select::make($yesno, 'sybasequoting', $config->sybasequoting, false)); ?>
     </td>
     <td><?php print_string("auth_dbsybasequotinghelp", "auth_db") ?></td>
 </tr>
         $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));
 
         ?>
     </td>
 <tr valign="top">
     <td align="right"><label for="menudebugauthdb"><?php print_string("auth_dbdebugauthdb", "auth_db") ?></label></td>
     <td>
-        <?php choose_from_menu($yesno, 'debugauthdb', $config->debugauthdb, ''); ?>
+        <?php echo $OUTPUT->select(html_select::make($yesno, 'debugauthdb', $config->debugauthdb, false)); ?>
     </td>
     <td><?php print_string("auth_dbdebugauthdbhelp", "auth_db") ?></td>
 </tr>
        $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));
     ?>
     </td>
     <td>
index 8b6b8290309e2f28dce15f59605c1de6e86a324c..7873cd12d025bb3ac940d01173f5c2a87f9635a9 100644 (file)
@@ -17,7 +17,7 @@
 </tr>
 <tr>
     <td align="right"><label for="menurecaptcha"><?php print_string('auth_emailrecaptcha_key', 'auth_email') ?></label></td>
-    <td><?php choose_from_menu($yesno, 'recaptcha', $config->recaptcha, ''); ?></td> 
+    <td><?php echo $OUTPUT->select(html_select::make($yesno, 'recaptcha', $config->recaptcha, false)); ?></td> 
     <td><?php print_string('auth_emailrecaptcha', 'auth_email') ?></td>
 </tr>    
 <?php
index dbe56b8c6651c5c92405eeb0f74fac816695d43b..a1ef40a2ca6647be588b2770835208eb9cddda28 100644 (file)
@@ -48,7 +48,7 @@ if (!isset($config->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));
 
         ?>
     </td>
index 155832023e1a973d4a55748fbe036dc9063a6fce..3c04f8d8e904410059e8131cbee21b4a57b66783 100644 (file)
@@ -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']);
     ?>
     </td>
@@ -128,7 +128,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 <tr valign="top" class="required">
     <td align="right"><label for="menupreventpassindb"><?php print_string('auth_ldap_preventpassindb_key','auth_ldap') ?></label></td>
     <td>
-        <?php choose_from_menu($yesno, 'preventpassindb', $config->preventpassindb, ''); ?>
+        <?php echo $OUTPUT->select(html_select::make($yesno, 'preventpassindb', $config->preventpassindb, false)); ?>
     </td><td>
     <?php print_string('auth_ldap_preventpassindb','auth_ldap') ?>
     </td>
@@ -163,7 +163,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 <tr valign="top" class="required">
     <td align="right"><label for="menuuser_type"><?php print_string('auth_ldap_user_type_key','auth_ldap') ?></label></td>
     <td>
-    <?php choose_from_menu($this->ldap_suppported_usertypes(), 'user_type', $config->user_type, ''); ?>
+    <?php echo $OUTPUT->select(html_select::make($this->ldap_suppported_usertypes(), 'user_type', $config->user_type, false)); ?>
     <?php  if (isset($err['user_type'])) formerr($err['user_type']); ?>
     </td>
     <td>
@@ -185,7 +185,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 <tr valign="top" class="required">
     <td align="right"><label for="menusearch_sub"><?php print_string('auth_ldap_search_sub_key','auth_ldap') ?></label></td>
     <td>
-        <?php choose_from_menu($yesno, 'search_sub', $config->search_sub, ''); ?>
+        <?php echo $OUTPUT->select(html_select::make($yesno, 'search_sub', $config->search_sub, false)); ?>
     </td>
     <td>
     <?php print_string('auth_ldap_search_sub','auth_ldap') ?>
@@ -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']);
     ?>
     </td>
@@ -261,7 +261,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 <tr valign="top" class="required">
     <td align="right" valign="top"><label for="menuforcechangepassword"><?php print_string('forcechangepassword', 'auth') ?></label></td>
     <td>
-        <?php choose_from_menu($yesno, 'forcechangepassword', $config->forcechangepassword, ''); ?>
+        <?php echo $OUTPUT->select(html_select::make($yesno, 'forcechangepassword', $config->forcechangepassword, false)); ?>
     </td>
     <td align="left" valign="top">
         <p><?php print_string('forcechangepasswordfirst_help', 'auth') ?></p>
@@ -271,7 +271,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 <tr valign="top"  class="required">
     <td align="right" valign="top"><label for="menustdchangepassword"><?php print_string('stdchangepassword', 'auth') ?></label></td>
     <td>
-        <?php choose_from_menu($yesno, 'stdchangepassword', $config->stdchangepassword, ''); ?>
+        <?php echo $OUTPUT->select(html_select::make($yesno, 'stdchangepassword', $config->stdchangepassword, false)); ?>
     </td>
     <td align="left" valign="top">
         <p><?php print_string('stdchangepassword_expl', 'auth') ?></p>
@@ -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));
 
         ?>
     </td>
@@ -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']);
     ?>
     </td>
@@ -359,7 +359,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 <tr valign="top" class="required">
     <td align="right"><label for="menugracelogins"><?php print_string('auth_ldap_gracelogins_key','auth_ldap') ?></label></td>
     <td>
-        <?php choose_from_menu($yesno, 'gracelogins', $config->gracelogins, ''); ?>
+        <?php echo $OUTPUT->select(html_select::make($yesno, 'gracelogins', $config->gracelogins, false)); ?>
     </td>
     <td>
     <?php print_string('auth_ldap_gracelogins_desc','auth_ldap') ?>
@@ -389,7 +389,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
 <tr valign="top">
     <td align="right"><label for="menuauth_user_create"><?php print_string('auth_ldap_auth_user_create_key','auth_ldap') ?></label></td>
     <td>
-      <?php choose_from_menu($yesno, 'auth_user_create', $config->auth_user_create, ''); ?>
+      <?php echo $OUTPUT->select(html_select::make($yesno, 'auth_user_create', $config->auth_user_create, false)); ?>
     </td>
     <td>
         <?php print_string("auth_user_creation","auth"); ?>
@@ -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));
     ?>
     </td>
     <td>
@@ -455,7 +455,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
     <td align="right"><label for="menuntlmsso_enabled"><?php print_string('auth_ntlmsso_enabled_key','auth_ldap') ?></label></td>
     <td>
     <?php
-       choose_from_menu($yesno, 'ntlmsso_enabled', $config->ntlmsso_enabled, '0');
+       echo $OUTPUT->select(html_select::make($yesno, 'ntlmsso_enabled', $config->ntlmsso_enabled));
     ?>
     </td>
     <td>
@@ -474,7 +474,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
     <td align="right"><label for="menuntlmsso_ie_fastpath"><?php print_string('auth_ntlmsso_ie_fastpath_key','auth_ldap') ?></label></td>
     <td>
     <?php
-       choose_from_menu($yesno, 'ntlmsso_ie_fastpath', $config->ntlmsso_ie_fastpath, '0');
+       echo $OUTPUT->select(html_select::make($yesno, 'ntlmsso_ie_fastpath', $config->ntlmsso_ie_fastpath));
     ?>
     </td>
     <td>
index c45d4dd4dbb6498ec5a42adf37a5ef224ec8e4ca..d40492028e53f9e1ce8af57abefb2153a72214e3 100644 (file)
@@ -44,7 +44,7 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
     <td>
         <?php
 
-        choose_from_menu($yesno, 'auto_add_remote_users', $config->auto_add_remote_users, '');
+        echo $OUTPUT->select(html_select::make($yesno, 'auto_add_remote_users', $config->auto_add_remote_users, false));
 
         ?>
     </td>
index 7fc609a8ea26b3eced54e5af2c68c8c51c92bea7..a17b3ea15c6d8608a4e97075b2d4789f20b56c24 100644 (file)
@@ -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));
 
         ?>
     </td>
index 16180a24cf9ad2563a22128e96b0341bc7c4a611..aa86aa761f6f598778e050fbba4c18b870361b12 100644 (file)
@@ -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']);