diff --git a/trunk/includes/class/class.LSselect.php b/trunk/includes/class/class.LSselect.php index 266b76f4..0916a6b3 100644 --- a/trunk/includes/class/class.LSselect.php +++ b/trunk/includes/class/class.LSselect.php @@ -82,6 +82,10 @@ class LSselect { LSerror :: addErrorCode('LSsession_12'); } } + + public static function selectablly($obj,$args) { + return (LSsession::canEdit($obj->type,$obj->dn,$args))?1:0; + } } ?> diff --git a/trunk/select.php b/trunk/select.php index 73127062..ebbdbcfd 100644 --- a/trunk/select.php +++ b/trunk/select.php @@ -35,12 +35,27 @@ if(LSsession :: startLSsession()) { $LSsearch -> setParamsFormPostData(); $LSsearch -> setParam('nbObjectsByPage',NB_LSOBJECT_LIST_SELECT); + $selectablly=((isset($_REQUEST['selectablly']))?$_REQUEST['selectablly']:0); + + if (is_string($_REQUEST['editableAttr'])) { + $LSsearch -> setParam( + 'customInfos', + array ( + 'selectablly' => array ( + 'function' => array('LSselect','selectablly'), + 'args' => $_REQUEST['editableAttr'] + ) + ) + ); + $selectablly=1; + } $multiple = ((isset($_REQUEST['multiple']))?1:0); $searchForm = array ( 'action' => $_SERVER['PHP_SELF'], 'recursive' => (! LSsession :: isSubDnLSobject($LSobject) && LSsession :: subDnIsEnabled() ), 'multiple' => $multiple, + 'selectablly' => $selectablly, 'labels' => array ( 'submit' => _('Search'), 'approx' => _('Approximative search'), @@ -60,6 +75,7 @@ if(LSsession :: startLSsession()) { $LSsearch -> getHiddenFieldForm(), array( 'ajax' => 1, + 'selectablly' => $selectablly, 'multiple' => $multiple ) ) diff --git a/trunk/templates/default/select_table.tpl b/trunk/templates/default/select_table.tpl index 1e529d76..75d6539b 100644 --- a/trunk/templates/default/select_table.tpl +++ b/trunk/templates/default/select_table.tpl @@ -26,7 +26,7 @@ {foreach from=$page.list item=object}