From f3c950e4c121e75ac262987839c6dd033c8e72a7 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Wed, 10 Feb 2010 16:26:23 +0000 Subject: [PATCH] MDL-21577 fixed regression --- admin/webservice/service_users.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/admin/webservice/service_users.php b/admin/webservice/service_users.php index 47d74b7a67f..8811c1a46f5 100644 --- a/admin/webservice/service_users.php +++ b/admin/webservice/service_users.php @@ -170,15 +170,9 @@ if (!empty($allowedusers)) { //valid until date selector $contents .= "
"; // 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();