fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [10387] logistic: radio select


From: Sigurd Nes
Subject: [Fmsystem-commits] [10387] logistic: radio select
Date: Tue, 30 Oct 2012 14:49:38 +0000

Revision: 10387
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10387
Author:   sigurdne
Date:     2012-10-30 14:49:37 +0000 (Tue, 30 Oct 2012)
Log Message:
-----------
logistic: radio select

Modified Paths:
--------------
    trunk/logistic/inc/class.uirequirement.inc.php

Modified: trunk/logistic/inc/class.uirequirement.inc.php
===================================================================
--- trunk/logistic/inc/class.uirequirement.inc.php      2012-10-30 14:23:58 UTC 
(rev 10386)
+++ trunk/logistic/inc/class.uirequirement.inc.php      2012-10-30 14:49:37 UTC 
(rev 10387)
@@ -144,6 +144,20 @@
                                }
                        }
 
+
+                       $line_id = 0; // optional preselect
+                       foreach($rows as &$entry)
+                       {
+                               $_checked = '';
+
+                               if($entry['id'] == $line_id)
+                               {
+                                       $_checked = 'checked="checked"';
+                               }
+
+                               $entry['select'] = "<input id=\"select_line\" 
type =\"radio\" {$_checked} name=\"values[select_line]\" 
value=\"{$entry['id']}\">";
+                       }
+
                        // ... add result data
                        $result_data = array('results' => $rows);
 
@@ -198,6 +212,11 @@
                                        'source' => 
self::link(array('menuaction' => 'logistic.uirequirement.index', 'activity_id' 
=> $activity_id, 'phpgw_return_as' => 'json')),
                                        'field' => array(
                                                array(
+                                                       'key' => 'select',
+                                                       'label' => 
lang('select'),
+                                                       'sortable' => false,
+                                               ),
+                                               array(
                                                        'key' => 'id',
                                                        'label' => lang('ID'),
                                                        'sortable' => true,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]