From 44069b8c5efb4a0a50ad7a20fc0308746ad354ef Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 22 Aug 2008 00:14:12 -0400 Subject: [PATCH] Get the assignment select box working on newreport.php --- newreport.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/newreport.php b/newreport.php index a570a94..34da248 100755 --- a/newreport.php +++ b/newreport.php @@ -162,12 +162,15 @@ if ($_REQUEST['do'] == 'add') if (can_perform('canassign')) { - foreach (bugdar::$datastore['assignto'] AS $dev) + foreach (bugdar::$datastore['assignto'] as $dev) { - $value = $dev['userid']; - $label = construct_user_display($dev, false); - $selected = ($input->in['assignedto'] ? ($input->in['assignedto'] == $dev['userid']) : ($dev['userid'] == bugdar::$options['defaultassign'])); - eval('$select[dev] .= "' . $template->fetch('selectoption') . '";'); + $tpl = new BSTemplate('selectoption'); + $tpl->vars = array( + 'value' => $dev['userid'], + 'label' => construct_user_display($dev, false), + 'selected' => ($input->in['assignedto'] ? ($input->in['assignedto'] == $dev['userid']) : ($dev['userid'] == bugdar::$options['defaultassign'])) + ); + $select['dev'] = $tpl->evaluate()->getTemplate(); } } -- 2.43.5