mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 08:19:05 +01:00
- LSldapObjet : le mot clé displayValue devient displayName
- LSsession : oubli getDisplayValue() -> getDisplayName()
This commit is contained in:
parent
4777789c95
commit
fc9ebc382a
13 changed files with 24 additions and 24 deletions
|
@ -26,7 +26,7 @@ $GLOBALS['LSobjects']['LSeecompany'] = array (
|
||||||
'lscompany'
|
'lscompany'
|
||||||
),
|
),
|
||||||
'rdn' => 'ou',
|
'rdn' => 'ou',
|
||||||
'orderby' => 'displayValue', // Valeurs possibles : 'displayValue' ou 'subDn'
|
'orderby' => 'displayName', // Valeurs possibles : 'displayName' ou 'subDn'
|
||||||
'container_dn' => 'ou=companies',
|
'container_dn' => 'ou=companies',
|
||||||
'display_name_format' => '%{ou}',
|
'display_name_format' => '%{ou}',
|
||||||
'label' => _('Sociétés'),
|
'label' => _('Sociétés'),
|
||||||
|
|
|
@ -26,7 +26,7 @@ $GLOBALS['LSobjects']['LSeegroup'] = array (
|
||||||
'posixGroup'
|
'posixGroup'
|
||||||
),
|
),
|
||||||
'rdn' => 'cn',
|
'rdn' => 'cn',
|
||||||
'orderby' => 'displayValue', // Valeurs possibles : 'displayValue' ou 'subDn'
|
'orderby' => 'displayName', // Valeurs possibles : 'displayName' ou 'subDn'
|
||||||
'container_dn' => 'ou=groups',
|
'container_dn' => 'ou=groups',
|
||||||
'container_auto_create' => array(
|
'container_auto_create' => array(
|
||||||
'objectclass' => array(
|
'objectclass' => array(
|
||||||
|
|
|
@ -27,7 +27,7 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
|
||||||
'posixAccount',
|
'posixAccount',
|
||||||
'sambaSamAccount',
|
'sambaSamAccount',
|
||||||
),
|
),
|
||||||
'orderby' => 'displayValue', // Valeurs possibles : 'displayValue' ou 'subDn'
|
'orderby' => 'displayName', // Valeurs possibles : 'displayName' ou 'subDn'
|
||||||
'rdn' => 'uid',
|
'rdn' => 'uid',
|
||||||
'container_dn' => 'ou=people',
|
'container_dn' => 'ou=people',
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
width: 570px;
|
width: 570px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sortBy_displayValue, .sortBy_subDn {
|
.sortBy_displayName, .sortBy_subDn {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
width: 570px;
|
width: 570px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sortBy_displayValue, .sortBy_subDn {
|
.sortBy_displayName, .sortBy_subDn {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,12 +56,12 @@ class LSattr_html_select_object extends LSattr_html{
|
||||||
/**
|
/**
|
||||||
* Effectue les tâches nécéssaires au moment du rafraichissement du formulaire
|
* Effectue les tâches nécéssaires au moment du rafraichissement du formulaire
|
||||||
*
|
*
|
||||||
* Récupère un array du type array('DNs' => 'displayValue') à partir d'une
|
* Récupère un array du type array('DNs' => 'displayName') à partir d'une
|
||||||
* liste de DNs.
|
* liste de DNs.
|
||||||
*
|
*
|
||||||
* @param[in] $data mixed La valeur de l'attribut (liste de DNs)
|
* @param[in] $data mixed La valeur de l'attribut (liste de DNs)
|
||||||
*
|
*
|
||||||
* @retval mixed La valeur formatée de l'attribut (array('DNs' => 'displayValue'))
|
* @retval mixed La valeur formatée de l'attribut (array('DNs' => 'displayName'))
|
||||||
**/
|
**/
|
||||||
function refreshForm($data,$fromDNs=false) {
|
function refreshForm($data,$fromDNs=false) {
|
||||||
return $this -> getFormValues($data,$fromDNs);
|
return $this -> getFormValues($data,$fromDNs);
|
||||||
|
|
|
@ -138,7 +138,7 @@ class LSformElement_select_object extends LSformElement {
|
||||||
*
|
*
|
||||||
* @param[in] $pattern Pattern de recherche
|
* @param[in] $pattern Pattern de recherche
|
||||||
*
|
*
|
||||||
* @retval array(dn -> displayValue) Les objets trouvés
|
* @retval array(dn -> displayName) Les objets trouvés
|
||||||
*/
|
*/
|
||||||
function searchAdd ($pattern) {
|
function searchAdd ($pattern) {
|
||||||
if (is_array($this -> params['selectable_object'])) {
|
if (is_array($this -> params['selectable_object'])) {
|
||||||
|
|
|
@ -266,7 +266,7 @@ class LSsession {
|
||||||
$this -> loadLSaccess();
|
$this -> loadLSaccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['Smarty'] -> assign('LSsession_username',$this -> LSuserObject -> getDisplayValue());
|
$GLOBALS['Smarty'] -> assign('LSsession_username',$this -> LSuserObject -> getDisplayName());
|
||||||
|
|
||||||
if ($_POST['LSsession_topDn']) {
|
if ($_POST['LSsession_topDn']) {
|
||||||
if ($this -> validSubDnLdapServer($_POST['LSsession_topDn'])) {
|
if ($this -> validSubDnLdapServer($_POST['LSsession_topDn'])) {
|
||||||
|
@ -472,7 +472,7 @@ class LSsession {
|
||||||
$this -> rdn = $_POST['LSsession_user'];
|
$this -> rdn = $_POST['LSsession_user'];
|
||||||
$this -> loadLSprofiles();
|
$this -> loadLSprofiles();
|
||||||
$this -> loadLSaccess();
|
$this -> loadLSaccess();
|
||||||
$GLOBALS['Smarty'] -> assign('LSsession_username',$this -> LSuserObject -> getDisplayValue());
|
$GLOBALS['Smarty'] -> assign('LSsession_username',$this -> LSuserObject -> getDisplayName());
|
||||||
$_SESSION['LSsession']=get_object_vars($this);
|
$_SESSION['LSsession']=get_object_vars($this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -605,15 +605,15 @@ class LSsession {
|
||||||
else {
|
else {
|
||||||
$basedn = NULL;
|
$basedn = NULL;
|
||||||
}
|
}
|
||||||
if ($LSoject_config['displayValue']) {
|
if ($LSoject_config['displayName']) {
|
||||||
$displayValue = $LSoject_config['displayValue'];
|
$displayName = $LSoject_config['displayName'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$displayValue = NULL;
|
$displayName = NULL;
|
||||||
}
|
}
|
||||||
if( $this -> loadLSobject($LSobject_name) ) {
|
if( $this -> loadLSobject($LSobject_name) ) {
|
||||||
if ($subdnobject = new $LSobject_name()) {
|
if ($subdnobject = new $LSobject_name()) {
|
||||||
$tbl_return = $subdnobject -> getSelectArray(NULL,$basedn,$displayValue);
|
$tbl_return = $subdnobject -> getSelectArray(NULL,$basedn,$displayName);
|
||||||
if (is_array($tbl_return)) {
|
if (is_array($tbl_return)) {
|
||||||
$return=array_merge($return,$tbl_return);
|
$return=array_merge($return,$tbl_return);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,8 +35,8 @@ var LSselect = new Class({
|
||||||
el.addEvent('click',this.onChangePageClick.bindWithEvent(this,el));
|
el.addEvent('click',this.onChangePageClick.bindWithEvent(this,el));
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
$$('.sortBy_displayValue').each(function(el) {
|
$$('.sortBy_displayName').each(function(el) {
|
||||||
el.addEvent('click',this.sortBy.bind(this,'displayValue'));
|
el.addEvent('click',this.sortBy.bind(this,'displayName'));
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
$$('.sortBy_subDn').each(function(el) {
|
$$('.sortBy_subDn').each(function(el) {
|
||||||
|
|
|
@ -127,7 +127,7 @@ if($LSsession -> startLSsession()) {
|
||||||
|
|
||||||
$sort=false;
|
$sort=false;
|
||||||
if ((isset($_REQUEST['orderby']))) {
|
if ((isset($_REQUEST['orderby']))) {
|
||||||
$possible_values= array('displayValue','subDn');
|
$possible_values= array('displayName','subDn');
|
||||||
if (in_array($_REQUEST['orderby'],$possible_values)) {
|
if (in_array($_REQUEST['orderby'],$possible_values)) {
|
||||||
$sort=true;
|
$sort=true;
|
||||||
if ($orderby==$_REQUEST['orderby']) {
|
if ($orderby==$_REQUEST['orderby']) {
|
||||||
|
@ -221,7 +221,7 @@ if($LSsession -> startLSsession()) {
|
||||||
|
|
||||||
$objectList[]=array(
|
$objectList[]=array(
|
||||||
'dn' => $objDn,
|
'dn' => $objDn,
|
||||||
'displayValue' => $objName,
|
'displayName' => $objName,
|
||||||
'subDn' => $subDn_name
|
'subDn' => $subDn_name
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<table class='LSobject-list' id='LSselect-object' caption='{$LSobject_list_objecttype}'>
|
<table class='LSobject-list' id='LSselect-object' caption='{$LSobject_list_objecttype}'>
|
||||||
<tr class='LSobject-list'>
|
<tr class='LSobject-list'>
|
||||||
<th class='LSobject-list LSobject-select-check'></th>
|
<th class='LSobject-list LSobject-select-check'></th>
|
||||||
<th class='LSobject-list sortBy_displayValue'>{if $LSobject_list_orderby == 'displayValue'}<strong>{$LSobject_list_objectname}</strong><img src='{$LS_IMAGES_DIR}/{$LSobject_list_ordersense}.png' class='LSobject-list-ordersense' alt='{$LSobject_list_ordersense}'/>{else}{$LSobject_list_objectname}{/if}</th>
|
<th class='LSobject-list sortBy_displayName'>{if $LSobject_list_orderby == 'displayName'}<strong>{$LSobject_list_objectname}</strong><img src='{$LS_IMAGES_DIR}/{$LSobject_list_ordersense}.png' class='LSobject-list-ordersense' alt='{$LSobject_list_ordersense}'/>{else}{$LSobject_list_objectname}{/if}</th>
|
||||||
{if $LSobject_list_subDn}<th class='LSobject-list LSobject-list-subdn sortBy_subDn'>{if $LSobject_list_orderby == 'subDn'}<strong>{$label_level}</strong><img src='{$LS_IMAGES_DIR}/{$LSobject_list_ordersense}.png' class='LSobject-list-ordersense' alt='{$LSobject_list_ordersense}'/>{else}{$label_level}{/if}</th>{/if}
|
{if $LSobject_list_subDn}<th class='LSobject-list LSobject-list-subdn sortBy_subDn'>{if $LSobject_list_orderby == 'subDn'}<strong>{$label_level}</strong><img src='{$LS_IMAGES_DIR}/{$LSobject_list_ordersense}.png' class='LSobject-list-ordersense' alt='{$LSobject_list_ordersense}'/>{else}{$label_level}{/if}</th>{/if}
|
||||||
</tr>
|
</tr>
|
||||||
{assign var='bis' value=false}
|
{assign var='bis' value=false}
|
||||||
{foreach from=$LSobject_list item=object}
|
{foreach from=$LSobject_list item=object}
|
||||||
<tr class='LSobject-list{if $bis} LSobject-list-bis{assign var='bis' value=false}{else}{assign var='bis' value=true}{/if}'>
|
<tr class='LSobject-list{if $bis} LSobject-list-bis{assign var='bis' value=false}{else}{assign var='bis' value=true}{/if}'>
|
||||||
<td class='LSobject-list LSobject-select-check'><input type='{if $LSselect_multiple}checkbox{else}radio{/if}' name='LSobjects_selected[]' value='{$object.dn}' {if $object.select}checked="true"{/if} class='LSobject-select' /></td>
|
<td class='LSobject-list LSobject-select-check'><input type='{if $LSselect_multiple}checkbox{else}radio{/if}' name='LSobjects_selected[]' value='{$object.dn}' {if $object.select}checked="true"{/if} class='LSobject-select' /></td>
|
||||||
<td class='LSobject-list LSobject-select-names'>{$object.displayValue}</td>
|
<td class='LSobject-list LSobject-select-names'>{$object.displayName}</td>
|
||||||
{if $LSobject_list_subDn}<td class='LSobject-list LSobject-select-level'>{$object.subDn}</td>{/if}
|
{if $LSobject_list_subDn}<td class='LSobject-list LSobject-select-level'>{$object.subDn}</td>{/if}
|
||||||
</tr>
|
</tr>
|
||||||
{foreachelse}
|
{foreachelse}
|
||||||
|
|
|
@ -26,14 +26,14 @@
|
||||||
|
|
||||||
<table class='LSobject-list'>
|
<table class='LSobject-list'>
|
||||||
<tr class='LSobject-list'>
|
<tr class='LSobject-list'>
|
||||||
<th class='LSobject-list'><a href='view.php?LSobject={$LSobject_list_objecttype}&orderby=displayValue'>{if $LSobject_list_orderby == 'displayValue'}<strong>{$LSobject_list_objectname}</strong><img src='{$LS_IMAGES_DIR}/{$LSobject_list_ordersense}.png' class='LSobject-list-ordersense' alt='{$LSobject_list_ordersense}'/>{else}{$LSobject_list_objectname}{/if}</a></th>
|
<th class='LSobject-list'><a href='view.php?LSobject={$LSobject_list_objecttype}&orderby=displayName'>{if $LSobject_list_orderby == 'displayName'}<strong>{$LSobject_list_objectname}</strong><img src='{$LS_IMAGES_DIR}/{$LSobject_list_ordersense}.png' class='LSobject-list-ordersense' alt='{$LSobject_list_ordersense}'/>{else}{$LSobject_list_objectname}{/if}</a></th>
|
||||||
{if $LSobject_list_subDn}<th class='LSobject-list LSobject-list-subdn'><a href='view.php?LSobject={$LSobject_list_objecttype}&orderby=subDn'>{if $LSobject_list_orderby == 'subDn'}<strong>{$label_level}</strong><img src='{$LS_IMAGES_DIR}/{$LSobject_list_ordersense}.png' class='LSobject-list-ordersense' alt='{$LSobject_list_ordersense}'/>{else}{$label_level}{/if}</a></th>{/if}
|
{if $LSobject_list_subDn}<th class='LSobject-list LSobject-list-subdn'><a href='view.php?LSobject={$LSobject_list_objecttype}&orderby=subDn'>{if $LSobject_list_orderby == 'subDn'}<strong>{$label_level}</strong><img src='{$LS_IMAGES_DIR}/{$LSobject_list_ordersense}.png' class='LSobject-list-ordersense' alt='{$LSobject_list_ordersense}'/>{else}{$label_level}{/if}</a></th>{/if}
|
||||||
<th class='LSobject-list'>{$_Actions}</th>
|
<th class='LSobject-list'>{$_Actions}</th>
|
||||||
</tr>
|
</tr>
|
||||||
{assign var='bis' value=false}
|
{assign var='bis' value=false}
|
||||||
{foreach from=$LSobject_list item=object}
|
{foreach from=$LSobject_list item=object}
|
||||||
<tr class='LSobject-list{if $bis} LSobject-list-bis{assign var='bis' value=false}{else}{assign var='bis' value=true}{/if}'>
|
<tr class='LSobject-list{if $bis} LSobject-list-bis{assign var='bis' value=false}{else}{assign var='bis' value=true}{/if}'>
|
||||||
<td class='LSobject-list LSobject-list-names'><a href='view.php?LSobject={$LSobject_list_objecttype}&dn={$object.dn}' class='LSobject-list'>{$object.displayValue}</a> </td>
|
<td class='LSobject-list LSobject-list-names'><a href='view.php?LSobject={$LSobject_list_objecttype}&dn={$object.dn}' class='LSobject-list'>{$object.displayName}</a> </td>
|
||||||
{if $LSobject_list_subDn}<td class='LSobject-list'>{$object.subDn}</td>{/if}
|
{if $LSobject_list_subDn}<td class='LSobject-list'>{$object.subDn}</td>{/if}
|
||||||
<td class='LSobject-list LSobject-list-actions'>
|
<td class='LSobject-list LSobject-list-actions'>
|
||||||
{if $object.actions!=''}
|
{if $object.actions!=''}
|
||||||
|
|
|
@ -244,7 +244,7 @@ if($LSsession -> startLSsession()) {
|
||||||
|
|
||||||
$sort=false;
|
$sort=false;
|
||||||
if ((isset($_REQUEST['orderby']))) {
|
if ((isset($_REQUEST['orderby']))) {
|
||||||
$possible_values= array('displayValue','subDn');
|
$possible_values= array('displayName','subDn');
|
||||||
if (in_array($_REQUEST['orderby'],$possible_values)) {
|
if (in_array($_REQUEST['orderby'],$possible_values)) {
|
||||||
$sort=true;
|
$sort=true;
|
||||||
if ($orderby==$_REQUEST['orderby']) {
|
if ($orderby==$_REQUEST['orderby']) {
|
||||||
|
@ -352,7 +352,7 @@ if($LSsession -> startLSsession()) {
|
||||||
|
|
||||||
$objectList[]=array(
|
$objectList[]=array(
|
||||||
'dn' => $objDn,
|
'dn' => $objDn,
|
||||||
'displayValue' => $objName,
|
'displayName' => $objName,
|
||||||
'subDn' => $subDn_name
|
'subDn' => $subDn_name
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue