MDL-21577 fixed regression
authorPetr Skoda <skodak@moodle.org>
Wed, 10 Feb 2010 16:26:23 +0000 (16:26 +0000)
committerPetr Skoda <skodak@moodle.org>
Wed, 10 Feb 2010 16:26:23 +0000 (16:26 +0000)
admin/webservice/service_users.php

index 47d74b7..8811c1a 100644 (file)
@@ -170,15 +170,9 @@ if (!empty($allowedusers)) {
         //valid until date selector
         $contents .= "<div class=\"fitem\"><div class=\"fitemtitle\"><label>".get_string('validuntil','webservice')." </label></div><div class=\"felement\">";
         // the following date selector needs to have specific day/month/year field ids because we use javascript (enable/disable).
-        $selectors = html_writer::select_time('days', 'fromday'.$user->id, $user->validuntil)
-                   . html_writer::select_time('months', 'frommonth'.$user->id, $user->validuntil)
-                   . html_writer::select_time('years', 'fromyear'.$user->id, $user->validuntil);
-        foreach ($selectors as $select) {
-            if (empty($user->validuntil)) {
-                $select->disabled = true;
-            }
-            $contents .= $OUTPUT->select($select);
-        }
+        $contents .= html_writer::select_time('days', 'fromday'.$user->id, $user->validuntil);
+        $contents .= html_writer::select_time('months', 'frommonth'.$user->id, $user->validuntil);
+        $contents .= html_writer::select_time('years', 'fromyear'.$user->id, $user->validuntil);;
         $contents .= html_writer::checkbox('enablevaliduntil', 1, !empty($user->validuntil), get_string('enabled', 'webservice'), array('id'=>'enablevaliduntil'.$user->id));
         // TODO: init date selector using standard $PAGE->requires->js_init_call();